Bump mapped materials and transparent materials

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
StickyBit
Posts: 94
Joined: Mon Jul 05, 2004 3:40 am
Location: Sønderup, Denmark
Contact:

Bump mapped materials and transparent materials

Post by StickyBit »

Hi Guys

I´m trying to display a 3DS mesh which has a bumpmapped surface and some transparent glass - which i made using Anim8or. As you can se, the model renders fine with bumpmapped surface and allmost transparent glass in Anim8or, but the ingame result is quite different:

Image Image

This is the code for loading the mesh:

Code: Select all

irr::scene::IAnimatedMesh* mesh = smgr->getMesh("lamp.3ds");
irr::scene::ISceneNode* node = smgr->addOctTreeSceneNode(mesh);

.. which is quite simple (perhaps to simple?). What must I do in order to display the model like the Anim8or preview?

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

Post by hybrid »

I'm not sure if bump mapped materials are correctly working with 3ds, but transparent materials should. If you can upload the mesh somewhere I can try to check the loader.
StickyBit
Posts: 94
Joined: Mon Jul 05, 2004 3:40 am
Location: Sønderup, Denmark
Contact:

Post by StickyBit »

Sure thing. Here is the model: Lamp.rar

Hybrid: Thanks for trying to help me out. :-)

Everyone: The model is now in the public domain. Feel free to use it however you like. My only request is that you, in this thread, share the code displaying the lamp, so others (including me) can see how it´s done.

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

Post by hybrid »

Ok, transparency is indeed working. The texture coords might be not as expected such that the transparent texture is looking weird. However, you should put some more vertices to the inside of the lamp, otherwise the background is shining through the solid parts (due to backface culling). I still have to look into the bump mapping support.
Post Reply