its just an array of vertexes
so would be per Vertex like x:0, y:0, z:0
Fabrice
On Apr 30, 2009, at 10:59 PM, evilotto wrote:
k,
if i were to trace out
vertices:head1.vertices
what would be the output, that is what i need to know.
On Apr 30, 4:16 pm, Fabrice3D <[email protected]> wrote:
you don't really need sources, since its a one liner to declare it...
There are also tutorials showing the exact same lines online at
away3d.com
I know lots of users are using this class, but indeed I haven't
seen a
lot of code shared for it.
basically it's:
new instance( mesh, [ array of a series of vertices array with id's
representing frame states], init object, loop);
here's a snippet:
the heads were meshes loaded from as3 classes, but could be anything
generated or loaded in Away.
as long as they have the same vertices array length. or at least
longer than base mesh (first param)
import away3d.animators.Animator;
import away3d.animators.data.AnimationSequence;
[..]
private var myanimator:Animator;
[..]
myanimator:Animator = new Animator(head1,
[
{vertices:head1.vertices,
prefix:"smile1"},
{vertices:head2.vertices,
prefix:"smile2"},
{vertices:head3.vertices,
prefix:"smile3"},
{vertices:head4.vertices,
prefix:"blink1"},
{vertices:head5.vertices,
prefix:"blink2"},
{vertices:head6.vertices,
prefix:"blink3"},
],
{material:mymaterial},true);
at this time, the animator instance is ready to play
myanimator.play(new AnimationSequence("smile", true, true, 9) ) ;)
on enterfame
view.scene.updateTime();
Fabrice
On Apr 30, 2009, at 9:25 PM, evilotto wrote:
Are there any examples with source files that show the process of
working with the animator? I woudl be good to be able to tear apart
some files and investigate how it works. The only example i have
found
online does not include source.
On Apr 30, 2:54 pm, Fabrice3D <[email protected]> wrote:
Hi Chris,
1/ It doesn't matter what format you load. Once loaded you have
only 2
kinds of objects: Mesh objects or ObjContainer3D's.
Read past post on obj from a few days ago. A few examples to
access,
and alter mesh and properties were discussed.
2/ The vertexes you load need to be object space, included with all
transformations.
the animation system is read only.
3/ Having them as a series of numbers should be enough
like 0,0,0. To see how it must look like, just load an md2, and
export as animated mesh using the
Mesh AS export (not yet fully working in AS3Exporter
(myMd2Animation as Mesh).asAS3Class("myclass", "mypackage", true,
true);
--> paste in text file
but again, a simple series of numbers with a delimiter is the way
to
go...
in flash you just have to loop +=3 to generate the vertexes or
alter
the frames information
Fabrice
On Apr 30, 2009, at 3:54 PM, evilotto wrote:
That sounds like a good place to start.
couple of questions.
1. when you bring in a collada i cannot cast the Object3D it is
as a
mesh so i am not sure how i would access mesh.vertexes.array. i do
have access to the vertex array on GeometryData.geometry.
2. do you have any more information on the format of the data i
would
need to generate? for each vertex does it need a complete 3X3
matrix
of translation, rotaiton and scale? It seems like since i am
moving
them in 3D it would need that amount of info. Also are there IDs
per
vertex or just their position in the array?
3. can you send me the as3 classes for the Animator example so i
can
see the data format i need to generate, a concrete example would
be
very helpful.
thanks,
On Apr 29, 7:44 pm, Fabrice3D <[email protected]> wrote:
Hi Chris,
I see you've found your way to our dev group, welcome!
After reading your first message, it got me thinking...
We are talking long duration here, right?
I think you could first indeed use animator but just for 3
frames,
just to init the system.
Then update the frame dictonaries with the externall data as they
play, you can use the loops events for this.
it would be like once frame 1 is played, it would play 2 to 3,
you
would then swap on loop the frame 1,
once it plays 3 to 1, feed frame 2 etc etc
The only issue would be to ensure you do have for every data
load/
feed
the same array order.
It also needs to be sync with the first frame order, which is not
allways same as mesh.vertexes array.
then the values could be by chunk/frames loaded externally using
xml
or even plain text.
it would just be a bunch of numbers per frame with a delimiter.
I've wrote something similar for a dance editor a while ago, it
should
work nicely.
Let me know how it goes. I feel there are some new features that
could
come out of this :)
Fabrice
On Apr 30, 2009, at 1:08 AM, evilotto wrote:
Here is my problem. I have a model that i am loading into away3D
via
COLLADA. i need to apply transformations per vertex to the model
(without using bones). I would like to use animator for this
but i
can’t create a AS3 class for each of the frames.
Esentially what i am doing is I have a piece of video and am
tracking/
match moving it to a model. This produces per vertex
transformation
data, i need to be able to load that data externally via XML or
some
other format and apply it to the verticies of the COLLADA model,
again
without any bones. Animator seems to be able to do this, but I
don’t
know how to format the data since the only i have seen are using
this
as3 export idea.