Pink Models?

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
Buck1000
Posts: 93
Joined: Sun Dec 14, 2008 8:02 pm
Location: Seattle, WA

Pink Models?

Post 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.
Def5
Posts: 21
Joined: Thu Nov 27, 2008 7:50 pm

Post by Def5 »

What is your graphic card and which version of Irrlicht are you using?
Buck1000
Posts: 93
Joined: Sun Dec 14, 2008 8:02 pm
Location: Seattle, WA

Post 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.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

did you make the gun mesh? Does the gun mesh possibly have pink material settings in it?
Image Image Image
Buck1000
Posts: 93
Joined: Sun Dec 14, 2008 8:02 pm
Location: Seattle, WA

Post 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?
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post 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.
Image Image Image
zillion42
Posts: 324
Joined: Wed Aug 29, 2007 12:32 am
Location: Hamburg, Germany

Post by zillion42 »

pink vertex color ?
Buck1000
Posts: 93
Joined: Sun Dec 14, 2008 8:02 pm
Location: Seattle, WA

Post by Buck1000 »

Yup, was in the .irr filr XD

Thanks for the help!

And not vertex, but texture color.
Post Reply