Camera clipping - still no fix?
-
Hey guys, I'm working on a project in the mountains. I've made a copy of the file with a bunch of pieces of google maps inserted, so I can figure out the views from the buildings. Problem is, the project bounding box is about a kilometer long. When I try to look out the windows of the house, it gets clipped pretty badly. This forum has had some good tips. I've turned the FOV down from 65 all the way to 10 degrees. It helps a bit, but not to a functional point yet. Are there any fixes to this problem yet? Any sneaky ruby scripts? Or are models with long extents doomed to always have camera clipping issues?
Secondary question - does this belong in the Newbies forum?
-
I wrote this a few days ago :
@jiminy-billy-bob said:
@arail1 said:
- Ability to zoom in to detail without clipping plane problems
I find it annoying too, but I believe it's a technical problem, inherent to the OpenGL technology, not SU itself. Plus, if it disappears, we wouldn't be able to zoom through geometry.
-
How far is the model off the 0,0,0 axis? The farther you are away, the worse the clipping.
-
@jiminy-billy-bob said:
I wrote this a few days ago :
@jiminy-billy-bob said:
@arail1 said:
- Ability to zoom in to detail without clipping plane problems
I find it annoying too, but I believe it's a technical problem, inherent to the OpenGL technology, not SU itself. Plus, if it disappears, we wouldn't be able to zoom through geometry.
Yah, I saw this comment. Honestly, I was hoping there were perhaps some other discussions on this board, using different terminology that I'd missed while searching. Or perhaps there was a weird work-around that would work in this unique situation. I'm.. not feeling too hopeful about it.
In fact, my workaround for now is making a panoramic image, and applying it to a cylinder mass. That should reduce the 1000m model length to something considerably smaller.
-
AFAIK there is something called near clip (or some similar name) -- which is a distance value representing the nearest the viewer can get to something. Whatever that value is, there are an additional number of increments that follow (maybe 32k) with each increment representing a further-away distance used as a place to "drop in" other objects that are further away. It's a bit like a queue. How far away the last increment falls is based on how large a distance value you've assigned to the near clip. If you set near clip to see something like tiny, like 0.01mm, you're going to run out of increments before you get very far away because 0.01mm is so very small. That may be a perfect distance for viewing jewelry but not for GIS data. Setting nearclip to something a bit larger, say 1mm, will set the last increment much further away; Setting near clip to something large, like 1m, results in the last increment being very far away indeed.
Clipping occurs when you zoom inside of the near clip value.
I expect SU uses a near clip value that gave them what they felt was the right balance between closeup and furthest distance that can be seen. Obviously some modelers, myself included, occasionally need to get in even closer to see something.
I dunno what the solution for that is... it might be a limit in Open-GL, it might be a limit in a 32bit program, or something else, such as letting the user pick his own near clip value as part of the model attributes. Whatever it is, it isn't a bug, it's a decision that tries to find the right balance of near/far for the largest number of users.
-
@genma saotome said:
I dunno what the solution for that is... it might be a limit in Open-GL, it might be a limit in a 32bit program, or something else, such as letting the user pick his own near clip value as part of the model attributes. Whatever it is, it isn't a bug, it's a decision that tries to find the right balance of near/far for the largest number of users.
i fit into their target user because i barely ever encounter clipping plane problems with the stuff i typically draw.. that said, ive seen other apps which do handle it better.. it might start to clip but then it picks up on the fact that you're going in real close and adjusts accordingly as well as giving the user the option to set the plane..
so, it's possible to 'fix' the problem in sketchup.. -
@unknownuser said:
How far is the model off the 0,0,0 axis? The farther you are away, the worse the clipping.
Indeed this could help. Normally, when modelling, I also usually model in the positive quarter of the red/green plane but when it comes to such large models, I try to position their centre to the origin. This way (if it is around 1km extent), only half of that extent would be the farthest point and maybe clipping would not occur that badly.
-
I think the panoramic image is the typical method of resolving the far away clipping problem. But, if you want to retain the geometry at a distance, you would probably have to have the functionality of GoogleEarth built into your model.
-
You're not understanding how 3D graphics "works" - its not specific to OpenGL - its how ZBuffers work - and they work identically in OpenGL or D3D or anything else.
ZBuffers are used to store the depth of every pixel on the display relative to the viewer (NB Gaieus, this is why putting around the origin or in positive XY makes no difference whatsoever).
Graphics hardware generally limits the precision of the ZBuffer to 24 bits.
However, in order to display a 3D world on a 2D display, 3d software needs to perform a "Perspective Projection" which has the side effect of making a linear move away from the camera view in World space, a non-linear move in Projection space. What does all that mean?
Well, firstly what is actually stored in 1/depth, and what flows from that is that near to the viewer you get lots of precision and far away you get less and less. This is why a coplanar Picture on a wall might be fine close up but gradually degenerates into a buzzing mess as you recede.
In order to ensure you get maximum precision, most 3d software will control the ratio of near clipping to far clipping to ensure that it fits inside those 24 bits of precision.
So having a far clip of 10000.0 and a near clip of 1.0 gives a ratio of 10000:1 which can be represented by the 24 bit ZBuffer. Bringing the near clip in to 0.01 gives a ratio of 1000000:1 which its going to struggle.
SketchUp adjust the far clip to ensure you get maximum precision - but in the case of huge mountain range, you're going to have problems with this approach.
If you enable Fog, and use the cut-off slider to limit visibility, its possible SketchUp takes the minimum of Fog distance and Far clip which would give you manual control.
If it doesn't do this already, it should - and Adam should get a decent bottle of claret.
Adam
-
thanks for that explanation Adam
(now let me read it a couple more times to really understand it) -
Thanks, AdamB:
It is about time someone cleared this up.
You're right. I don't understand how 3d graphics works, except in a general intuitive way, as I guess there may be 2 or 3 other members around here who share my level of understanding. Of course, I have only a general understanding of how an automobile works, but I drive one every day.
I welcome your comments as further education for me.
Have you ever posted this information before? -
@icedkasz said:
Hey guys, I'm working on a project in the mountains. I've made a copy of the file with a bunch of pieces of google maps inserted, so I can figure out the views from the buildings. Problem is, the project bounding box is about a kilometer long. When I try to look out the windows of the house, it gets clipped pretty badly. This forum has had some good tips. I've turned the FOV down from 65 all the way to 10 degrees. It helps a bit, but not to a functional point yet. Are there any fixes to this problem yet? Any sneaky ruby scripts? Or are models with long extents doomed to always have camera clipping issues?
Secondary question - does this belong in the Newbies forum?
Looking at your screenshots again, I think you're seeing something a little different - to do with Components/ Groups. Can you send me the model to check?
BTW The reason reducing FOV "helps" is because the 1/depth being stored in the ZBuffer is becoming more and more "linear" so you're gaining precision - in the limit when its a parallel projection, ZBuffers are simply storing "depth".
Adam
-
AdamB -
As you're clearly very knowledgeable about this maybe you could help us understand how SketchUp is different from other applications. In modo for instance you can select an item, a polygon for instance, and then type shift-A and modo zooms to that item and seems to re-set itself so you can enlarge as much as you want without the clipping problems SketchUp has. The zoom function in AutoCAD locks up pretty regularly, then you have to type in Regen after which the Zoom functions again and you can zoom in to whatever depth you want.
-
Side comment:
What I greatly dislike about Autocad is the inclusion of the zooms and pans in the history/memory stack. As far as I know, you cannot exclude this completely. -
@mitcorb said:
Side comment:
What I greatly dislike about Autocad is the inclusion of the zooms and pans in the history/memory stack. As far as I know, you cannot exclude this completely.I think SketchUp is unusual in this regard in that it's Undo and Redo function addresses changes to the model, not changes to the viewing position. Which is much, much better than the way AutoCAD handles it.
Advertisement