Explosion Animation Export From 3ds max

Software: Away3D 4.x

etamina, Newbie
Posted: 08 December 2011 09:54 AM   Total Posts: 3

I’m trying to export an explosion animation from 3dsmax to away3d 4 (stage3d). This animation is prepared with meshbomb modifier. I have only one mesh on the scene.

I couldn’t find the proper file format to export these kind of animation. md5 is for skin modified animations, collada is not supported and awd gave error about materials.

Should i export each frame as sepearate obj files and animate with as?

I attached a screenshot of the animation for better understanding and by the way i do not have camera animation.

Any suggesttions?

 

   

inSertCodE, Sr. Member
Posted: 08 December 2011 01:48 PM   Total Posts: 105   [ # 1 ]

Depends on how deep you wanna go in it… For a future project that I plan to make I’m planing to create my own explosion class.
The general idea is to use the mesh data to create exactly the same mesh but not share vertexes - each triangle separated. Set both side to true. After that each triangle will fly away and rotate in the direction of the average normal and slowly fade away…

   

Avatar
Fabrice Closier, Administrator
Posted: 08 December 2011 02:15 PM   Total Posts: 1265   [ # 2 ]

only thing required for this is not another explode class. You simply need to have a triangle (3 indices in mesh) and alter these following your rules.
having unique meshes would kill the perf dramatically.

Look at the way LineSegment and SegmentBase work together….

   

etamina, Newbie
Posted: 08 December 2011 03:17 PM   Total Posts: 3   [ # 3 ]

First of all thanks for your replies smile

@inSertCodE I’m not willing to write an explosion class because of time and it’ll be a really tough job to have all the controls like you have in 3ds max. The principles are simple but explosion is not that simple smile Also you should write an editor to see the effect realtime. I prefer to handle this with a 3d program and import the mesh animation.

@Fabrice Closier I can’t get what you mean. I used linesegment and segmentset for line drawing before. I cant get the relation btw these classes and what i want to achieve. 

   

Avatar
Fabrice Closier, Administrator
Posted: 08 December 2011 03:27 PM   Total Posts: 1265   [ # 4 ]

I haven’t said you need to use any of these classes. I said: look at the way they work together. It has nothing to do with the fact that they are “lines” on screen.

The segments are 2 faces, 4 vertices. the base is a single buffer. a segment is just a ref to a location in the buffer. So the entire “explosion”, following this concept would be a single buffer. one upload. Just like the SegmentBase does.
The way segments can be updated also shows you how you could animate your triangles…

So what I’m saying is that if you follow this principle, it ain’t that complex to build it.

   

inSertCodE, Sr. Member
Posted: 09 December 2011 01:19 AM   Total Posts: 105   [ # 5 ]
Fabrice Closier - 08 December 2011 02:15 PM

only thing required for this is not another explode class. You simply need to have a triangle (3 indices in mesh) and alter these following your rules.
having unique meshes would kill the perf dramatically.

Look at the way LineSegment and SegmentBase work together….

My idea was not an unique mesh for each triangle. wink The idea is to rebuild the mesh (using the existing mesh data) so that your triangles won’t have shared vertexes. Then you control the flying of the triangles by updating vertex data.

   

etamina, Newbie
Posted: 19 December 2011 09:08 AM   Total Posts: 3   [ # 6 ]

I found a solution and i think its worth to share.

I exported 6 frames of an 30 frames animation. It’s 1 export per 5 frames, you can adjust the frequency as your wish. The important aspects of exporting obj is, you shouldn’t optimize the models. All of the models must have same vertex size.

I wrote only two classes one is batchObjLoader which is responsible of loading objs and sends it to batchObjAnimator class, and i modified the objParser class to get the pure vertex data ( not the buffer ) with event payload.

Batchanimator class takes the first mesh ( of six obj ) and adds it to scene. Than based on time delta it interpolates btw the vertex data of itself and the mesh after it and uploads it to the vertex buffer.

For better understanding
  currentMesh.geometry.subGeometries[0].updateVertexData(interpolateVertex(vertexList,delta))

Fabrice Closier, thanks for inspiration.

Sorry for my english, it may have lots of mistakes smile

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X