Are there any hints or tutorials about AM_COMBINE out there?

I am very confused about the way the combine mode works. Does someone know a place to find some tutorials/explanation about this? Assuming this was something in OpenGL, rather that jME specific, I tried to google for certain keywords, but nothing valuable showed up. What I am currently trying to do is to use an alpha map texture, like this:

Texture Unit 1: Base texmap

Texture Unit 2: alpha map

Texture Unit 3: texmap mixed by using Unit 2’s alpha map.

you’ll need to explain better than that. Is the alpha map a decal, a lighting map or what?

Sorry for not being precise. What I am currently trying to do is pretty much the same thing DanK tried to do here: http://www.jmonkeyengine.com/jmeforum/viewtopic.php?t=751

The solution mentioned there (having the alpha map in the texture image as an alpha channel) won’t do the trick, because I want to set different texture coordinates for texmaps and alpha map. The exact thing I am currentrying trying to do is Texture Splatting, as described here: http://www.jmonkeyengine.com/jmeforum/viewtopic.php?t=615, with multitexturing instead of “manual” multi pass rendering by re-creating the terrain geometry with a different (partly transparent) texture state, which still wouldn’t allow me to have different texture coordinates for texture maps and alpha map.

Let me try to explain this in a more “visual” way:

The base texture, with texture coordinates assigned. Might reside in Texture Unit 1.



This is the alpha map, it sits in Texture Unit 2 in my “example” above, and has it’s own set of texture coordinates:



This texture (in Unit 3) is to be combined with the texture in Unit 1, by using the texture in Unit 2 as an alpha map. It uses the same texture coordinates as Texture Unit 1:



And the result would look like:



The reason for having a different set of texture coordinates for the alpha “layer” is to have the texture maps “tiled”, while the alpha map should span across the whole terrain. I hope this has been more comprehensible than my last post… BTW: I think I am close to a solution, but might be wrong. Anyway, I would love to hear about some good tutorials/lecture/whatever about OpenGL Texture Combiners…

Ah, thanks for such a good explanation. Since texture operations start from your first texture and go from there, I wonder if it might be easier to make the first texture be the alpha, then the detail texture (grey one) blended using the alpha value of destination, then the underlying texture in channel three blended by 1-destination alpha?



As for tutorials, I’m not sure offhand. Maybe someone else on here?

This is a Java3d article on particle systems, but if you dig through the attached source code he explains a bit about combine etc.

eg: cloudpuff.java



http://jdj.sys-con.com/read/99792.htm



http://res.sys-con.com/story/jun05/99792/source.html