for uv animation

Software: Away3D 4.x

genechen, Newbie
Posted: 30 July 2013 04:17 PM   Total Posts: 3

Hi,

i want to give a uv animation to a skeleton mesh, but there only exsits one animator property in mesh class. i find that away 4.1 changed the use method of uvanimation,that is the UVanimator effects on the mesh(mesh.animator = new UVAnimator);
But, actually uvanimation is an action of material texture, not the mesh.
As a result, i have no idea that how to give a uvanimation to a skeleton animation mesh.
Looking back to away3d 4.0, the uv animation effects on the material, so the skeleton animation mesh’s material can do the uv animation also.

Here the problem is , how to use UVAnimator together with skeletonAnimator?

thx.

   

Avatar
Fabrice Closier, Administrator
Posted: 30 July 2013 05:40 PM   Total Posts: 1265   [ # 1 ]

I totally agree, ideally, you would want to do mesh.animators = [myUVanimator, mySkeletonAnimator]. Unfortunatly the current implementation is made to support one of them at a time. I came across this very same limitations while working on the SpriteSheetAnimator, which I wanted to assign to an animated mesh for a demo/tut…

‘actually uvanimation is an action of material texture, not the mesh.’
No: the uv’s are into geometry and that’s is what is altered, the material does the same with or without uv animation.

In meanwhile you could animate the uv’s by hand. (search this forum, I have posted a basic uv animation example a while ago)
Or thinking about it, with a not too big hack you could also trigger the update of the uvanimator using the update handler of the skeletonanimator. They should not conflict as the vertex agal is not defined on UVanimator. The default fragment shader of the skeletonanimator could be replaced by the uvanimator one…

Definetly something we need to improve!

   

genechen, Newbie
Posted: 01 August 2013 03:05 AM   Total Posts: 3   [ # 2 ]

Hi, Fabrice, Thanks for detailed replying.
There comes a problem if i add the uv animtion logic into the skeleton animtion.Yes, they should not conflict as the the vertex agal is not defined on UVAnimator,but there may conflict on the constant vertex registers which are not enough to use at a time..or through passes?

   

Avatar
Fabrice Closier, Administrator
Posted: 01 August 2013 10:01 AM   Total Posts: 1265   [ # 3 ]

as said, you need to change a bit both animators. where skeletonAnimator invokes the uvanimator for the agal string to make it work…

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X