Thread: OpenZone 5.6
View Single Post
  #13  
Old 05-27-2005, 02:36 PM
Windcatcher
Demi-God
 
Join Date: Jan 2002
Posts: 1,175
Default

You're close, GeorgeS. You want "masked" and "opaque" selected after using the convert to transparent bitmap option. Let me see if I can explain it all a bit better:

"Convert to Transparent Bitmap" takes a 24-bit .BMP file (one that doesn't have any alpha channel) and creates a 32-bit .BMP file where the alpha is 0 for the transparent parts and 255 for the parts you want to see. It determines what should be transparent by looking at the colors in all four corners of the bitmap and choosing the most prevalent one as the transparency color. If you already have a 32-bit .BMP file that has correct transparency information in its alpha channel, this step isn't necessary.

For the "Edit Polygon Properties" dialog:

The "masked" option tells the client that this polygon has parts that are opaque and parts that are totally transparent (e.g. tree leaves). You would want this checked for such textures.

The "solid" option tells the client not to perform collision avoidance for this polygon. You would want this checked for textures like tree leaves, so the player can pass through them.

The "opaque", "semitransparent", and "transparent" options affect the *entire* texture. In the case of tree leaves (and 99.9999999% of any textures you use), you would want opaque checked. Checking semitransparent makes the entire texture appear at 50% transparency (regardless of the actual alpha values in the texture), and checking transparent makes it invisible (regardless of the actual alpha values in the texture). I never said that .WLD made sense (grin). The benefit here is that you can have a texture that's opaque in some parts of your zone and semitransparent in other parts, while only needing one texture to do the job. You can think of the semitransparent option as having the effect of multiplying all alpha values by 0.5. I think the original reason for these settings is that earlier versions of the client only supported 8-bit indexed-color .BMP textures that didn't have any alpha information (as opposed to the .DDS-format textures it now supports). These settings were what made tree leaves and semitransparent/transparent polygons possible back in the day. Nowadays you could just use 32-bit RGBA textures instead of having to deal with those three settings, though they're nice when you're experimenting with semitransparency and don't want to have to make a whole new texture.

One thing the client does with the masked setting, as another example, is when you use an indexed-color texture. If masked is set, it chooses the first color in the color palette as the transparent color. A good example of this is the texture for the old-world ships that has the ropes that bind the sails. 95% of the texture is composed of color 0, which comes up as transparent when rendered.

Last edited by Windcatcher; 05-27-2005 at 10:38 PM..
Reply With Quote