jPCT-AE - a 3d engine for Android => Support => Topic started by: stownshend on October 03, 2011, 03:25:48 am

Title: 3DS Max & JPCT
Post by: stownshend on October 03, 2011, 03:25:48 am
Hi all,

I am coding in JPCT a game and I have a friend developing the models in 3DS Max, which we're exporting as the .3ds file format.

For the most part it works great, but sometimes when I import the models into JPCT they appear in unusual places.

From what I understand, whatever "world" position the models took up in 3DS Max, they should appear (although rotated to right hand notation) in the same world position in JPCT.

Most of the time this works fine. However (and I seem to remember it always happens when he has multiple objects in a single scene, and exports the objects separately) the objects will appear way off.

For example; One time we had a basic square tile model (5x5 plane) with a PNG texture image. In his project the tile was centred at 0,0,0 but when I imported it into JPCT it was at something bizarre like 278,-48,3. We never worked out why this happened, but he created a new project fresh and re-created it and it worked when he exported it as expected.

I'm 90% sure the problem is with his 3DS Max project/settings, but thought I'd post it here in the hope that someone else has had similar issues and might know if there is anything I can do at my end (or even any settings or hints for 3DS Max he could do) to stop this happening.

In the meantime we're looking at shifting to Blender. He's spent hours and hours on a level which contains 6 models all up, and when we import them they appear all over the place and are no longer aligned. Aligning them manually with translations myself would be painful, and from a theoretically point of view I need to know WHY these models are not importing in the same position as they are in their originating project.

Many thanks,

Title: Re: 3DS Max & JPCT
Post by: EgonOlsen on October 03, 2011, 11:34:54 am
As said several times before, jPCT's loaders are no scene but model loaders. They load a model's mesh data only, no rotations, translations etc (if the file format even supports it...3ds does in theory, but the documentation is lacking, so it's hardly possible to load all this correctly for each variant of the format). If the models are exported in a way that their object space matches untransformed world space, then they will be placed correctly. If not, then they won't.
Title: Re: 3DS Max & JPCT
Post by: stownshend on October 04, 2011, 08:17:16 am
Hi Egon, thanks for your help, and for your ongoing patience :)

For anyone else having the same issue:

We solved the problem by exporting in the .OBJ file format from 3DS Max instead of .3DS. When you export in this format you can define additional settings which allow you to strip out everything except the mesh data. I don't know the exact details but my colleague worked it out first attempt.

I found no difference handling OBJ models rather than 3DS ones so the impact to me was minimal.