S3DVertex2TCoords material

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
Bear_130278
Posts: 237
Joined: Mon Jan 16, 2006 1:18 pm
Location: Odessa,Russian Federation

S3DVertex2TCoords material

Post by Bear_130278 »

Hello guys 8)))
I need help 8))

Here is what i want.
1. I got a geometry with 2 TCoords layers and 3 textures.
2. The 1 layer of tcoords is for the solid diffuse maps.
3. The second layer has a texture with alpha channel.
The reason for 2tcoords is that diffuse maps are heavily tiled, but the opacity map is not....

Here is what i want -
Extract Opacity from diffuse 1 and then blend the result onto the diffuse 2

How can i setup a node to render such a composition?
None of the Material types can provide this i fear.....
Please do not offer shaders. i want to make this on Irr only in 1 render pass

P.S. I',m not sure I've explained it correctly....
Do you like VODKA???
Image
Image
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

Irrlicht doesn't have any material that fits what you ask for, so either you do it with shaders, or you add an extra material on your own.

You could have a material with a white texture with the alpha channel on the first layer, and then, use the diffuse texture in the second layer, which blended with the first layer using a lightmapping material.

But the problem is that there isn't any lightmapping material which also supports alpha transparency.

The easiest solution is to use shaders. You only need one texture with the alpha channel, and another with the diffuse. Read both, and output a pixel with the RGB values of the diffuse texture, and the alpha value of the alpha channel. And that can be done in a single pass. Shaders render in a single pass, unless you use CG.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Post Reply