Model Textures not Displaying ... [Solved]

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Model Textures not Displaying ... [Solved]

Post by krama757 »

For some odd reason none of my models show textures in the Irrlicht versions past 1.1. Here is proof that I'm not doing anything dumb :)

In the meshviewer:
Irrlicht 0.12:
Image

Irrlicht 1.1 onwards:
Image

The console states that it loaded the texture, but doesnt display it....

Code: Select all

Please select the driver you want for this example:
 (a) Direct3D 9.0c
 (b) Direct3D 8.1
 (c) OpenGL 1.5
 (d) Software Renderer
 (e) Apfelbaum Software Renderer
 (f) NullDevice
 (otherKey) exit

a
Irrlicht Engine version 1.1
Microsoft Windows XP Professional Service Pack 2 (Build 2600)
Using renderer: Direct3D 9.0
ATI MOBILITY RADEON X700 ati2dvag.dll 6.14.10.6561
Loaded texture: #DefaultFont
Loaded texture: ../../media/fonthaettenschweiler.bmp
Loaded texture: ../../media/open.bmp
Loaded texture: ../../media/help.bmp
Loaded texture: ../../media/tools.bmp
Loaded texture: ../../media/axe.jpg
Loaded texture: ../../media/dwarf.jpg
Could not open file of texture: ../../media/dwarf2.jpg
Could not open file of texture: dwarf2.jpg
Loaded mesh: ../../media/dwarf.x
Loaded texture: ../../media/irrlicht2_bk.jpg
Loaded texture: ../../media/irrlicht2_ft.jpg
Loaded texture: ../../media/irrlicht2_rt.jpg
Loaded texture: ../../media/irrlicht2_lf.jpg
Loaded texture: ../../media/irrlicht2_dn.jpg
Loaded texture: ../../media/irrlicht2_up.jpg
Loaded texture: ../../media/irrlichtlogoaligned.jpg
Loaded texture: house1.jpg
Loaded mesh: D:\bleh\House 4/House_4.3ds
Last edited by krama757 on Thu Mar 29, 2007 1:59 am, edited 1 time in total.
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post by Luke »

From memory there were some lighting changes,

make sure it's not just the fact that the mesh is not lit, therefor completely black
Lynxeye
Posts: 17
Joined: Thu Jul 27, 2006 12:19 pm
Location: Germany
Contact:

Post by Lynxeye »

Yeah! For me it looks like you used ambient light. Did you notice that the ambient light trigger has chanced its position to an other interface?
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Post by krama757 »

Well, even with lighting disabled the models look like that.

The pictures above are from the meshviewer...which doenst include any lighting of any sort.

Here are some relevant bits of code that I used in my application:

Code: Select all

//Describes the light type
ILightSceneNode* light1 = irrSceneMan->addLightSceneNode(0, core::vector3df(0,300,0), video::SColorf(1.0f, 1.0f, 1.0f), 10000.0);


//Later I load the models
pObjectNode[placedObject]->setVisible(true);
			pObjectNode[placedObject]->setMaterialFlag(EMF_LIGHTING, false);
			pObjectNode[placedObject]->setMaterialFlag(EMF_NORMALIZE_NORMALS, true);
And the objects look like this:
Image

I cant figure out how come the .X model (character) is properly lit and has textures and the other models are not.
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post by Luke »

even with lighting disabled the mesh might it not be lit based on the EmissiveColor of the materials.

x meshes, I think set the EmissiveColor to 50% (I'm not sure it does this with all meshes)
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Post by krama757 »

Hmm, seems like it was a combination of emissive and ambient color.

I imported into irredit and fiddled around till I found a combination that worked.

Thanks a lot for the help.
Post Reply