jordicat
Member
|
How to render 3D objects in a 2D world?
Hello!,
I amb designing a orthographic game that has 3D objects in a custom viewport, but I want to use 2d coordinates (2D screen coords. x,y) in the render to draw.
example MyObject3D.Draw(x_screen, y_screen, sizex, sizey)
I have changed FOV to 5 degrees only to make disappear the perspective effect.
I have the code to do the translation from 2D to 3D, but when I use a custom viewport (ViewRect(...)) the objects renders to an incorrect position/size, I have tried much but only works when ViewRect is whole screen, not a part of screen.
So the question: is there some way to render 3D created objects (Ball's for example) directly to an orthographic view (2D), not like normal perspective view. Changing the matrix ?
In other words: to render meshes with lights, bumpmapping effect... but in a 2D world with only the coordinates of the screen.
Thanks very much.
Jordi.
|
|
08-11-2011 09:54 PM |
|
evldmn
Member
|
RE: How to render 3D objects in a 2D world?
Why would you do that? Just make the camera look at the scene in a 2D way. It will look better and give more depth. Here's what I'm talking about
Look at trine for example, if it didn't have depth it would look boring and DEPRESSING.
Still if you want to make it only 2d, without depth, make it with sprites.
|
|
09-07-2011 07:28 AM |
|