Woot! I went through the first few tutorials, and am now proud owner of an amateurishly crafted spaceship that I can walk through with simple collision detection!
Now I have lots of questions:
- My model is an OBJ file + MTL file (+ some JPGs) -- is that okay or would you recommend a better format?
- How do I make Irrlicht load the MTL and textures? At the moment, everything is rendered in neutral grayscales. I copied all the texture files into the project and don't get any errors, I just didn't find any command to load MTL. The tutorials didn't cover textures, but the screenshots implied it would "just work" with obj files too.
- Related question: I know how to load a texture (e.g. PNG, JPG) and apply it to the node. But I don't want the whole node (spaceship) to have the same texture... In the mesh editor, walls, floor and furniture had different textures, glass panes were transparent, etc. What's the recommended way to keep the materials/textures the same as they were exported?
- And last but not least: Why are left and right mirrored!?
Please search for a recent thread which covered exactly this topic. It's basically as follows: The obj file has to reference the mtl file with a proper statement. then the complete file is loaded and material statements in the obj file can use all materials defined in the loaded mtl files. So it's really automatically done for you if your files are ok.
Materials are kept as defined in those files, so transparency and different textures should show up ok.
And left and right inversion might be due to left-handed or right-handed coordinate systems (or a bug )
I should learn to use the search function properly. Seems to be a frequently asked question. Here is the answer, how to download and patch an MTL loader into Irrlicht: http://gdlib.net/index.php?name=Downloa ... ails&id=72
bitplane wrote:there is no need to add the mtl loader as a patch now, as it has been part of irrlicht for some time
But appearently not in version 1.0, which is easier to install and use on MacOS. Although I have to admit that I don't know how difficult it is to apply the same changes to 1.1 that were applied to 1.0 to make 1.1 compile on MacOS?