automated uv scrolling

Return to Panda Features in Development

automated uv scrolling

Postby BackwardsDan » Mon Jul 20, 2009 7:14 pm

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

Code: Select all
<Scalar> scroll_u {value}
<Scalar> scroll_v {value}


under a <Group> 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
BackwardsDan
 
Posts: 4
Joined: Mon Jun 29, 2009 4:44 pm

Postby rdb » Tue Jul 21, 2009 2:19 am

Very nice feature! Makes it a lot easier to create things like moving water and waterfalls.
rdb
 
Posts: 9299
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby rdb » Mon Sep 28, 2009 6:10 am

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?
rdb
 
Posts: 9299
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby drwr » Mon Sep 28, 2009 7:05 am

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
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby rdb » Mon Sep 28, 2009 7:27 am

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...
rdb
 
Posts: 9299
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands


Return to Panda Features in Development

Who is online

Users browsing this forum: No registered users and 0 guests