Transparent Materials and Lighting

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
Trip42
Posts: 10
Joined: Sun Jun 06, 2004 9:49 pm

Transparent Materials and Lighting

Post 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
thesmileman
Posts: 360
Joined: Tue Feb 10, 2004 2:20 am
Location: Lubbock, TX

Post 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);
Trip42
Posts: 10
Joined: Sun Jun 06, 2004 9:49 pm

Post by Trip42 »

That's what I would have thought as well. I've tried this and it has no effect.

-Brian
thesmileman
Posts: 360
Joined: Tue Feb 10, 2004 2:20 am
Location: Lubbock, TX

Post 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.
Rocketeer
Posts: 9
Joined: Sun Jul 11, 2004 9:13 am
Contact:

Post 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.
Post Reply