[Algorithms] Return of the front clip plane
Brought to you by:
vexxed72
From: Jason Z. <zi...@n-...> - 2000-08-03 15:46:34
|
Hi everyone, if you all remember our last episode "Attack of the Front Clip Plane", we all learned that the further it is out the better zbuffer accuracy you have. Much was learned by most. :) Pushing my front clip out to 1 unit solved all of my zbuffer artifacts nicely in the last game. We are trying some new things for the new game and running into a problem that was mostly glossed over in the prequel to this email: collision and clipping of close-by objects. Our game is first person, and when you get within 1 unit of an object it will get clipped out. This is obviously pretty nasty. :) I remember one solution to this suggested was to dynamically move the front clip each frame depending on how close objects are. Another solution is to just make your player's bounding volume larger so you can't get close enough to stuff to clip into it, this works okay but I find that you have to keep the player from getting closer than 3 units with a 1 unit clip because of viewport rotation (just keeping the player 1 unit away is fine if you are staring straight at a wall but as soon as you rotate the edges of your viewport will clip it). Anyone else have any other ideas? Right now it looks like I might be going the dynamic front clip route but I really don't want to, I have a feeling we will be seeing lots of artifacts out in the wilderness because the player will always be walking by a tree that they might not even be looking at. For reference we use feet as units, with a front clip of 1 foot and a back clip of 1000 feet. Thanks, - Jason Zisk - nFusion Interactive LLC |