The scene renders fine with normal projection, but when I use setProjectionType(PT_ORTHOGRAPHIC) on camera I see nothing.
To be exact, almost nothing: there are a few camera angles where I can see the scene, oddly enough.
I know position is correct, and so are clip planes. Not sure what to do. Thanks.
Scene doesn't render in orthographic projection
-
- Gnoblar
- Posts: 2
- Joined: Wed Sep 04, 2019 11:02 pm
- dark_sylinc
- OGRE Team Member
- Posts: 5296
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1278
- Contact:
Re: Scene doesn't render in orthographic projection
Hi!
When you're in orthographic mode, aside from position & orientation which are relevant like in projection mode, the function setOrthoWindow becomes relevant, as it tells how "big" the ortho projection is.
When you're in orthographic mode, aside from position & orientation which are relevant like in projection mode, the function setOrthoWindow becomes relevant, as it tells how "big" the ortho projection is.
-
- Gnoblar
- Posts: 2
- Joined: Wed Sep 04, 2019 11:02 pm
Re: Scene doesn't render in orthographic projection
I did use setOrtho too and when I see something it looks okay. Could it be a frustrum culling issue?
- luis
- Greenskin
- Posts: 122
- Joined: Tue Mar 02, 2004 3:33 pm
- Location: Spain / Argentina
- x 7
- Contact:
Re: Scene doesn't render in orthographic projection
I'm using ortho with this parameters:
The game displays a terrain in front the camera (the racing track) and the terrain is a square of about 140 units long
This code is quite old I'm setting position in the camera itself instead of attaching it to a node and settings position to the node.
Hope this helps.
Code: Select all
mCamera->setProjectionType( PT_ORTHOGRAPHIC );
mCamera->setPosition( 70.0, 50.0, 125.0 );
mCamera->lookAt( 70.0, -40.0, 0.0 );
mCamera->setOrthoWindowHeight( 528.0 );
This code is quite old I'm setting position in the camera itself instead of attaching it to a node and settings position to the node.
Hope this helps.