Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Transparent objects



Thank you Chaz,
the problem is that it's an animation. So the objects could be once on the
back and once on the front. They not only change order but also rotate, so
how can I know whether an object is in front or on the back? Think about an
half-trasparent-cube with 6 faces, plus an opaque cylinder crossing through
the cube from outside to inside.

If I disable the depth test of the cube and I draw firstly the cube then the
cylinder, I see the internal part of the cylinder drawn outside the cube
(instead that part is "inside" the cube!).
And If I disable the depth test of the cube and I draw firstly the cylinder
then the cube, I see the external part of the cylinder drawn inside the cube
(instead that part is "outise" the cube!).

So, I really think that this is not the way to proceed. I presume I can
solve this with some accumulation z buffer, collecting any object depth then
drawing all the objects at the end. But I don't know whether this method
exists or not.

Is anyone here who knows how to solve this "transparent" problem? Please.
There should be a solution, for sure!


Best Regards
-- 
Lorenzo
email: email@hidden

> From: Chaz McGarvey <email@hidden>
> Date: Fri, 24 Dec 2004 09:33:03 -0700
> To: Lorenzo <email@hidden>
> Cc: Mac List <email@hidden>
> Subject: Re: Transparent objects
> 
> 
> On Dec 24, 2004, at 7:41 AM, Lorenzo wrote:
> 
>> Describing what I see is really complicated and boring, so I simply
>> ask:
>> In my animation, how can I draw the 2 transparent objects such a way I
>> see
>> what a human eye really sees?
> 
> Disable depth testing and always draw translucent objects from back to
> front.
> Blending does not play nicely with depth testing.
> 
> Chaz McGarvey
> http://www.brokenzipper.com
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden

References: 
 >Re: Transparent objects (From: Chaz McGarvey <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.