Textures not showing up correctly in Irrlicht

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
MKiG
Posts: 9
Joined: Sun Oct 29, 2006 3:55 pm

Textures not showing up correctly in Irrlicht

Post by MKiG »

Hi everyone,

I feel like a complete idiot as I used to be able to program very well in Irrlicht, but I gave up about a year ago to concentrate on AS and A levels and now am having lots of difficulties picking it back up.

My main issue is that of texturing. Basically I've created a model of a ship in Cinema 4D and then given it a UV texture. When I then open the .3ds file in both Cinema 4D and Blender, it shows up perfectly, but I cannot get it to work in Irrlicht.

The only way I've found to get it to work is by using parallax bump mapping, but that ignores my UV co-ordinates completely.

Here is the stuff from Terminal:

Code: Select all

Irrlicht Engine version 1.4
Darwin Kernel Version 9.3.0: Fri May 23 00:51:20 PDT 2008; root:xnu-1228.5.18~1/RELEASE_PPC
Using renderer: OpenGL 2.0
ATI Radeon 9550 OpenGL Engine: ATI Technologies Inc.
OpenGL driver version is 1.2 or better.
GLSL version: 1.3
Could not open file of texture: Plane.jpg
Loaded texture: media/Plane.jpg
Found no matching material for Group in 3ds file.
Loaded mesh: media/shuttle.3ds
So for some reason it can't find my jpeg... which is in the same directory as the mesh. But then it can load it...but doesn't attach it.

Can anyone lend a hand?
Image
renegadeandy
Posts: 122
Joined: Sun May 25, 2008 11:14 pm
Location: Scotland
Contact:

Post by renegadeandy »

Paste the portion of code where you create the object and set its texure
MKiG
Posts: 9
Joined: Sun Oct 29, 2006 3:55 pm

Post by MKiG »

Ah sorry about that, here it is:

Code: Select all

	scene::ISceneNode* node = scenem->addAnimatedMeshSceneNode(scenem->getMesh("media/shuttle.3ds"));
	
	if (node)
	{
		node->setMaterialFlag(video::EMF_LIGHTING, true);
		node->setMaterialTexture(0, driver->getTexture("media/plane.jpg"));
		node->setPosition(core::vector3df(0,-5,15));
		node->setScale(core::vector3df(0.5,0.5,0.5));
		node->setRotation(core::vector3df(0,180,0));

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

Post by hybrid »

The first warning for the jpeg is just because it just tries a different location first.
It could be that there's a mismatch in the materials. Can you upload the mesh and the texture somewhere for me to test it?
MKiG
Posts: 9
Joined: Sun Oct 29, 2006 3:55 pm

Post by MKiG »

Sure thing:
http://download.yousendit.com/3BA026A20492E5B1

The model and texture are in there. Both are still a work in progress haha :D
Image
Post Reply