z-order wrong with high value of zoom

Blitz3D Forums/Blitz3D Programming/z-order wrong with high value of zoom

vivaigiochi(Posted 2010) [#1]
i want simulate orthogonal camera.
I locate my cam far from the object into scena after i use high value of zoom to make flatten all object into scene. But in this case the order of object (into my z axis) seems altered. Infact i see some object first of other but it's wrong because their z value is behind them.


_PJ_(Posted 2010) [#2]
Why not use CameraProjMode Camera,2 instead of extending the Zoom?
That's what it's there for! :D


big10p(Posted 2010) [#3]
You have probably lost z-buffer accuracy due to setting the CameraRange to a value way too large. This will 'dilute' the z-buffer accuracy and cause the visual errors you're seeing.

Last edited 2010


_PJ_(Posted 2010) [#4]
Big10p, CameraZoom will affect the 'visible' range of objects regardless of the CameraRange, since the fisheye effect near the edges of the screen highlights how the visual distance is affected by parallax.


vivaigiochi(Posted 2010) [#5]
okappa i will try to reduce camerarange.
i don't use real orthogonal camera via the problem mentioned.


vivaigiochi(Posted 2010) [#6]
NOOOO! problem seems remain equal, i have reduced the camerarange and the result is BLEAH!!! hovewer who know the solution to obtain a camera without depth and without the z-order problem?


_PJ_(Posted 2010) [#7]
Have you tried enabling W-Buffering?
WBuffer True


What exactly are you trying to do? The 'standard' means of accomplishing an orthographic view is to minimise the CameraZoom to a small value and set the CameraProjMode to 2


Stevie G(Posted 2010) [#8]
Reducing the ratio between the near and far camera ranges, rather than just reducing the far range, improves z-order issues. A ratio on or below 1:1000 (camera default ) should be used. If zoomed in, you should be able to increase the near range a fair bit.

Also, I believe using 32 bit depth when setting the graphics3d resolution will give more accurate z-order results than 16bit.


_PJ_(Posted 2010) [#9]
Again, even with a suitable range ratio, using obtuse CameraZoom values will still affect the apparent Z-Ordering, it's a phenomenon of how 3D computation tries to show opbjects that are off to one side in relation to those more definitely in front. No amount of tinkering with the range will help in this instance.


Stevie G(Posted 2010) [#10]
@ Malice, maybe so but I'm sure there are ways around it.

Personally, I don't understand why you are not using the native ortho camera. Once you understand the zoom values required it works perfectly. For example, if you had a quad set at world coords 0,0,0, with a width / height of 400 x 300 and wanted this to fit perfectly on screen you would set the zoom to 0.5 / 400.


vivaigiochi(Posted 2010) [#11]
my problem on using orthogonal camera is related on z-order of the object on screen (that i know are proper of orthogonal camera..).
i have used orthogonal camera but the result is orrible because of this.
so i have ask to community and the (good) solution was take the camera far of scene and use high value of zoom...
but hovewer the problem remain how can i obtain a camera like newsupermariobros?


vivaigiochi(Posted 2010) [#12]
yes Stevie G you say right.
thanks to all fory your help.