PDA

View Full Version : stained object with blending



grodslukaren
07-02-2001, 09:51 AM
What have I done wrong if my objects get stained when I use blending??

I have a big sphere-like object Iīd like to do half transparent and later add small spheres inside my object. I can do this but it doesnīt look really nice, because the transparent object is stained in different positions. Itīs like it becomes a bad mix with the front and the back side of my big object.

What can I do??

Thanks in advance!!

/grodslukaren

DFrey
07-02-2001, 10:14 AM
Sounds to me like you are only drawing things in the wrong order. First draw all opaque polygons (if any), then draw transparent polygons from farthest to nearest (sorting is important unless blending is purely additive, which in your case doesn't seem to be so you need to sort.)
Generally, the more complex the scene to be rendered is, the more important the order is.
For example, for a complex 3D real world environment I would likely use the following order: Opaque polygons (nearest to farthest), skybox polygons, transparent polygons (farthest to nearest), H.U.D. polygons.