View Full Version : cleaning the edges
Zbigniew
02-22-2003, 06:20 AM
When I make a picture in one of my 3d modelers with a black background or any other color background then I always spend alot of time cleaning the edges so that it blends well when I use this bitmap in my game using blitting. It takes alot of time and it's boring to clean the edges... Is there any other way to make art that blends in better in a large environment? I am using alpha blending already and it help a bit. But the main reason the edges can be seen is because they are so well defined when I make them in the 3d modelers.
Guardian_Light
02-22-2003, 07:32 AM
Disable antialiasing in your 3D modeling package. That should keep your edges "crisp".
Ratboy
02-22-2003, 12:10 PM
For Mechcommander, I did two rendering passes for each object I made. The first was antialiased against black, the second was nonantialiased with a big pink plane at floor-level. I had a tool that'd take the pink pixels from the second image and copy them (and only them) to the first, so I got an antialiased image with a sharp edge, and a shadow. It was somewhat tedious, but it worked quite well.
Mythago
02-23-2003, 07:32 AM
When I make a picture in one of my 3d modelers with a black background or any other color background then I always spend alot of time cleaning the edges... <snip>
I am using alpha blending already and it help a bit. But the main reason the edges can be seen is because they are so well defined when I make them in the 3d modelers.
If you're using alpha blending in your game engine then you should be able to specify an alpha mask for your bitmap. A proper alpha mask will allow you to blend your sprite into any background without seeing funky edges.
Depending on the modeler you're using it may be able to output an alpha mask automatically (which means you don't have to manually edit edges). Here's an example using 3DS Max: Say I want a ball in my game. I create a sphere in Max, add a texture etc. and then render it without a background. Not rendering against a background is how you get the nice alpha edges that can be fully anti-aliased and will fade to transparency. I save this image to a .tga or .tiff because they can support an alpha channel, then convert the image to a .png in Photoshop. PNG supports alpha and compression so it's nice for games.
I'm using SDL in my game so it automatically loads any alpha channel in the image file and then uses it when blitting the image to a surface. Depending on your graphics library you should be able to something similar.
-Pat