Unable to parse 3DS files

Software: Away3D 4.x

Avatar
Choons, Sr. Member
Posted: 09 October 2011 01:40 AM   Total Posts: 281   [ # 16 ]

have any of the devs had a chance to verify/dispute this problem? 3DS is arguably the most useful export format Away3D 4.0 uses so it seems like it’d be a priority to have working

   

Alex Bogartz, Sr. Member
Posted: 09 October 2011 01:53 AM   Total Posts: 216   [ # 17 ]

Choons, why is 3DS the most useful format, in your opinion?  I’m exporting all static objects as .obj and all animated ones as .md5.  Is this less optimal than .3ds?

   

Avatar
80prozent, Sr. Member
Posted: 09 October 2011 02:23 AM   Total Posts: 430   [ # 18 ]

hi

3ds is better than obj because of filesize. check the both files in the examples:

head.obj = 1.4 mb
soldier_ant.obj = 340kb

but both contain nearly same amount of data.

richard showed at max some benchmarks about this topic.
all current available formats needs to be more or less converted while importing into away3d. awd2 will provide the data even more compressed than 3ds and in the way away3d excpects it. so its going to be much faster to load and much faster to import.

i think our life will be much easier when awd2 is ready.
specially when it can handle skeleton-animation smile

i do not like obj 3ds or md5.

i liked to use collada in away3.5, but i can see why the devs focus on awd2.

 Signature 

sorry…i hope my actionscript is better than my english…

   

Avatar
Choons, Sr. Member
Posted: 09 October 2011 02:31 AM   Total Posts: 281   [ # 19 ]

yeah file size/bandwidth & parsing time is why I say that. Obviously, it’s only for static objects, and we need a similar binary format for animated objects. AWD2 will be great for that when it’s ready, but in the mean time I’d really appreciate if a dev would verify if they are seeing the same problem with 3DS as noted here

   

Richard Olsson, Administrator
Posted: 12 October 2011 04:20 PM   Total Posts: 1192   [ # 20 ]

A moment ago I pushed a new 3DS parser which was rewritten from scratch, and will hopefully fix all the problems that the old one had. I have tested it with a number of 3DS models that were sent to me over the past couple of days, as well as fresh ones from Blender and Cinema4D. Please try again with this latest version, and file a new issue report (attaching, or linking to files to reproduce) if the problem persists.

The event order problem (RESOURCE_COMPLETE sometimes firing before all ASSET_COMPLETE events have fired) and the URL resolve problem (with the leading /) should have been fixed as well. Please have a look.


However, the currentTarget==null issue described here is incredibly weird. Flash Player should never let currentTarget be null, since currentTarget is set internally by the EventDispatcher and is read-only to all ActionScript code. Please elaborate on this.

   

Avatar
Choons, Sr. Member
Posted: 12 October 2011 05:55 PM   Total Posts: 281   [ # 21 ]

Hi Richard, sounds like you put a lot of work in. I just tried it out and while my models are now showing up, their orientation is different than before. Are the axes different?

   

Richard Olsson, Administrator
Posted: 12 October 2011 06:37 PM   Total Posts: 1192   [ # 22 ]

Hey, thanks for checking. Can you please send me the model and I’ll have a look!

   

wagster, Member
Posted: 12 October 2011 09:50 PM   Total Posts: 68   [ # 23 ]

Ran a quick test here. Seems perfect and does what it says on the tin.  I have a day scheduled on the Away3D project tomorrow, I’ll check it properly then.  Nice work.

   

Bill2Molehill, Newbie
Posted: 14 October 2011 11:02 AM   Total Posts: 4   [ # 24 ]

mark, i encountered this problem today.

   

Richard Olsson, Administrator
Posted: 14 October 2011 12:00 PM   Total Posts: 1192   [ # 25 ]

Bill2Molehill: What problem? Please elaborate, as well as send me any files to reproduce. Do you have the latest version of Away3D from GitHub?

   

wagster, Member
Posted: 14 October 2011 09:06 PM   Total Posts: 68   [ # 26 ]

And who is Mark?

   

fabrice wolf, Newbie
Posted: 16 October 2011 04:31 PM   Total Posts: 2   [ # 27 ]

Hi
Any updates about this subjet ?
I had the same problem. What is strange is, that using loader3D ou assetLibrary, le texture jpeg is well loaded, meanwhile the mesh itself doesn’t load at all.
I hav tried many ‘solutions’ :
1st : loading the texture then the 3ds file in assetLibrary. The result was that the jpeg delcared in 3ds file as texute was loaded 2 times, and the mesh didn’t loaded.
2nd : i tried just to load the .3ds file. What is strange is that the texture has been well loaded (even if not callled anymwhere except in the .3ds itself), but it appears in the assetcomplete event for the texture.
3rd :  i did the the same with loader3D, and the same, the UVMapping texture file is loaded, not the mesh.
Here is part of my script :

private function loadObjects():void
  {
   
//var context:AssetLoaderContext = new AssetLoaderContext();
   
var loader:Loader3D = new Loader3D();
   
loader.addEventListener(AssetEvent.ASSET_COMPLETEonAssetComplete);
   
loader.load(new URLRequest("assets/test/ailes.3ds"),new Max3DSParser());
   
this.scene.addChild(loader);
  
  
}
  
  
  
  
private function onAssetComplete(event:AssetEvent):void
  {
   trace
("on asset loaded "+event.asset.name+" type="+event.asset.assetType);
   switch (
event.asset.assetType{
    
case AssetType.MESH :
     
trace("asset loaded mesh "+event.asset.name);
     
mesh event.asset as Mesh;
     
mesh.castsShadows true;
     
mesh.material material;
     
     break
    case 
AssetType.BITMAP :
     var 
bmp:BitmapDataAsset event.asset as BitmapDataAsset;
     
trace("material info"+bmp.name);
     
material = new BitmapMaterial();
     
material.bitmapData bmp.bitmapData;
     
material.shadowMethod = new FilteredShadowMapMethod(this.light);
     
material.lights [this.light];
     
material.gloss 30;
     
material.specular 1;
     
material.ambientColor 0x303040;
     
material.ambient 1;
     break;
    default:
     
     break;
   
}

  } 

Do you think it’s because of the Max3DSParser problem or because of anything else ? I shal say that it’s really very diffrent from away3D 3.6, ad that i have huge difficulties to understand how loading and managing external assets works in 4.0.
in 3.6, i was using texturequeue to push all my assets (texture, normalmaps), and once i knew everything was well loaded, i loaded and builded the meshes and the ObjectContainers on my scene. The data came from an XML. And was was working great.
Any helps welcome !!

   

wagster, Member
Posted: 16 October 2011 05:13 PM   Total Posts: 68   [ # 28 ]

As far as I’m aware, all the issues with the 3ds parser have been fixed by Richard a few days ago.  Make sure you’re using the most recent version off Github.

If you’re having trouble with the AssetLibrary- read this

http://away3d-dev.googlegroups.com/attach/8cfd22f346426ad5/LoadingInAway4.pdf?view=1&part=2&hl=en

and this

http://groups.google.com/group/away3d-dev/browse_thread/thread/280917b456cf4bd1?pli=1

It’s a pretty good explanation of a very natty feature!

   

fabrice wolf, Newbie
Posted: 16 October 2011 09:26 PM   Total Posts: 2   [ # 29 ]

Great !!
it seems to be exactly what i was looking for.
Time to have headache smile
Thanks a lot again Wagster !

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X