About Store Forum Documentation Contact
Donations:
345$/mo



Post Reply 
How to render 3D objects in a 2D world?
Author Message
jordicat Offline
Member

Post: #1
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
Find all posts by this user Quote this message in a reply
evldmn Offline
Member

Post: #2
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 [Image: erilxy.png]
Look at trine for example, if it didn't have depth it would look boring and DEPRESSING.
[Image: trine-20090601103438823.jpg]
Still if you want to make it only 2d, without depth, make it with sprites.
09-07-2011 07:28 AM
Find all posts by this user Quote this message in a reply
Post Reply