View Single Post
Old 04-26-2007, 01:28 PM   #506
Jim Sachs
Developer
 
Jim Sachs's Avatar
 
Join Date: Dec 2000

Location: Southern Oregon
Posts: 9,771
More good news. I just solved a problem that the Aquarium had suffered from since Day 1. Without getting too technical, people often noticed that the edges of the lightplay did not always exactly match each object. In the current version, this is because the "objects" are just part of the 2D background, while the lightplay is projected on a "pretend" 3D object in front of it. Creating and matching all these invisible objects with the background pictures is extremely difficult.

Well, the 3D version has a problem that's visually identical to this, but for a different reason. Each object is drawn in two passes - first the object, then the lightplay, using the same mesh. The holes and rough edges of each object are not in the mesh, they are only in the texture. The alpha channel tells the renderer not to draw any pixels in these areas. Now along comes the next pass, and draws lighplay pixels over the whole object - holes and all - right out to the edges of the polygons.


There are recommended ways of dealing with this, but they simply don't work. Well, I finally discovered settings for the Alpha system and Z buffer which cleared the problem right up. Here's a before and after pic:
Attached Images
File Type: jpg Image1.jpg (15.4 KB, 75 views)
File Type: jpg Image2.jpg (15.2 KB, 68 views)
Jim Sachs
Creator of SereneScreen Aquarium
Jim Sachs is offline   Reply With Quote