PDA

View Full Version : making stuff disappear



Rajveer
03-06-2002, 04:28 AM
I want to create a scene where whatever I've drawn disappears beyond a certain depth (negative z direction). i.e., if I have some 3D shape and I translate or rotate it and in doing so, any portion of the shape goes beyond a certain depth (specified by me) into the screen, I want that portion to disappear. Also it should reappear if it comes forward in front of that depth. Kind of like an interdimensional portal located at a certain depth in the screen. How do I accomplish this?

Shag
03-06-2002, 04:37 AM
I think you are talking about the zfar plane. This is a fundemental part of 3d graphics - have a look at the functions gluPerspective and glDepthRange. This is ample information out there.

nexusone
03-06-2002, 04:56 AM
I though you have to say "Presto!!!"

http://www.opengl.org/discussion_boards/ubb/smile.gif


Originally posted by Shag:
I think you are talking about the zfar plane. This is a fundemental part of 3d graphics - have a look at the functions gluPerspective and glDepthRange. This is ample information out there.

john
03-06-2002, 02:00 PM
Or you could use clipping planes, depending on whether you want some of the geometry to appear behind the portal, also.