materialType : alpha channel and normal map

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
JLouisB
Posts: 67
Joined: Tue Jul 24, 2012 12:36 pm
Location: France

materialType : alpha channel and normal map

Post by JLouisB »

Hi,

I have a question about the material type.
I have a vegetation model how use an alpha channel on this diffuse texture.
I have use the EMT_TRANSPARENT_ALPHA_CHANNEL material, ok, it work well.
But now, I add a normal map. I use EMT_NORMAL_MAP_SOLID, the normal mapping works well, but I haven't my alpha channel.
I look the doc and... EMT_NORMAL_TRANSPARENT_ALPHA_CHANNEL is missing.
I don't understant why. There are EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR, EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA but not EMT_NORMAL_TRANSPARENT_ALPHA_CHANNEL
I think it is important, not ?
Why it don't exist, it's planned ?
Or I just should make my own material... :(

Sorry for my poor english.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: materialType : alpha channel and normal map

Post by hendu »

Use a shader for such complex arrangements.
JLouisB
Posts: 67
Joined: Tue Jul 24, 2012 12:36 pm
Location: France

Re: materialType : alpha channel and normal map

Post by JLouisB »

Yes, I know that I should use a shader (but I don't know how to program a glsl shader, and learn this only in order to have my alpha channel... :( ), but my question is "Why it's not in Irrlicht ?", it's a feature request.
I think that normal map+alpha channel is most used than normal map+addColor, no ?
Then why there isn't normal map+alpha channel ?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: materialType : alpha channel and normal map

Post by hybrid »

Well, you can add your own material by simply copying the two together. It's at least not yet planned to add more materials to the fixed function pipeline. At some point we might split transparency and material type, though, which could then enable your desired material type. But that's a long term goal.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: materialType : alpha channel and normal map

Post by Mel »

A long term goal highly desirable, because it could allow to have shaders compiled once, and that could use alpha blending or additive blending at will, though, in the current state of the SVN, the blending operations mess with the stencil buffer, so, maybe it could be also a good idea to add support to manipulate the stencil buffer through the materials.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: materialType : alpha channel and normal map

Post by hendu »

Could you elaborate on how they affect the stencil? I haven't yet hit that, and would like to know what to avoid ;)
Post Reply