Peer-to-Peer Forum

 

Login Register    
Glass problem
Posted: 18 July 2010 05:07 AM  
Newbie
Rank
Total Posts:  22
Joined  2009-10-01

I have maybe a very simple problem but I can’t seem to fix it. I use a simple material with and 0.5 value for alpha. If I assign this to my object, the objects behind won’t for somehow get drawn. But If I change the angle of the camera suddenly it draws normal. Anyone else faced this problem before?
I use Creator 4.0.
Please see attached screenshot.

Image Attachments  glass_problem.jpg
 
Posted: 19 July 2010 10:59 AM   [ # 1 ]  
Moderator
RankRankRankRank
Total Posts:  590
Joined  2008-07-02

When drawing transparent faces in Creator, the order in which the faces are drawn is important.  To “see” face A through face B, for example, you have to draw face A, then face B (you have to draw all the transparent faces last).  This implies that face B is “to the right” of face A in the hierarchy.

Unfortunately Creator does not change the draw order of the scene based on transparency.  Any runtime will do this for you automatically but Creator does not.

In your example, I suspect you will find that the ground polygons that you cannot see through your transparent glass polygons are in the hierarchy somewhere “after” the glass polygons.  If you move them to be “before” the glass polygons, you should be able to see them.

Note that it may not be possible to order your polygons to make Creator render correctly from all angles.  In fact this is more often the case than not.  Something may be behind the glass from one angle but in front of it from another.  It is easy to see why you cannot order your polygons correctly for every angle in your scene. You can start by pushing all the transparent polygons to the “end” of the hierarchy but if you have many transparent objects, you may never get the correct order among them to be correct for every angle.

Not to worry however, your runtime will certainly take care of this for you.  Most runtimes sort transparent polygons from far to near (based on the current eyepoint) and render accordingly.