Author Topic: Orthogonal Rendering for Groundviews  (Read 2374 times)

Offline adler

  • byte
  • *
  • Posts: 3
    • View Profile
Orthogonal Rendering for Groundviews
« on: September 15, 2015, 06:29:47 pm »
Hello,

i found only quite old posts about rendering using orthogonal projection. I would like to use it to render a second viewport
with a groundview for orientations, so i would render from top down without perspective.

Has something changed regarding that Topic?


Greetings

Offline Gatobot14

  • int
  • **
  • Posts: 64
    • View Profile
Re: Orthogonal Rendering for Groundviews
« Reply #1 on: September 15, 2015, 06:32:01 pm »
why dont use a camera that points exactly to the ground? how much that can affect your gameplay?

Offline adler

  • byte
  • *
  • Posts: 3
    • View Profile
Re: Orthogonal Rendering for Groundviews
« Reply #2 on: September 16, 2015, 12:54:32 pm »
Hey,

it is not against you but it is funny if somebody write about a problem and get answers like
"why would you do this" or "can you do it a different way"? Belive me that i have my reasons.

I never wrote that i code a game :) I want to interactively place positions on the groundview.
This also means that i have to place corners of a polygon that will be tesselated afterwards.
In perspective projection a high geometry (a building) would be an obstacle to parts of the
ground. Only in orthographic Projection i do not have this.

It could be an alternative to use a small fov and a far distance. This would be a compromise
not a solution. I do not see the reason why it should be forbidden to the the projection matrix.
This would be a basic feature to create modelling tolls and authoring systems as well. Show me
a 3D Modelling Application that does not support orthographic rendering and let me consider a
Gameeditor as some kind of modelling App.

Greets

Offline adler

  • byte
  • *
  • Posts: 3
    • View Profile
Re: Orthogonal Rendering for Groundviews
« Reply #3 on: September 16, 2015, 01:57:17 pm »
I found the answer and it is no.

Camera has a getProjectionMatrix which some can override to set a orthogonal projection matrix. BUT this Matrix is not used in the Renderer. In GLRenderer.setFrustum the camera parameters are set, but here the parameters are derived from fov specification. Because it is private it is not allowed to override.

Nevertheless - i would like to suggest Ortho Rendering as Feature Request. I knew this would make things like billboards or picking in some topics more complicated but it could be sufficient to support only the rendering orthogonal.

Greets

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Orthogonal Rendering for Groundviews
« Reply #4 on: September 16, 2015, 05:41:03 pm »
It's not supported (as you've found out already) and I've no plans for adding support for. If you are using OpenGL ES 2.0, you can of course inject your own projection matrix into the shader in addition and use that in your calculations. It may interfere with the engine's culling, but there should be a way around this if it becomes a problem.

I hope this helps somehow...