GPU/AGAL Vertex animation

Software: Away3D 4.x

pete shand, Newbie
Posted: 17 June 2013 07:48 AM   Total Posts: 21

Can anyone shed some light on the best way to animate vertex via AGAL within away3d? I’ve created a basic custom material and material pass (see attachment) which simply sets a flat color and enables you to set the following params:

offsetX, amplitudeX, frequencyX, offsetY, amplitudeY and frequencyY

This produces a wave effect in both the x and y/z axis which is what I’m after. The problem I’m facing is that I’m wanted combine this effect with already existing away3d materials so I can use textures, lighting, normals, methods, etc.

Is creating a whole new material and pass the best way to do this, or is there another way? could it be done with a method? or VertexAnimator? there doesn’t seem to be any documentation around this kind of thing :S


File Attachments  (File Size: 3KB - Downloads: 331)

GoroMatsumoto, Sr. Member
Posted: 17 June 2013 09:04 AM   Total Posts: 166   [ # 1 ]

Hi, pete.

Great work:)
I have tried to make a custom material that have vertex animation with these tutorials. It’s similar to your way.

Writing Custom Materials 1: Getting Started
Writing Custom Materials 2: Adding Textures
Writing Custom Materials 3: Simple Lighting

I have not tried the lighting yet.
Anyway, I wait next tutorial for adding methods.




pete shand, Newbie
Posted: 17 June 2013 10:49 AM   Total Posts: 21   [ # 2 ]


Yeah so those tuts are want I originally based my material and pass off, very helpful. But there must be a way to inject vertex animation AGAL without having to write a material from scratch. Or is that kind of functionality simply not supported in Away3d?



GoroMatsumoto, Sr. Member
Posted: 18 June 2013 09:34 AM   Total Posts: 166   [ # 3 ]


I tried making it as a material method.
You can use normal, methods,
but lighting is wrong…

Maybe this is caused by a order of rendering pass.
I guess.

I attached the code of method.

var _anim:VertexAnimationMethod = new VertexAnimationMethod(.05.2);

I wonder that I can make it as a Animator/AnimationSet.
But I don’t know about Away animation classes very well.


File Attachments  (File Size: 2KB - Downloads: 350)

pete shand, Newbie
Posted: 20 June 2013 06:28 AM   Total Posts: 21   [ # 4 ]

For anyone interested I’ve written a blog post outlining on what I’m trying to achieve and issues I’m facing with the AGAL vertex animation stuff. This includes an embedded swf and source code.



GoroMatsumoto, Sr. Member
Posted: 20 June 2013 10:13 AM   Total Posts: 166   [ # 5 ]



Nice article.
Maybe it’s a 1st post about Away3D’s custom vertex animation on internet : )

Did you see my code?
It have a problem of lighting.
Maybe I should distort normals too.
But I don’t know how to do that…
I attached my swf.
(It has the method with EnvMapMethod.)

If you have any hint, please tell me.
Thank you.


File Attachments
SimpleAwayTest.swf  (File Size: 1249KB - Downloads: 471)

pete shand, Newbie
Posted: 20 June 2013 11:49 PM   Total Posts: 21   [ # 6 ]


Nice work on the twisting cube! did you make that with the method you posted earlier? I’m working on a Method as well, but haven’t managed to get environment map working with it, as it appears you have.



pete shand, Newbie
Posted: 21 June 2013 02:11 AM   Total Posts: 21   [ # 7 ]

Got a WaveEffect method applied to a Material with an Environment Map




Away3D Forum

Member Login