[MacOS X] 3D model loaders 1.1

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
jonasled
Posts: 34
Joined: Sat Aug 26, 2006 5:08 pm
Location: Sweden
Contact:

[MacOS X] 3D model loaders 1.1

Post by jonasled »

I'm using the SVN version 1.1. In fact, almost none of my models load at all on my PPC Mac. b3d crashes as reported elsewhere, but none of my .x models work either. They all work in e.g. Blitz3D, so I would assume that they are not to blame. This is what Irrlicht says:

Code: Select all

Unknown data object in x file: Header
Unknown data object in material list in x file: {dx_material_4}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_4}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_5}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_5}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_1}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_5}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_5}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_5}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_3}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_5}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_5}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_5}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unknown data object in material list in x file: {dx_material_2}
Unknown data object in material list in x file: MeshTextureCoords
Unexpected ending found in Frame in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Mesh without material found in x file.
Loaded mesh: ../../media/blacksmiths/blacksmiths.x
I can load .3ds models, but some wood textures on a house are far too red. Again when I load them in Blitz3D they look just right, so I assume that the 3D model and texture file are ok.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Are these .x models binary? I'd expect at least the ascii versions to work, since there are no endian issues with ascii formats. Which format are your textures in? There are also endian issues with textures, but some are already solved, while some other are just not yet using an endian aware loader.
borky89
Posts: 13
Joined: Wed Aug 23, 2006 4:07 pm
Location: Switzerland

Post by borky89 »

Are you sure, you're using the latest svn version? 1.1 doesn't work on a mac.

If you want you could send me a sample and I could try to look into it. (Or you do it yourself.) Endian issues shouldn't be that severe in a mesh loader.

Georg
jonasled
Posts: 34
Joined: Sat Aug 26, 2006 5:08 pm
Location: Sweden
Contact:

Post by jonasled »

hybrid wrote:Are these .x models binary? I'd expect at least the ascii versions to work, since there are no endian issues with ascii formats.
The .x files are ascii as far as I can see, so yes there should be no endian issues. I just found a post in the forum that might explain my problem:

http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=14749
hybrid wrote:Which format are your textures in? There are also endian issues with textures, but some are already solved, while some other are just not yet using an endian aware loader.
Textures are jpg, but I have tested to load the .3ds model with the texture converted to png as well.
borky89 wrote:Are you sure, you're using the latest svn version? 1.1 doesn't work on a mac.
I checked out rev 196, when things did not work, but now I notice that I might have mixed the .a files up. I might have linked with an older rev. Clumsy me! I'll have to do some more testing.
borky89 wrote:If you want you could send me a sample and I could try to look into it. (Or you do it yourself.) Endian issues shouldn't be that severe in a mesh loader.
I'm basically using the 01.HelloWorld example to debug this, so the code is most likely not the issue. The models I use are licensed from www.arteria-gaming.com, so unfortunately I can't share them for testing.

Thanks for all the help, both of you!

Jonas
jonasled
Posts: 34
Joined: Sat Aug 26, 2006 5:08 pm
Location: Sweden
Contact:

More problems

Post by jonasled »

Strange, I have now made sure that I link against the correct .a file. There is no improvement in rev 196. On the contrary the wooden textures (.jpg) that where colored in red are now black.

Here is a link to the (free) model that I'm experimenting with:

http://www.turbosquid.com/FullPreview/I ... 992/blFP/1

There is also some problem with polygons not being sorted correctly. You can see this when rotating the model. Polygons that should not be visible are drawn in front of other polygons closer to the viewer. They sort of break up and pop in and out as you rotate. This happens with all 3ds models that I load (I can't load any other models) ;). Below the blacksmith model from arteria.

Image
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Please try latest SVN revisions after 200. Major endian changes were applied. At least .x, .3ds, and all image formats shoudl work correctly. I did test it on Sparc/Solaris only, though.
jonasled
Posts: 34
Joined: Sat Aug 26, 2006 5:08 pm
Location: Sweden
Contact:

Post by jonasled »

hybrid wrote:Please try latest SVN revisions after 200. Major endian changes were applied. At least .x, .3ds, and all image formats shoudl work correctly. I did test it on Sparc/Solaris only, though.
Thanks! I checked it out and compiled it. There is a slight improvement. I can now load at least one .3ds model that didn't load before. The .x model shown above in the screenshot still doesn't load at all (the model actually shown in the screenshot is the .3ds version). .3ds models still doesn't load correctly and polygons are sorted or displayed incorrectly. It unfortunately seems like there still has to be some major changes to make Irrlicht work at all on PPC Macs. :cry: It seems like such a fine engine, so it is a real pitty I can't use it for our game yet.
jonasled
Posts: 34
Joined: Sat Aug 26, 2006 5:08 pm
Location: Sweden
Contact:

Some screenshots

Post by jonasled »

Image

The above free model, which I now use for debugging can be downloaded from:
http://www.turbosquid.com/FullPreview/I ... 992/blFP/1

A) SVN revision 205. Added a fly cricle light. It doesn't show up that well in a static screenshot, but the polygons light up strange. There is no other light source. The light is colored, but a lot of polygons show up as if the light was white and I think you can see that some polygons that are in the shadow are lit up.

B) SVN revision 205. The door, the barrel and other surfaces that use the wood texture are black. I guess they are not correctly lit or something.

C) SVN revision 205. Looking at the model from the inside. The polygons that are visible from the inside are the ones that flicker and are not drawn correctly when looking at the model from the outside.

D) Not sure what revision this is, but it is earlier than 198. Here you can see that the surfaces that are black in revision 198 and later turn up colored in red. It actually looks like other surfaces are also slightly discolored. No light added.

I have been able to load and display this model correctly in other 3D engines, but that doesn't rule out the possibility that there is something wrong with it. However, the same thing happens with my other .3ds models. I actually think that there is some problem with room.3ds from SpecialFX example on PPC, but it is hard to say because it is such a simple model.

Jonas
jonasled
Posts: 34
Joined: Sat Aug 26, 2006 5:08 pm
Location: Sweden
Contact:

ms3d works

Post by jonasled »

I can add that the above .3ds and .x models have the same problems under Windows. However, if I convert it to .ms3d (binary) it works perfectly under Windows, but probably due to endian issues .ms3d files doesn't load under MacOS X (PPC). So there is still a few issues with the loaders, but when that is solved 1.1 should be good to go.

Code: Select all

[Session started at 2006-09-16 19:10:01 +0200.]
Irrlicht Engine version 1.1
Darwin Kernel Version 8.7.0: Fri May 26 15:20:53 PDT 2006; root:xnu-792.6.76.obj~1/RELEASE_PPC
Using renderer: OpenGL 1.1
NVIDIA GeForce4 MX OpenGL Engine: NVIDIA Corporation
OpenGL driver version is not 1.2 or better.
Multittexturing active.
Loaded texture: #DefaultFont
Only Milkshape3D version 1.3 and 1.4 is supported. Loading failed: ../../media/fw12_3ds/fachwerk12_LOWPOLY_TS.ms3d
Could not load mesh, file format seems to be unsupported: ../../media/fw12_3ds/fachwerk12_LOWPOLY_TS.ms3d
Post Reply