Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / Distances to clipping planes Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
MikeMorcilla

March 17, 2005, 12:00 PM

Hi there,

I would like to have the Front Clipping Plane (FCP) as near to the camera as possible, and the Back Clipping Plane (BCP) as far as possible.

The problem is that I get visual artifacts if the FCP distance is too small (lets say

 
Erik Faye-Lund

March 17, 2005, 12:17 PM

i allways make the plane-distances a camera-parameter. that way an artist can tweak it in 3dsmax before exporting the scene.

anyway, with a nearplane at 1 and a decent scene-scale, you should have really fucked up scenes if you have nearplane-intersection-issues.

 
MikeMorcilla

March 17, 2005, 12:50 PM

@Erik Faye-Lund,

thanks, but I don't understand completely.

Quote: "that way an artist can tweak it in 3dsmax before exporting the scene."
Uh, no 3dsmax participation here. Just real time directX 9.0 and, lets say, VC++.

In extreme cases (as mine) it would be desireable to make worhty every decimal number. As distance is a float number, I thought it could be possible to use all the 7 digits at both sides of the float point (could be 0.0000001 to 1000000.0). That would let make very small objects (┐Zooming into a little ant in the ground?).










 
Rui Martins

March 17, 2005, 01:57 PM

Beside clipping, the clipping planes influence the spread/precision of the Zbuffer resolution, which is not linear, but instead more concentrated near the viewer (where it is most needed) and lower near far plane.

The general rule of thumb is to have the near plane as near as possible to the camera (1.0), and have the far plane as near as you can affoard without having geometry poping, some fog usually also helps to hide the abrupt transition at the Far plane.

Floating point means just that, floating point !
which in other words means the precision is constant (number of bits available for mantissa doesn't change), but you can vary the exponent (its value, not its bits). This implies that larger numbers can't have fractional detail, because if they do, it will be lost when using this representation. the least significant digits are truncated.

Finally zooming as nothing to do with this. Zooming is an operation that works by changing the projection matrix, so that the mapping of the viewport edges increase or decrease the world volume(projected area) displayed on it.

 
MikeMorcilla

March 17, 2005, 04:57 PM

Well thaks a lot, Rui Martins. I was looking for some info about that Zbuffer precision. I didn't know it wasn't linear.

You are right about floats. I think that what I was trying to say is that I'm not exceeding the mantissa precision for the real number.

I'm working right now with 1*10^-5 distance for the near plane, and visual artifacts are still appearing. The lower this distance is set, the closer the artifacts appear (I guess non-linear, as you said).

Sorry about that zoom example, no zooming here, I just want to get very close to that little ant...

 
Erik Faye-Lund

March 18, 2005, 12:01 AM

well, whatever content creation tool you use. if the camera movements are user-controlled, make sure the user can't move too close to walls etc.

 
MikeMorcilla

March 18, 2005, 06:47 AM

Yeah, thanks.

 
ector

March 18, 2005, 07:03 AM

"The general rule of thumb is to have the near plane as near as possible to the camera (1.0), and have the far plane as near as you can affoard without having geometry poping, some fog usually also helps to hide the abrupt transition at the Far plane."

Nope, the general rule is to push the near clipping plane as FAR away from the camera as you can. The far clipping plane isn't as important for zbuffer resolution, you can even set it to infinity if you construct your projection matrix appropriately with just a few percent loss of precision. Bringing it in closer will buy you a little extra precision though, that's true.

 
Rui Martins

March 18, 2005, 09:14 AM

ector wrote: "The general rule of thumb is to have the near plane as near as possible to the camera (1.0), and have the far plane as near as you can affoard without having geometry poping, some fog usually also helps to hide the abrupt transition at the Far plane." Nope, the general rule is to push the near clipping plane as FAR away from the camera as you can. The far clipping plane isn't as important for zbuffer resolution, you can even set it to infinity if you construct your projection matrix appropriately with just a few percent loss of precision. Bringing it in closer will buy you a little extra precision though, that's true.


Yes Ector, you are right, but he actually mentioned this:
I would like to have the Front Clipping Plane (FCP) as near to the camera as possible...


So in his case the rule of tumb would be as I said, but I should have made it clear, which i did not!
So thanks for clarifying that.

 
MikeMorcilla

March 20, 2005, 08:51 AM

I see. It shouldn't be

 
This thread contains 10 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.