Layered Textures

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
Dukdalf
Posts: 24
Joined: Thu Jun 21, 2007 9:48 am

Layered Textures

Post by Dukdalf »

Hi guys,

I require many different cubes, and I thought that using layers of transparant textures would prevent me to make many different textures.

But i seem to not be able to use textures over each other. I do use different layers, but only the 0th layer displays.

Code: Select all

player->setMaterialFlag(EMF_LIGHTING, false);
player->setPosition(core::vector3df(pos,151.f,pos));
player->setScale(core::vector3df(-150.f,150.f,150.f));
player->setMaterialType(EMT_TRANSPARENT_ALPHA_CHANNEL);
player->setMaterialTexture( 2, driver->getTexture("media/teamdarkred.png") );	//background
player->setMaterialTexture( 1, driver->getTexture("media/blueedge.png") );		//edge color
player->setMaterialTexture( 0, driver->getTexture("media/number1.png") );		//number
Thanks in advance!
Just fooling around abit!
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

The EMT_TRANSPARENT_ALPHA_CHANNEL material only uses the first material texture. You need to use or make a material type that supports multiple texture layers and transparency.

Travis
Dukdalf
Posts: 24
Joined: Thu Jun 21, 2007 9:48 am

Post by Dukdalf »

hmm, that is way out of my league at this moment!

so that will have to wait untill I am more used to C++ and irrlicht!

THanks anyways.
Just fooling around abit!
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

I am using Irrlicht for seweral years now and I would be realy happy if I could be able to do what you try to do in your code. That is blending few textures on mesh. To accomplish what you want, appart from C++ and Irrlicht you would need knoweledge of shaders and DirectX or OpenGL.

There are seweral material types already in Irrlicht but none works with more than 2 textures so far.

Look at E_MATERIAL_TYPE enumeration in API, there are all materials and desciptions of what they do.
Dukdalf
Posts: 24
Joined: Thu Jun 21, 2007 9:48 am

Post by Dukdalf »

Thanks for the info,

I will skip this solution then.
Just fooling around abit!
Post Reply