Page 1 of 1

Pink Models?

Posted: Sun Dec 21, 2008 7:10 pm
by Buck1000
Hi, I'm new here, and I've just started using Irrlicht. I trying to make a simple FPS game to get to know the engine a little better, and am having some problems with loading weapons. I am using the code from the .irr file example to load my level. Now, I've gotten that working, but my problem is that all weapons that I load (and I geuss this means all models) show up tinted pink. With no texture, and lighting off, they are pure pink, and with a texture they are textured and tinted pink. Here is my weapon loading code -

Code: Select all

	//Weapons
	IAnimatedMesh* mp_m = smgr->getMesh(".//Media//Weapons//Gun.3ds");
	ITexture* mp_t = driver->getTexture(".//Media//Weapons//Gun.tga");
	
	if(mp_m && mp_t)
	{
		IAnimatedMeshSceneNode* mp = smgr->addAnimatedMeshSceneNode(mp_m);
		mp->setMaterialTexture(0,mp_t);
		mp->setMaterialFlag(EMF_LIGHTING, false);
		//mp->setScale(vector3df(200,200,200));
		mp->setParent(camera);
		mp->setPosition(vector3df(50.0f,-60.0f,90.0f));
	};
Any help would be appreciated. If you want, I can supply all of my code.

Posted: Sun Dec 21, 2008 8:11 pm
by Def5
What is your graphic card and which version of Irrlicht are you using?

Posted: Mon Dec 22, 2008 12:44 am
by Buck1000
The newest- 1.5, and I couldn't tell you my graphics card as Im not at my computer right now, but I do know it is NVIDIA Geforce.

Posted: Mon Dec 22, 2008 9:06 am
by JP
did you make the gun mesh? Does the gun mesh possibly have pink material settings in it?

Posted: Mon Dec 22, 2008 4:36 pm
by Buck1000
No I didn't make it, but I have used it before, and it always shows up correctly.

Can this be caused by me using a .irr file for my level? Maybe I stored some data into it by accident through IrrEdit telling it to tint everything pink? Since when I turn the lighting off (with no texture), instead of showing up as white it shows up as pink. Maybe I messed with the Ambient light?

Posted: Mon Dec 22, 2008 4:39 pm
by JP
yup could certainly be a setting in the .irr file.. maybe you messed around with the node's material so its colour is pink or it could be the lighting of the whole scene or the lighting on the specific node.

Posted: Mon Dec 22, 2008 11:19 pm
by zillion42
pink vertex color ?

Posted: Tue Dec 23, 2008 3:14 am
by Buck1000
Yup, was in the .irr filr XD

Thanks for the help!

And not vertex, but texture color.