How to use orthographics projection

Blitz3D Forums/Blitz3D Programming/How to use orthographics projection

Matty(Posted 2004) [#1]
Can someone explain to me how you use orthographic projection as one of the camera modes. An example of it in use would be helpful.

I assume it is a view in a particular direction with no perspective. Is this correct?


Bot Builder(Posted 2004) [#2]
Yes.

Graphics3D 640,480,32,2

cube=CreateCube()
RotateEntity cube,45,45,45

cam=CreateCamera()
;comment the following two lines to view it unorthoganoly
CameraProjMode cam,2
CameraZoom cam,.1

PositionEntity cam,0,0,-5

WireFrame True 

While Not KeyHit(1)
	RenderWorld
	Flip
Wend


Okay, not much of a sample in use. It is usually used for isometric 3d, like the 3d view in "ant attack" (in the showcase section now I believe)


Matty(Posted 2004) [#3]
Thanks heaps, after testing out a few things it looks like just what I am after.


Stevie G(Posted 2004) [#4]
Matty, you'll get all sorts of z order issues - which you'll soon find out.

It's better IMHO to set up a high camerarange, move the camera far away from the scene and camerazoom right in - acheives much the same effect without the z-order issues.


Gabriel(Posted 2004) [#5]
Haven't used it for a long time, but I seem to recall it being quite slow too?


DJWoodgate(Posted 2004) [#6]
That may be because there is currently no entity level orthographic mode culling. The culling you do get is based on the equivalent settings for a perspective camera. And of course a zoom of 0.1 gives you a pretty large FOV with a perspective camera. Stuff still gets clipped of course but a lot of unnecessary geometry may have to be processed.


Gabriel(Posted 2004) [#7]
That would certainly make sense, but I don't think it would have been an issue in the game I was thinking of. Could be though.