Sign in to follow this  
FlyingSolo

Simple 3D transform in 2D GL_Ortho ?

Recommended Posts

I'm in a bit of a pickle and would really appreciate some help with this.

 

I've got a large and complex project which has strictly been a 2D affair - until now.

 

I need to display what I'll describe as a "Clock Face" as though it was lying on the table in front of you. Looking at it from this viewpoint it becomes elliptical.  I can't draw a simple ellipse to emulate this though since I need the clock face (and the texture on it) to rotate.

 

Can anyone offer me some hope that this can be achieved?

 

Many thanks :-)

 

Share this post


Link to post
Share on other sites

Maybe you can pre-transform the vertices of your model before drawing (so it will look like a 3D ellipse), and animate the UVs so you can make it visually rotate.

If you want the model itself to rotate, you'll have to use a vertex shader and appropriate perspective projection matrices.

Edited by Zylann

Share this post


Link to post
Share on other sites
If you want perspective projection, you'll want to render it in 3d.

If you want to keep your main scene 2d ortho, you can render a 3d perspective object to a texture and then splat it into your scene.

It's also pretty easy to convert a flat 2d ortho into a matte plane of a 3d projection.. But to render 3d objects against it you'll need a rational approach to z depth occluding.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this