Complete Beginners Question

Started by
5 comments, last by NeilArrow 23 years, 9 months ago
Hi, I was playing around yesterday with my first attempts at some 3D graphics. I''ve been looking at the excellent 5 part tutorial in the resources section of gamedev.net (can''t remember the authors name, but he used to work on Duke Nukem 4). I''ve got a nice wire-frame cube that rotates, and I can move towards and away from it nicely. When I move into it though, and one of the points goes "behind" my camera, everything goes crazy, with all the wrong corners joining up together. I''m probably missing something really obvious here, but what''s a simple way of avoiding this happening? Thanks in advance for humouring a novice, Neil
Advertisement
going crazy aint really the best description.
maybe its being clipped by the near buffer.
or the cameras in the cube and youre doing backface culling
quote:Original post by NeilArrow
I''ve got a nice wire-frame cube that rotates, and I can move towards and away from it nicely. When I move into it though, and one of the points goes "behind" my camera, everything goes crazy, with all the wrong corners joining up together. I''m probably missing something really obvious here, but what''s a simple way of avoiding this happening?

unfortunately, there is no simple way to avoid it. you have to dig into topic of clipping ( both 2d and 3d ). first 3dclipping, you have to skip drawing of all polygons ( in wireframe, lines) that are under ( also, above) some certain z value. so if every vertex of polygon lies under this value, dont draw it. now, with polygons that are partially "behind camera", you have to do 2d clipping, which is a lot nastier. im not going to describe it here, theres a lot of tutorials on that, but the idea is not to draw the part of the polygon that is under that z value.

-kertropp C:Projectsrg_clueph_opt.c(185) : error C3142: 'PushAll' :bad ideaC:Projectsrg_clueph_opt.c(207) : error C324: 'TryCnt': missing point
Hmmm. I kind of expected that to be the answer.

Thanks for your help. Hopefully i''ll be back with a stupid question about binary space partitioning in a few months...

Neil
Hmmm. I kind of expected that to be the answer.

Thanks for your help. Hopefully i''ll be back with a stupid question about binary space partitioning in a few months...

Neil
Hmmm. I kind of expected that to be the answer.

Thanks for your help. Hopefully i''ll be back with a stupid question about binary space partitioning in a few months...

Neil
Excited, aren''t we?

-------------------------------
That's just my 200 bucks' worth!

..-=gLaDiAtOr=-..

This topic is closed to new replies.

Advertisement