Incorrect Normals from ASE object

Hi,

I want to load some ASE models into my game, but they appear to be loading with incorrect normal information, as the screenshot below demonstrates. (The cylinder was created in 3D Studio Max)

http://bencoleman.co.uk/normals.jpg

I noticed that the world coords in 3D Studio have Z as the vertical axis. In Xith Y is the vertical axis (i.e. Xith is left handed and 3dStudio is right handed). I think this is the root of the problem, any ideas how to solve or get around this??? Surely I’m not the first person to have seen this?

I’ve tried swapping the Z and Y coords in the ASE file that hasn’t helped.

Cheers
Ben

A quick answer I just found…
Don’t use the ASE loader at all.
My objects load and render fine using the 3DS loader.

Must be a bug in the ASE loader.

File an issue with a small test case and an example object (.max and .ase format) and I’ll look into it :slight_smile:

Will.

Hi,

We had similar issue and after long investigation found that due to some (unknown) reasons Max is exporting normal transforms for some objects. These transforms somehow not applied to vertexes, but applied for normals, and ASE loader does not take care about these transforms.

The easy solution is to reset transform of the object in 3DS MAX before export, and after it works fine. My opinion that this is a problem in ASE exporter, or misunderstanding of ASE format.

Yuri

dont export smoothing

I’ve gone back to using ASE as I can not find a way to use sharedCopy with models loaded from 3DS, as the game uses ridiculous amounts of RAM without creating shared copies (see this http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=xith3d;action=display;num=1080392421 thread) But I’m still suffering with bad normals on my ASE models.

I’ve tried re-setting the transform, this hasn’t helped.
I can’t find any option to not export smoothing (I’m using 3D Studio MAX 6) with my model (see screen shot)

http://bencoleman.co.uk/temp/export.jpg

Any ideas ??? development my game is basically stopped as I can’t use either 3DS or ASE for my models!

I’ll post an example later, today

If you believe max is exporting the correct coordinates (any way to prove this?) then I’d suggest trying to tinker with the Ase loader, in particular the AseMesh class.

Have you tried using Yuri’s
convertMeshCoordinates option
?

Do you know of (or can you find) an open source ASE reader for any system (java or not) which does work as expected?

Will.

Doh I’m minutes too late! :slight_smile:
Yes I’ve just discovered the convertMeshCoordinates option on the ASEReader constructor - setting it to false works for me.

I have to rotate my object but thats no hassle as i was doing that for my 3DS models after importing.

Thanks for the help,

Glad you found a solution :slight_smile:

I have to rotate my models too. You can avoid this by “looking down Z” with your view however this is going against the grain and not worth the effort.

I recommend encapsulating the rotation TransformGroup inside another TransformGroup if you havn’t done it already, else you might get a nasty surprise if you call rotXYZ on it later in your code only to have your model flip back the wrong way :slight_smile:

Will.