automated uv scrolling


#1

Another fun feature. Hands free uv scrolling (in the panda3d sourceforge tree)!

At the lowest level, you can create a UvScrollNode, and use setUSpeed, and setVSpeed to specify scrolling speeds. Put geometry underneath it and the default texture stage will start moving along.

You can also trigger it by putting at least one of the following

<Scalar> scroll_u {value}
<Scalar> scroll_v {value}

under a in an egg file

Finally, in maya, you can add a vector attribute ‘scrollUV’ to a node. The first two values are u and v speeds respectively.

Open tasks for this feature:

-support for rotation (setRSpeed, scroll_r, and the third value of the vector for scrollUV)
-support for blender, etc.
-a way to define scrolling for multiple texture layers (very tricky from a tools perspective)
-Make a RenderEffect version, to avoid needing a whole PandaNode

Take care,
BD


Automatic UV scrolling?
#2

Very nice feature! Makes it a lot easier to create things like moving water and waterfalls.


#3

Hm, I’m having some weird problems with the uv scrolling feature. It seems like it only works for stages with MModulate mode, if I choose any other mode (like MNormal) it just won’t move. Any ideas what might be wrong?


#4

Hmm, looks like the current implementation only modifies the default TextureStage.

To generalize it, we should have a parameter on UvScrollNode that allows you to specify the TextureStage you wish it to modify, with a default value of the default TextureStage.

David


#5

It sounds a bit weird for me anyways to have this interface as PandaNode rather than in the TextureStage system. But maybe it’s just me…