Archived

This topic is now archived and is closed to further replies.

near clipping plane problems

This topic is 4946 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

okay well im making a FPS, but when im rendering the gun the back of it is see through due to the near clipping plane not being small enough (1 unit is 1 meter for me) so i had to set it to 0.2f, and that works for the guns, but i notice some other stuff doesnt work (like the water rises above the terrain if i am too high (but if i set it to 1 the water wont rise above the terrain until i am ridiculously high)... so i think my question is, is there a way to render the guns while ignoring the near clipping plane? (so the back isnt culled out)?

Share this post


Link to post
Share on other sites
yeah i tried changing the projection matrix when rendering the gun but it made it come out huge compared to the level for some reason...guess thats how projection works heh

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by Bit-Field
yeah i tried changing the projection matrix when rendering the gun but it made it come out huge compared to the level for some reason...guess thats how projection works heh


Try again. But this time make sure that only the near and far clip plane distances are changed and that the angle-of-view is not changed.

Share this post


Link to post
Share on other sites
Are you using the depth buffer? If so, try upping the bits per pixel, unless you are already at 32bpp. Sometimes artifacting is caused by the depth buffer rounding off (i.e. it rounds 30000.4321 to 30000). If the depth buffer does round if, it causes two pixels to be shown at the same place (hence artifacting).

Bit-Field has a good idea, find a command in whichever API you are using that will only change the near/far clipping planes.

--------------------------------------------------------------------------------
Good Links: C++ Reference, Java API
SDL Home Page, Lua Scripting Language, Python Scripting Language
Chris Taylor's Design Document (Downloadabe MS-Word Only), Blitz Basic Homepage

[edited by - Onemind on May 29, 2004 11:36:37 PM]

Share this post


Link to post
Share on other sites