PDA

View Full Version : Replace Background Color With Transparency.



Knight Chat X
09-08-2005, 03:34 PM
Instead of having to import each rendered image into a 3rd party tool to convert a solid color background to transparent, add a checkbox option to make background transparent during render, to make the background transparent use the already chosen solid background color.

The checkbox could be placed under the "Image Processing/Effects/Backdrop" tab.

Panikos
09-08-2005, 04:39 PM
Dont you know what Alpha Channel is ?

There is no way to get rid of the backdrop.
Its part of the LW world and Reflection and Refraction calculations need it.

Knight Chat X
09-08-2005, 09:38 PM
When I export to Targa .tga file the background is transparent when I import the images into custom game engine. The background is set to Fushia/Magenta as hardly anyone ever uses that for anything other than a Alpha Transparency Key, doing an Alpha Blend on the Targa file during animated frame render in rendering application I made it works, when I tried using other formats, even BMP and used algorythms and even built-in functions to process each pixel using the background color as a transparency key the results made background look like TV static and not all spots were transparent.

Importing these images into game engine and using Alpha Blending produced a solid/opaque background only, the alpha blending didn't work, using same images in custom picture viewer application produced same results.

Second alternative which works, I loaded the images into IrfanView and converted the image files into .GIF's which decreased size to 3KB per image, I then did a batch conversion in which I chose to replace the background color/transparency key to Transparent Alpha, the .GIF images now have a full transparent background, however, .GIF's do not load into my game engine as textures so they can't be used currently for sprites unless I use another method, so I must use other format and save the .GIF animations for just loading into Picturebox, Panel control's, or website graphics.

So the GIF & TGA method's both work, so guess there's no need to add the feature then except if you don't want to have to use a 3rd party application to save as GIF with Transparency.

Now, is there a way to combine all rendered frames in Lightwave to a single image file like you see in most 2D game sprites?

Silkrooster
09-08-2005, 10:46 PM
Sounds like you are combining technologies. Targa files use a mask, anything out side the mask is transparent no matter what the colors are. Bmp files do not have an alpha channel, nor do they have a transparancy color like gif files do. Yes it is possible for you to write a game engine that makes a certain color transparent in a bmp file, but that is not the norm. Most if not all 32 bit file formats contain an alpha channel, bmp is 24 bit which is why it does not have alpha information. In Lightwave it is also possible to render the image and alpha seperately which means it is possible to have a 24 bit bmp image and a seperate 8 bit bmp alpha image. In another program these can be combined. Which is nice for programs that have very little support for other file formats.
I would like to see Newtek add the gif format, but I have heard that gif may end up being an outdated format as png is supposeably replacing it as png is suppose to support 24 bit and either a transparency color or the extra 8 bits for an alpha channel, not sure which.
Silk

Knight Chat X
09-09-2005, 01:04 PM
Ty very much, yep that's exactly what I'm doing and now I have a better understanding of why alpha transparency is working on the Targa files and not the others and why the background is able to be transparent on a GIF.

If they added GIF animation support with background transparency you could save animated GIF's you create in lightwave and use in flash animations, on webpages, or in a 3rd party application for something such as an animated icon like you see when copying/pasting a large file, or create a small toon animation.