Page 1 of 1

Transparent Materials and Lighting

Posted: Wed Jul 14, 2004 12:56 pm
by Trip42
Okay...

I've got an environment made up of several models. I've found that models with a material type of EMT_TRANSPARENT_ALPHA_CHANNEL don't seem to respond to lights. They have full brightness regardless of the number/size of lights in the environment.

For example if I create a model with the EMT_TRANSPARENT_ALPHA_CHANNEL it's visible without adding any lights. If this material type is not set the model does not show up.

How do I get all of these models to respond correctly to lights.

-Brian

Posted: Wed Jul 14, 2004 8:36 pm
by thesmileman
I would imagine it is just as anyother texture you need to set the lighting of the matertial to true. like this:

Code: Select all

myNode->setMaterialFlag(irr::video::EMF_LIGHTING, true);

Posted: Wed Jul 14, 2004 8:39 pm
by Trip42
That's what I would have thought as well. I've tried this and it has no effect.

-Brian

Posted: Wed Jul 14, 2004 8:50 pm
by thesmileman
I checked the API and I guess niko is not finish with the EMT_TRANSPARENT_ALPHA_CHANNEL material type because it state:

Code: Select all

EMT_TRANSPARENT_ALPHA_CHANNEL 	Makes the material transparent based on the texture alpha channel. Only first texture is used. Please note that this material is currenly NOT IMPLEMENTED.
I would assume that means you can not expect anything from the material type though maybe he has not undated the documention on this issue.

Posted: Thu Jul 15, 2004 8:01 am
by Rocketeer
There seem to still be a number of issues about the EMT_TRANSPARENT_ALPHA_CHANNEL material. I found that I couldn't use other types of material at the same time without modifying the engine - see the thread here: http://irrlicht.sourceforge.net/phpBB2/ ... php?t=3130

I'd imagine that there could be other such bugs... perhaps there's another change needed in the same place as the above.