3d models in a 2d space.

Is it possible to display and rotate a 3d model in a 2d container?

Even asking this question sounds stupid to me!!

I want a top down style game experience but with spinning globes. Animated graphics wont do the trick, I’ll end up with hundreds of animations and don’t want that overhead. So I need a spinning model.


Yes absolutely, basically every 3D rendering transforms the 3D meshes to a 2D surface.

In monogame you can draw the 3D objects onto the screen or onto a texture which you can use like any other one.

Google for 3D XNA or monogame Tutorials and you can try it for yourself

Perhaps you are talking about Orthographic projection?

nkast. Yes, I guess Orthographic fits, but as an orthographic projection kind of assumes a 3d environment, can you apply orthographic to a 2d plane? It doesn’t really matter, that’s the kind of thing I’m looking for.

kosmo. Looking at the 3d examples I’d found I’d assumed I needed a world, camera, view and all that jazz, are you saying I don’t? I’ve done a bit of drawing textures onto other textures, are you saying I set a world and view then draw the model onto a sprite?

I’d sooner stay in the 2d coordinate system for the game if this is possible.


GPU rendering is all in 3D. SpriteBatch really just draws textured quads (with vertices having 3D coordinates) and applies an orthographic projection. So you can just use the same projection spritebatch uses to mix and match real 3d animations that appear in 2D and quads (using spritebatch).

World: Matrix.Identity
View: Matrix.Identity (Change this to use a camera.)
Projection: Matrix.CreateOrthographicOffCenter(0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height, 0, 0, -1);

That will give you what you want.

If you want use a camera the view matrix becomes:

Matrix.CreateTranslation(new Vector3(-Position, 0.0f)) *
Matrix.CreateTranslation(new Vector3(-Origin, 0.0f)) *
Matrix.CreateRotationZ(Rotation) *
Matrix.CreateScale(Zoom, Zoom, 1) *
Matrix.CreateTranslation(new Vector3(Origin, 0.0f));

A perspective camera flattens everything to a 2D plane.
Take a look at my perspective camera for clues on how you can use it. (no samples yet, sorry)

Yeah, I do a load of 3d animation and modelling. I just don’t always get the terminology right!