|
YG, Newbie
Posted: 08 November 2011 03:44 PM Total Posts: 18
hello,
i transfer from PaperVision to Away3d v4 for enjoy the new adobe stage3d api.
over more then 20 hours i tried to export an animated model form 3d max 2012 to Away3d v4
i success to load an *.3ds file. it was amazing the model look so sexy with a light and shadows!
but the animation don’t work.
so i start to learning how to load an model with animation.
and i understood that collada not supported yet.
and awd not ready yet.
so whats left is md2 and the md5.
after allot of trays i gived up of exporting an md5 from max2012…
now after more and more trays i success to export an md2 with the tool:
Quake 2 MD2 Exporter by Adam Barton.
but when i trying to load it it fail with the following error:
Error: No parser defined. To enable all parsers for auto-detection, use Parsers.enableAllBundled()
and i used befor i loaded my model with:
Parsers.enableAllBundled()
i attached my md2 file.
thanks!.
File Attachments
yo2.md2 (File Size: 385KB - Downloads: 0)
|
Jack Dracon, Newbie
Posted: 08 November 2011 05:30 PM Total Posts: 27
[ # 1 ]
Hey there…
The enableParser don’t work pretty well (to me, at least) and for the animation, I recommend to use the AssetLibrary.enableParser(MD5Mesh) and AssetLibrary.enableParser(MD5Anim). This will help you with this problem. To carry on, I advice to you see this post, may be what this helps you more.
http://away3d.com/forum/viewthread/1295/
Good Luck.
|
Leo Brennan, Newbie
Posted: 08 November 2011 06:07 PM Total Posts: 20
[ # 2 ]
show some of your loading code, I had this problem a few days ago but don’t remember how I fixed it. I think its a problem in how you try to load the file but as I said I need a code sample to hopefully point out your issue.
|
YG, Newbie
Posted: 08 November 2011 11:47 PM Total Posts: 18
[ # 3 ]
thanks!
i download the MD5 Exporter but he give me an error: unable to convert: undefined to type: Modifier
now my model don’t have bones it’s just simple x,y,z animation with 8 editable mesh objects and uvm map material
here is my code:
Parsers.enableAllBundled();
loader = new Loader3D(); loader.scale(10); loader.z = -200; loader.addEventListener(AssetEvent.ASSET_COMPLETE, onAssetComplete); loader.loadData(model); //model is a byteArray loaded with URLLoader
i attached the full AS code
File Attachments
|
Leo Brennan, Newbie
Posted: 09 November 2011 11:17 AM Total Posts: 20
[ # 4 ]
For MD5 I use this code:
AssetLibrary.enableParser(MD5MeshParser); AssetLibrary.enableParser(MD5AnimParser); AssetLibrary.addEventListener(AssetEvent.ASSET_COMPLETE, onAssetComplete); AssetLibrary.load(new URLRequest("embeds/md5TestModel.md5mesh"));
I think that’s the same I used for AWD2 models. but with something like:
AssetLibrary.enableParser(MD2Parser);
|
Leo Brennan, Newbie
Posted: 09 November 2011 11:20 AM Total Posts: 20
[ # 5 ]
Actually I just found some:
AssetLibrary.enableParser(MD2Parser); AssetLibrary.addEventListener(AssetEvent.ASSET_COMPLETE, onAssetRetrieved); AssetLibrary.load(new URLRequest('embeds/Warbot_Anim.md2'));
and then for onAssetRetrieved:
private function onAssetRetrieved(event:AssetEvent):void { if (event.asset.assetType == AssetType.MESH && !_mesh) { _mesh = Mesh(event.asset); _mesh.y = -300; view.scene.addChild(_mesh); } else if (event.asset.assetType == AssetType.ANIMATOR) { controller = VertexAnimator(event.asset); controller.play("run"); controller.timeScale = _timeScale; } }
|
Jack Dracon, Newbie
Posted: 09 November 2011 01:15 PM Total Posts: 27
[ # 6 ]
Hi there, sorry for delay. =\
YG:
Strange error, did you create the MESH_COMPLETE and ASSET_COMPLETE events? I has used, as base to me, the MonsterController in broomstick examples (https://github.com/away3d/away3d-examples-broomstick/tree/master/src - look into LoadMD5Test.cs and MonsterController.cs). Hope this helps.
Leo Brennan: Leo Brennan - 09 November 2011 11:17 AM For MD5 I use this code:
AssetLibrary.enableParser(MD5MeshParser); AssetLibrary.enableParser(MD5AnimParser); AssetLibrary.addEventListener(AssetEvent.ASSET_COMPLETE, onAssetComplete); AssetLibrary.load(new URLRequest("embeds/md5TestModel.md5mesh"));
I think that’s the same I used for AWD2 models. but with something like:
AssetLibrary.enableParser(MD2Parser);
An short answer: That’s right, this enabled your parser to load your mesh, but don’t loaded the animation.
Leo Brennan - 09 November 2011 11:20 AM Actually I just found some:
AssetLibrary.enableParser(MD2Parser); AssetLibrary.addEventListener(AssetEvent.ASSET_COMPLETE, onAssetRetrieved); AssetLibrary.load(new URLRequest('embeds/Warbot_Anim.md2'));
and then for onAssetRetrieved:
private function onAssetRetrieved(event:AssetEvent):void { if (event.asset.assetType == AssetType.MESH && !_mesh) { _mesh = Mesh(event.asset); _mesh.y = -300; view.scene.addChild(_mesh); } else if (event.asset.assetType == AssetType.ANIMATOR) { controller = VertexAnimator(event.asset); controller.play("run"); controller.timeScale = _timeScale; } }
This code are associate just for one animation, and this doesn’t work pretty well. When you load the animation from MD5, you need to define a name, and associate with the name of the animation files (MD5 export each animation to a file - you need to set this before export the animation) as I posted here: http://away3d.com/forum/viewthread/1295/#4297
Why you are trying to use the MD2? why not md5?
I hope this can help you guys. =D
Good luck!
|
YG, Newbie
Posted: 09 November 2011 02:04 PM Total Posts: 18
[ # 7 ]
thanks you all,
for the great info you sharing with me..
i right now trying to export md5 form 3d max 2012.
soon i success to export and try your tips.
|
Leo Brennan, Newbie
Posted: 09 November 2011 02:22 PM Total Posts: 20
[ # 8 ]
Leo Brennan - 09 November 2011 11:20 AM Actually I just found some:
AssetLibrary.enableParser(MD2Parser); AssetLibrary.addEventListener(AssetEvent.ASSET_COMPLETE, onAssetRetrieved); AssetLibrary.load(new URLRequest('embeds/Warbot_Anim.md2'));
and then for onAssetRetrieved:
private function onAssetRetrieved(event:AssetEvent):void { if (event.asset.assetType == AssetType.MESH && !_mesh) { _mesh = Mesh(event.asset); _mesh.y = -300; view.scene.addChild(_mesh); } else if (event.asset.assetType == AssetType.ANIMATOR) { controller = VertexAnimator(event.asset); controller.play("run"); controller.timeScale = _timeScale; } }
This code are associate just for one animation, and this doesn’t work pretty well. When you load the animation from MD5, you need to define a name, and associate with the name of the animation files (MD5 export each animation to a file - you need to set this before export the animation)
This code is to show him the MD2 loading as he asked for that, the other example I posted was MD5 but to show him the first bit where he gets the error saying he has to enable all parsers.
|
Jack Dracon, Newbie
Posted: 09 November 2011 03:48 PM Total Posts: 27
[ # 9 ]
YG - 09 November 2011 02:04 PM thanks you all,
for the great info you sharing with me..
i right now trying to export md5 form 3d max 2012.
soon i success to export and try your tips.
Awesome dude, let us know if has worked.
Leo Brennan, can you post your code here, I got confused. Do you are using the latest version of away3D from git (https://github.com/away3d/away3d-core-fp11)?
Good luck dudes?! =D
|
YG, Newbie
Posted: 09 November 2011 06:07 PM Total Posts: 18
[ # 10 ]
ok…....!
i finally success exporting md5 form 3d max 2012!
afer reading this tutorial:
Animated_MD5_Models_in_JME.pdf
and using this exporter:
MD5.MAX.Exporter.For.Skin.Modifier.zip
and more good news!
the away3d 4 was reading the file and also displying it with lights cool!!
using this code (thanks you guys):
AssetLibrary.enableParser(MD5MeshParser); AssetLibrary.enableParser(MD5AnimParser); AssetLibrary.addEventListener(AssetEvent.ASSET_COMPLETE, onAssetComplete); AssetLibrary.load(new URLRequest("stuff/123.md5mesh"));
now the final part is to display and control the animation.
can you send me to a good tutorial for control the animation in the md5.
in the AssetEvent.ASSET_COMPLETE event i get 2 object
1 the mesh that i added to the scene
and 1 Skeleton Object that i guess it the animation object.
thanks….
|
|
YG, Newbie
Posted: 13 November 2011 10:12 PM Total Posts: 18
[ # 12 ]
thanks you all for your great help….
i right now learning this engine and you help me allot.
but i have a problem with the md2 and the md5 they don’t support simple move rotation transform frame by frame animation they good for skeletal animation.
now in 3d max (3ds) file format i see that the exporter are saving the animation data in the file in frame by frame.
if i open the “3ds” file in max i can see the timeline full with key frames.
but in the AssetEvent.ASSET_COMPLETE event the animation asset don’t appear.
don’t replay here i moving this question into new topic.
thanks!!!
|
ray10r, Newbie
Posted: 06 January 2012 03:29 PM Total Posts: 6
[ # 13 ]
I succeeded in playing MD5 for my character with bone animation. But things like clothes and fabrics don’t have bones( which cannot be exported from 3DMAX). I am trying to load them as MD2. Can anyone tell me if MD5 can support things like cloth and fabrics with out bones?
|