Texture issues with .3ds files

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
Wiz
Posts: 7
Joined: Sat May 20, 2006 8:22 pm

Texture issues with .3ds files

Post by Wiz »

Ever since irrlicht 1.1 I've been experiencing a total lack of textures on .3ds-loaded objects that were fine in 1.0. I was hoping 1.2 would fix this but it does not.

Example model: model.3ds located in ..\data\models\1\ from the binaries with the texture water.jpg located in the same folder.
Code snippet taken from source:

Code: Select all

IAnimatedMesh* mesh = co->GetSMGR()->getMesh(GetObjectPath("model.3ds",get_id));
	IAnimatedMeshSceneNode* node = co->GetSMGR()->addAnimatedMeshSceneNode(mesh);
	if (node)
	{
		//node->setMaterialFlag(video::EMF_LIGHTING,true);
		node->setMaterialFlag(video::EMF_FOG_ENABLE,true);
		node->setPosition(core::vector3df(so->x,so->z,so->y));
		node->setScale(core::vector3df(so->size,so->size,so->size));
		node->setRotation(core::vector3df(0,so->heading,0));
	}
Console tells me:
"Could not open file of texture: WATER.JPG"
"Loaded texture: ..\data\models\1\WATER.JPG"
"Loaded mesh: ..\data\models\1\model.3ds"

The first would be the check for if the model is in the local folder failing, but the second obviously works, so why aren't the textures showing up?

I have no problem with textures from .ms3d models using the exact same code.
Wiz
Posts: 7
Joined: Sat May 20, 2006 8:22 pm

Post by Wiz »

Problem solved, turned out to be an issue with lighting.
creineq
Posts: 2
Joined: Tue Dec 12, 2006 3:34 am

Face same probs

Post by creineq »

How u solve it? can u explain it in details
Wiz
Posts: 7
Joined: Sat May 20, 2006 8:22 pm

Post by Wiz »

The way lightsources operate apparently changed in 1.1, and my old lightsources were so bright that they turned everything white.

I turned off the lighting flag until I can get the new lightsources figured out, simply enough.
Post Reply