OpenGL Depth Problem

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  03 March 2005
OpenGL Depth Problem

Hi, hope someone can help, I have a small problem in an application I am working on. The problem is the depth culling that openGL does. I need to use a larger frustum, as my object keeps dissapearing out of the back way too easily. I know it is possible to do this, and I've been studying the OpenGL Programming Guide, which recommends that I use either the lines:



gluPerspective(45.0f, 1.333f, 0.1f, 100.0f);

I have substituted into both of these some values I thought were appropriate, in the glFrustum() the values I worked out based on my distance from the monitor etc. and the gluPerspective() the values were pretty much taken from a NeHeGL tutorial program, where they seem to work fine. The problem I have is that with these lines in place my program only renders a black screen! Have I got some values wrong? Is there a way to just change the far plane of the frustum without arsing about with the rest? The project is to basically have a fish swimming around, but with the frustum as it is at the moment, there isn't really alot of space for the fish to swim in!

Thanks for your time
  03 March 2005
Generally you need to keep the range between the near and the far clipping plane relative small. So as you puch back the far clipping plane, you need to increase the near one as well a little bit. The distribution of the xDepth range tho is exponetial, because you need a greater accuracy close to the camera.
Some graphics cards have 8bits other have 16 for the zDepth. I was making a game using an ATI, and when I tried it out in a gForce, I freaked out cause all my objects were half visible.

I dont remember the syntax of the openGl functions... and the values are always relevant to your scene.
I am not sure if that will help you.
  03 March 2005
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 10:38 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.