Jump to content
  • Advertisement
Sign in to follow this  
FlyingSolo

Simple 3D transform in 2D GL_Ortho ?

This topic is 1159 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement

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

Thanks for the suggestions, but sadly it would seem unlikely we can achieve what we wanted.

 

Wishing now I'd gone 3D in the first place!

 

Thanks :-)

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!