Texture blending?

Blitz3D Forums/Blitz3D Programming/Texture blending?

Avrigus(Posted 2004) [#1]
I have a 3D object with 2 texture layers. The first is a standard colourmap and the second is a spherical map to simulate a reflective surface. Now i'd like to know if it's possible to set a "blend" value for the spherical map so that it's more subtle than the standard full value. I'd like to set the texture's opacity to about 20% so that the spherical reflection is just barely visible.

Is this at all possible and if so how do I do it?


Rob(Posted 2004) [#2]
You could swap the order so the colour map is on top then adjust the colour map.

OR bring the values of the env map closer to 128 and use a different blend mode.

It's a case of experimenting a lot...


Mustang(Posted 2004) [#3]
Something like this?

layer1: refl
layer2: color + alpha (alpha controls refl strength)
layer3: lightmap (optional)


Avrigus(Posted 2004) [#4]
Cheers guys, I hadn't thought of blending the colourmap rather than the refmap, that's just me stuck in my Lightwave thinking ;-)

When you say colour + alpha, do you mean the colourmap should be a 32bit image with embedded alpha? Is there a way to control the opacity of the alpha via code?


Mustang(Posted 2004) [#5]
colour + alpha, do you mean the colourmap should be a 32bit image with embedded alpha?


Yes.

Is there a way to control the opacity of the alpha via code?


Yes, but writing to alpha channel "manually" is dead slow... and IMO there is no command to change the alpha channel opacity.