Advertisement

model rendering problems

Started by February 03, 2001 11:50 AM
5 comments, last by Hunter-Killer 23 years, 9 months ago
Ok I'm using ms3d models for my maps untill I can get a better format. My problem is that GL is not rendering parts of them depending on where I am. Say I'm standing behind a glass window, the rest of the map isnt drawn. Or I can just be walking and parts will begin to disapear. Here is an example: (note the texture clamping is really pissing me off too) http://quickphrag.q3seek.com/gl_error.JPG (The lack of UBB tags in this forum is horrible) I've tried turning off culling, changed depth buffers, disabled depth buffers, changed the cleardepth and I'm just out of ideas. Hunter-Killer Edited by - Hunter-Killer on February 3, 2001 12:55:03 PM
Not that I think this is it, but--from the screenshot--it looks suspiciously like a clipping plane issue; it seems like the far clipping plane is way too close. Try shoving it way out there just for shits and giggles--if nothing else, that''ll narrow down your search, right?
Advertisement
Would that be:
glClearDepth(1.0);

I''ve tried changing this by 10^X but didn''t see any difference. And when I dropped it to -1 nothing showed up.

Hunter-Killer
i would try looking at where you''re using glFrustum, or gluPerspective (i think that''s what it''s called) and make the far clipping plane further away.

- peter
Do you have animation support. I would like to know how to do Ms3d animation.
L.I.G. == Life Is Good
I''m not using either. And no I''m not using animation.

Hunter-Killer
Advertisement
ClearDepth has nothing to do with it.

You''ll definitely want to use gluPerspective to set up your projection matrix.

Make sure your far clipping plane is no more than 1000x your near clipping plane!

glMatrixMode( GL_PROJECTION );
gluPerspective( 60.0f, 1.0f, 1.0f, 1000.0f );
glMatrixMode( GL_MODEL_VIEW );
gluLookAt( cameraX, cameraY, cameraZ, where to look (x,y,z), 0, 1, 0 );

is probably the best.

As for skeletal animation of models - it''s in PortaLib3D, and I''m going to do a tutorial one of these days. Sorry for the delay!



~~~
Cheers!
Brett Porter
PortaLib3D : A portable 3D game/demo libary for OpenGL
~~~Cheers!Brett PorterPortaLib3D : A portable 3D game/demo libary for OpenGLCommunity Service Announcement: Read How to ask questions the smart way before posting!

This topic is closed to new replies.

Advertisement