by Jojon » Wed Apr 08, 2009 9:44 am
First of all, I'd like to mention that the Object->ObjectButtons->Draw->DrawExtra "Transp" button, that you mentioned earlier, took care of a problem I have been having in my Ahra pahts shell. I never knew that button was mapped to anything in pyprp -- my thanks. :)
I believe what you ask is actually covered in the tutorials on the wiki, but the lore is rather fragmented and spread put over several ones, I suppose. What follows should probably be part of a new real tutorial, but I'm at loss as to where to begin and end such a one (..and I must admit I'm really bad at explaining things).
You'll already know most of what I'll say and I'm restricting info to the question at hand, but anyway... :7
Ok, to my way of seeing things, the trio of tabs on the texture panel of the material pane is a bit misleading, because I'd say that the "Map input" and "Map to" tabs are really pretty much subordinate to the "Textures" one. When you have higlighted a layer in the array of layers ( 'A' in the picture - in this case I have the first layer selected and it is set to fetch its image data from the texture block "Texture_1" ), everything you do in the two other tabs determines what to do with that particular layer and none of the others.
What happens with the layers, when rendering, is that we begin from the top of the array, with layer 0.
We look at our "Map input" data to see which pixel goes where -- most of the time we will use a UV-map to do this. If the mesh has several UV-maps, we can specify which one to use for each layer, in the text box at "B" on the picture. The IPO keys you can insert here are also specific to the active layer.
Now, "Map to" will tell us how to draw the texture. In the simplest case, we will use a texture without an alpha channel and draw its COLours in MIX mode (selected at 'C' in the picture), with the col slider at 1. If we mix 0.5, the texture will appear half see-through. With an alpha channel (or stencil, which is pretty much an "external" alpha channel, inserted through a preceding layer), you can determine transparency for every pixel.
That done, we move on to the next layer: layer 1, second from top and go through the exact same procedure as above, this time drawing on top of the composite texture of the material so far, then layer 2 and so on -- each layer is drawn in turn, one by one, on top of everything that went before.
So, if I drew "Texture_1", in the picture, totally opaque (mix col 1.0) and then "Texture_2" at mix col 0.5, I would get a 50/50 blend of the two textures. If I wanted equal parts of three pictures, I would mix the layers 1 / 0.5 / 0.333. Four pictures: 1 / 0.5 / 0.333 / 0.25 and so on.
Hope this was what you sought...
EDIT: forgot to attach the piccie. :P
- Attachments
-

- textabs.jpg (59.52 KiB) Viewed 3688 times