Simple 3D transform in 2D GL_Ortho ?

Started by
2 comments, last by jeskeca 8 years, 12 months ago

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 :-)

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.

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 :-)

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.

This topic is closed to new replies.

Advertisement