Loading OBJ/3DS

Software: Away3D 4.x

ASWC, Member
Posted: 02 April 2012 05:38 PM   Total Posts: 76

I can load and use all OBJ/3DS 3D model coming from all tutorials and framework examples but when I try exporting my own OBJ/3DS using Maya 2012 none of those object load properly. I mostly get error of that type:
Error #1125: The index 4294958452 is out of range 8844.
parsers/OBJParser.as:443]
I get rid of the mtl line so I don’t get the stream error but how to fix the range error problem? What settings should I use in Maya to export a correct file?
Thx in advance.

   

Avatar
Fabrice Closier, Administrator
Posted: 02 April 2012 07:05 PM   Total Posts: 1265   [ # 1 ]

Try to load it in Prefab.
if you get errors or warnings, look under menu windows/process log.

If fails there too, please send me offline your obj so I can look at it.

 

   

ASWC, Member
Posted: 02 April 2012 07:45 PM   Total Posts: 76   [ # 2 ]

So my code is working great with all obj/3ds coming from tutorials and away3d examples. 3D models are loaded, texture mapped and it all looks great. Now since I couldn’t get any 3ds/obj coming from 3Dmax and Maya 2012 to work the same way I loaded in Maya 2012 one the head.obj coming from the away3d examples and exported it back to obj. Got it to load in prefab but got this when loading it in code:
RangeError: Error #3669: Bad input size.
at flash.display3D::VertexBuffer3D/uploadFromVector()

Some of the 3ds/obj exported from 3dmax are loading in prefab, some don’t with geometry errors# 2032. Log:
<< ERROR Loading 3ds file

If I get one 3DS loading in prefab and then try to load in code I get this:
TypeError: Error #2007: Parameter data must be non-null.
at flash.display3D::VertexBuffer3D/uploadFromVector()
I also get a few:
RangeError: Error #1125: The index 4294966878 is out of range 418.
at away3d.loaders.parsers::OBJParser/translateVertexData()[/Users/robbateman/Documents/Adobe Flash Builder 4.6/away3d-core-fp11/src/away3d/loaders/parsers/OBJParser.as:443]

I attached the head.obj file loaded in Maya 2012 and saved back to obj (mtl line is removed).

 

File Attachments
head_MayaOBJ.zip  (File Size: 567KB - Downloads: 187)
   

Avatar
Fabrice Closier, Administrator
Posted: 02 April 2012 08:04 PM   Total Posts: 1265   [ # 3 ]

Just tried it and it loads with no issues… Are you running the latest away4 from github?

—> /Users/robbateman/  ?? :D

 

   

ASWC, Member
Posted: 02 April 2012 08:26 PM   Total Posts: 76   [ # 4 ]

yep that took care of it. So I’m able to load the head.obj in Maya and then save it back as a new file and load it. Now for any new Maya file I create I still run into problem mostly that kind:

Error #1125: The index 4294963385 is out of range 3915.
at away3d.loaders.parsers::OBJParser/translateVertexData()[E:\ASWCProjects\away3d-examples-fp11\src\away3d\loaders\parsers\OBJParser.as:448]

Any idea?

 

   

Avatar
Fabrice Closier, Administrator
Posted: 03 April 2012 07:55 AM   Total Posts: 1265   [ # 5 ]

I can’t really say unless you provide me an obj that fails.

 

   

ASWC, Member
Posted: 03 April 2012 08:18 AM   Total Posts: 76   [ # 6 ]

that one loads fine in prefab expect that nothing shows up and when loaded in code it gives me that error:

RangeErrorError #1125: The index 4294966878 is out of range 418.
 
at away3d.loaders.parsers::OBJParser/translateVertexData()[E:\ASWCProjects\away3d-examples-fp11\src\away3d\loaders\parsers\OBJParser.as:448] 

 

File Attachments
Tree3d.zip  (File Size: 21KB - Downloads: 167)
   

ASWC, Member
Posted: 03 April 2012 08:33 AM   Total Posts: 76   [ # 7 ]

here’s what’s in the FaceData:

TRACER REVEAL OUTPUT:
------------
Object Target[object FaceData]
------------
Object Dynamic Property List: 
------------
------------
Object Property List: 
------------
Public var: 
"uvIndices"Current value4294966908,4294966909,4294966930,4294966931
Public var: "vertexIndices"Current value4294966878,4294966879,4294966900,4294966901
Public var: "indexIds"Current value: -418/-388/-839,-417/-387/-838,-396/-366/-837,-395/-365/-836
Public var: "normalIndices"Current value4294966457,4294966458,4294966459,4294966460
/////////////// 

obviously all uint got set to MAX_UINT cos they got a negative value somewhere.

 

   

ASWC, Member
Posted: 03 April 2012 08:44 AM   Total Posts: 76   [ # 8 ]

ok so that’s it, the parser can only work with facedata unsigned. Because what I save with Maya 2012 gets all facedata with negative number the OBJParser can’t load it. I’m not too familiar with Maya 2012, how do I make it output only positive number?

 

   
   
‹‹ how to learn away3d?

X

Away3D Forum

Member Login

Username

Password

Remember_me



X