Why I can't load .OBJ file which exported from 3dsmax?

37 views
Skip to first unread message

Sonic

unread,
Jul 25, 2008, 4:33:18 AM7/25/08
to away3d.dev
I'm following basic lesson3 (Lesson_Basic_03_Meshes.fla) . I found I
can't replace the turtle to another object. When I replace turtle.obj
to another .obj file which come from 3dsmax, it always return an
error.

TypeError: Error #1009:
at away3d.core.base::Face/get radius2()
at away3d.core.base::BaseMesh/rememberElementRadius()
at away3d.core.base::BaseMesh/addElement()
at away3d.core.base::Mesh/addFace()
at away3d.loaders::Obj/parseObj()
at away3d.loaders::Obj()
at away3d.loaders::Obj$/parse()
at away3d.loaders::Object3DLoader/onComplete()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()

It seems the obj file loader isn't compatible with 3dsmax, what can I
do with it?

I also wanted to export model in 3ds format, is there anyone could
show me a code sample of away3d.loaders.Max3DS?

Thanks in advance!

paullaster

unread,
Jul 25, 2008, 11:43:56 PM7/25/08
to away3d.dev
Make sure splines and other non mesh objects are not getting exported
in the scene. Everything needs to a Mesh. Not sure how the mesh is
built either but it might have some sort of geometry that doesn't
agree with the parser.

BOURNE 3D

unread,
Jul 26, 2008, 5:52:03 PM7/26/08
to away3d.dev
at away3d.loaders::Obj/parseObj()
at away3d.loaders::Obj()
at away3d.loaders::Obj$/parse()


Check what you are exporting and the setting carefully.

Sonic

unread,
Jul 27, 2008, 9:49:32 PM7/27/08
to away3d.dev
It's really weird! I open the turtel.obj in 3dsmax.
That is the obj file which included in the official lesson.
Then in 3dsmax, I exported it to a new obj file.
The new obj file can not be loaded in Away3D.

Any one knows why is that?

katopz

unread,
Jul 27, 2008, 11:56:35 PM7/27/08
to away3...@googlegroups.com
can you import obj from demo to max and then export without mod
if it not work plz try compare that 2 files (original/export) to see diff
and that's surely problem there somewhere in diff

btw, before doing this you've to make sure that original file work fine ;)

2008/7/28 Sonic <esoj...@gmail.com>

Sonic

unread,
Jul 29, 2008, 5:18:36 AM7/29/08
to away3d.dev
The original file works fine for sure. I compared it with the exported
file.
Huge differences between them. Is there any tips for exporting .obj
file in 3dsmax?

PLEASE HELP. :(


-------------- header - exported ----------------
# 3ds Max Wavefront OBJ Exporter v0.94b - (c)2007 guruware
# File Created: 29.07.2008 17:12:09

#
# object default
#

v 32.7637 -94.0957 -296.3535
v 21.5348 -109.4810 -258.4686
v 12.0542 -115.8685 -296.3535
v 21.5348 -83.9310 -258.4686
v 0.9482 -72.7528 -296.3535
---------------------------------------------------------

-------------- header - original ----------------
# Obj file Generated by Strata CX
# Vertices: 185
# Faces: 366
# UVs: 262
# Normals: 261
# Materials: 0

v 32.763741 -94.095695 -296.353516
v 21.534782 -109.481003 -258.468597
v 12.054155 -115.868515 -296.353516
v 21.534782 -83.930984 -258.468597
v 0.948191 -72.752846 -296.353516
----------------------------------------------------------
-------------- End of original file----------------
f 9/259/19 12/260/24 157/217/233
f 2/261/5 140/219/216 157/217/233
f 2/261/5 157/217/233 12/262/24
# End of File

-------------- End of exported file ----------------
f -177/-4 -174/-3 -29/-46
f -184/-2 -46/-44 -29/-46
f -184/-2 -29/-46 -174/-1
# 0 polygons - 366 triangles





On Jul 28, 11:56 am, katopz <kat...@gmail.com> wrote:
> can you import obj from demo to max and then export without mod
> if it not work plz try compare that 2 files (original/export) to see diff
> and that's surely problem there somewhere in diff
>
> btw, before doing this you've to make sure that original file work fine ;)
>
> 2008/7/28 Sonic <esojo...@gmail.com>

nathan

unread,
Jul 29, 2008, 7:22:36 AM7/29/08
to away3d.dev
Thats pretty much the story with file exporters in general, they
probably both work, but maybe just not with the away3d parsing.

Well thats my experience in the past anyway, two different plugins
could generate two dfiff files, some worked the same, some did not.
from memory there were a bunch of obj exporters for max, see if you
can find another obj plugin for max and try that.
> > katopzhttp://www.sleepydesign.com- Hide quoted text -
>
> - Show quoted text -

Fabrice

unread,
Jul 29, 2008, 7:28:43 AM7/29/08
to away3...@googlegroups.com
Hi Sonic,
Can you send me offline the exported obj file (or another one showing
the same problem)
or fill the bugreporter and paste the file content in there
so I can fixe the parser?

Fabrice

Fabrice

unread,
Jul 29, 2008, 7:31:46 AM7/29/08
to away3...@googlegroups.com
I recall this issue, the parser tries to access negative indexes...
It should be easy to fixe.
but I need a file to test...

Fabrice

Sonic

unread,
Jul 29, 2008, 9:19:58 PM7/29/08
to away3d.dev
Hi Fabrice,

Thanks for your reply!

I just uploaded my obj file here:
http://groups.google.com/group/away3d-dev/web/turtle3-OBJ-NotWorkInAway3D.rar
> >>> katopzhttp://www.sleepydesign.com-Hide quoted text -

Sonic

unread,
Jul 29, 2008, 9:44:18 PM7/29/08
to away3...@googlegroups.com
Thanks Nathan!

Which exporters are you using now?

The obj file from official lesson is generated by Strata CX.
But I'm still hesitating if I have to install a new program in my PC.

There are already over 200 softwares in my pc now.
--
Regards,
Ding Xuan (Sonic)
___________________________
UNICOM GLOBAL IT Ltd. co.

solo

unread,
Jul 31, 2008, 6:58:52 AM7/31/08
to away3d.dev
maybe you have problem with fliped faces and negative axis of object.
I have similar problem just like you and i solved it with:
1. create object in 3dmax and rotate it 180 deg. so for example roof
of the house would be down.
2. when you export it to obj in export options select "generate
materials" (something like that) it will generate mtl file also.

after that i loaded it in away3d with no problems.

tell me if you have problems after that, so i will take a look at my
code to see if i can help you more

sinisa
> > > > katopzhttp://www.sleepydesign.com-Hide quoted text -

Fabrice

unread,
Aug 3, 2008, 4:27:53 PM8/3/08
to away3...@googlegroups.com
I've added support for vertex negative reference as seen in this .obj
file.
I couldn't check uv's (no .mtl file provided) but followed same rule
as for vertexes. The geometry is now parsed and displayed as it should.

Since I can't generate this kind of file, please test it for me, if
the uv's are wrong, please provide me a file generate same way
with the companion .mtl file and I'll try fixe it.

Obj class is updated and in svn.

Fabrice

Sonic

unread,
Aug 4, 2008, 3:30:57 AM8/4/08
to away3...@googlegroups.com
Fabrice,

I just updated engine from svn. It works fine now!
Thank you sooo much!


FYI: My .obj file is generated by following steps:

Autodesk 3ds Max Design 2009 32-bit without any plugins
File -> export...
Then select "gw::OBJ-Exporter"
I chose Cinema4D preset, but presets are working similar.

Sonic

unread,
Aug 4, 2008, 3:43:36 AM8/4/08
to away3...@googlegroups.com
Solo,

May be you got the point about negative axis of object.

After Fabrice updated engine, my file works fine now.

Thanks for your suggestions.

Fabrice

unread,
Aug 4, 2008, 4:33:46 AM8/4/08
to away3...@googlegroups.com
The parser should now support a bunch of different obj exporters.
There is still an issue I want to fixe on .mtl encoding, try do it asap.

As about negative/reversed/inverted geometry/uv's, it's most of time a right to left handed issue.
We are looking at a general solution for this.

Fabrice
Reply all
Reply to author
Forward
0 new messages