Texture Alpha

Blitz3D Forums/Blitz3D Programming/Texture Alpha

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hi. Looks nice.

There are several Alpha options:

Texel Alpha channel (requires texture flag 2)
Brush Alpha
Entity Alpha

(EDIT: btw there's also Vertex Alpha, but this may cause troubles when your vertices are welded/optimized. It also requires to go trough all vertices (by surface handle) and set the color and alpha of the vertices. It allows to set the transparency of each Vertex individually, but is somewhat slower and more complicated than the BrushAlpha solution.

I think in your case you would best use Brush Alpha on the surfaces (usually defined by one texture) that need to be transparent.

writing to the texturebuffer, modifying the alpha Byte of the ARGB texels is very slow due to the bottleneck between Graphicscard and Ram. Additionally, if you don't use the flag 256, then the entire texture must be reuploaded to Vram each time you access it, therefor is't way to slow to be used without flag 256. At the other hand, if you use flag 256 then mipmapping will be disabled an it may look too "corny" for a chrome thing.

Anyway, using Brush Alpha is probably the easiest and most effective way. If your texture was loaded with the car mesh then you may have to track down the surfaces by the names of the textures they use (as explained in the original SaveB3D example in the archives)

Then you can use somethng simple as:
BrushAlpha brush,alpha#
BTW, I never tested this with cubemapping.