Orthographic pain...

Blitz3D Forums/Blitz3D Programming/Orthographic pain...

Sledge(Posted 2003) [#1]
Anyone know it it's possible to have 3d objects drawn properly in an orthographic view? At the moment I'm finding that the "backs" of objects (the bits furthest away from the camera) are drawn through their fronts (the bits nearest the camera) using camera mode 2 when what I'm really after is simply for objects to be drawn "square-on" to the camera regardless of their position in space (which is happening, it's just being spoiled by the z-ordering of objects' surfaces).

The docs say that terrains will mess up under orthographic projection, which kind of suggests that other entities won't -- am I right to expect this? I'm bracing myself for bad news...


Sledge(Posted 2003) [#2]
Okay, I've faked the kind of projection I require so won't be needing mode 2. Still interested to know what to expect from entity rendering under ortho' projection though. If anyone can fill me in I'd appreciate it.


GfK(Posted 2003) [#3]
The docs say that terrains will mess up under orthographic projection, which kind of suggests that other entities won't -- am I right to expect this?
I find it hard to believe that cameramode 2 should chaff up *every* entity - although I know it does cos I tried it myself.

Didn't use it in the end cos I couldn't be bothered to figure it all out. And it made my skybox look weird. :)

I seem to recall that enabling the w-buffer made some difference, so you could try that. Haven't got Blitz on this PC so can't check it out for myself atm.


Sledge(Posted 2003) [#4]

I seem to recall that enabling the w-buffer made some difference



Yes, I too thought about altering the buffer used. Unfortunately, like an idiot, while I had tried activating the WBuffer in the hopes that it would solve the problem, I did so using a 16-bit display (purely to keep the required specs lower than would otherwise be the case) having quite forgotten that, as such, WBuffer is enabled by default! I grew a brain today and tried turning the WBuffer OFF instead -- the entities in question went back to looking how they should once more, so perhaps it would be useful for you to try your code under similar circustances.

I think I will avoid ortho' projection though, if it makes some entities look odd (your weird skybox, for example) even using the ZBuffer. If you could describe "weird", that would be reet helpful :)


GfK(Posted 2003) [#5]
DEFINITION OF 'WEIRD', by GFK, age 28 1/2.
---------------------------------------

WEIRD = the skybox is 30x30x30. Using ortho projection worked "ok" in itself, but applying camerazoom (as one must when using ortho), caused the skybox to scale disproportionately to everything else.


Sledge(Posted 2003) [#6]

DEFINITION OF 'WEIRD'...



Thanks for that... it's not actually too bad, being something one can account for reaasonably easily. I was afraid it would be something that might differ from card to card or completely ruin the scene, but the disproportionate size thing is something that sprites seem to suffer from also under projection mode 2. Is there are speed difference between the two modes, does anyone know? I could probably put up with size-tweaking at this stage if there was even a slight pay-off in performance.