PDA

View Full Version : Can I see infinite distance


sled
07-16-2003, 01:16 PM
some scene cannot be seen when you go a little far, it looks like you have distance limit for the scene to show.can I change it to infinite

tobin
07-16-2003, 03:05 PM
Actually, most 3D graphics programs that rely on hardware accelerated hidden surface removal always have a finite depth range. Vizard uses hardware z-buffering exclusively for hidden surface removal, as do most other rendering APIs.

As such, you can use the viz.clip() command to fine tune the range. Keep in mind your depth resolution (the minimum distance the computer can distinguish in depth) will be spread over this range. You're noticing that far objects are disappearing. Try increase the far range:

viz.clip(0.5, 1000)

that sets the nearest range to .5 and the farthest to 1000 meters. If thats still not far enough, increase the far (e.g., to 5000). If you will never view an object closer than say 2 meters, then you'll get better z-buffer performance if you then correspondingly increase your near distance (e.g., viz.clip(2.0, 5000)).

If you set the range to be too wide (e.g., viz.clip(0.001, 1000000000)), you'll notice jagged slices through all your objects because the algorithms cannot exactly distinguish which objects are closer to viewpoint than others.

sled
07-16-2003, 05:18 PM
thanks a lot.