Battlezone Universe

Battlezone Universe => Battlezone 2 => Maps and Modding => Topic started by: anomaly on February 26, 2008, 01:24:47 AM

Title: Can someone explain texture blending?
Post by: anomaly on February 26, 2008, 01:24:47 AM
Ok, this part of odf editing has always bugged me because I can't figure out how it works.  I wasn't able to find much useful info(before the server wipe) on what the different combinations of one, modulate, alpha, invsalpha, etc. meant.  So, has anyone done looked into what each of these does?
Title: Re: Can someone explain texture blending?
Post by: General BlackDragon on February 26, 2008, 01:36:48 AM
Well, i know I use 2 basic ones...

for images that have an image/color. i use "one one modulate"

For images that use mainly gray/alpha channels, i use "srcalpha invsrcalpha modulatealpha"

Here is a full list of the types of items that can be placed in that kind of sequence.

Texture Blends:

Zero
One
Srccolor
Invsrccolor
srcalpha
invsrcalpha
dstcolor
invdstcolor
dstalpha
invdstalpha
scralphasat

Experiment if you like to find out results.
Title: Re: Can someone explain texture blending?
Post by: bigbadbogie on February 26, 2008, 01:39:27 AM
good luck  :evil:
Title: Re: Can someone explain texture blending?
Post by: Angstromicus on February 26, 2008, 02:21:41 AM
those are Src (source?) mode. Don't forget tex (texture?) mode. I'm guessing Src mode would be like pre-processing while tex mode is post-processing. But that's just a hunch.

Anyways, here's the tex part of the list:

decal
modulate
decalalpha
modulatealpha
decalmask
modulatemask
add

Title: Re: Can someone explain texture blending?
Post by: mrtwosheds on February 26, 2008, 02:24:49 AM
I have found dstcolor is quite useful for creating some interesting effects.
Title: Re: Can someone explain texture blending?
Post by: Zero Angel on February 26, 2008, 02:50:51 AM
"one one modulate" uses greyscale textures, and renders the white part of the texture as opaque, and the black parts as fully transparant. The color is determined by the color settings in the effect.

"srcalpha invsrcalpha modulatealpha" uses 32-bit textures (ones which already possess an alpha channel) and renders them as the texture was colored. Use this for effects which require a texture that possesses more than one color.
Title: Re: Can someone explain texture blending?
Post by: Steeveeo on February 26, 2008, 03:39:06 AM
I thought the "One one" part of it made it additive blending and "modulate" did the greyscale opacity.
Title: Re: Can someone explain texture blending?
Post by: Zero Angel on February 26, 2008, 03:45:41 AM
yep, it does
Title: Re: Can someone explain texture blending?
Post by: Angstromicus on February 26, 2008, 03:56:02 AM
How does BZII read these functions?

order matters, right?
Title: Re: Can someone explain texture blending?
Post by: OvermindDL1 on February 26, 2008, 07:06:12 AM
Yes, order matters.
(http://www.overminddl1.com/image_scripts/image_sig.php?type=ODL1signitures&image/sig.gif)
Generated by OvermindDL1's Signature Auto-Add Script (http://overminddl1.com) via GreaseMonkey (http://greasemonkey.mozdev.org/)


Title: Re: Can someone explain texture blending?
Post by: anomaly on February 26, 2008, 07:35:36 AM
Oi, confusing.

Sounds like I want to use srcalpha invsrcalpha modulatealpha, since I'm using draw_geom to show a textured tank for an effect I'm making.  Now I'm running into problems with draw_geom not showing child frames in an object. Oh well.
Title: Re: Can someone explain texture blending?
Post by: bigbadbogie on February 26, 2008, 07:46:05 AM
yes- draw_geom only shows the top frame of an object -- make the tank a single frame