Jump to content
  • Advertisement
Sign in to follow this  
pjuke

How to draw 2d images in "3d view" ?

This topic is 3247 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

Hello! Couldn't think of a better topic, but I will explain: I'm working on a small 2d game but I need some help with my sprites and textures in the game. My question is simple: How do I draw a texture so it gives the impression of being viewed from a ~70 degree angle, not straigt from the top ? You have seen this in Age of Empires, Diablo, Warcraft 3.. etc. etc. Do you understand? I maybe explain a bit odd, but take a look at this picture of an "island" i made really quick in PhotoShop: http://img94.imageshack.us/img94/6245/islandhouse.png You see that the house doesn't really fit in does it? That's why the grass is drawn from the top perspective, but the house is drawn in this angle Im talking about. So can I achieve this?

Share this post


Link to post
Share on other sites
Advertisement
What you are after is called "Isometric tile rendering" or something in the lines of that. I have no experience of this myself. But google might help, or someone else here on the forum.

Share this post


Link to post
Share on other sites
Usually you draw the tiles as "diamonds" instead of squares.
See http://www.splatnull.com/blog/wp-content/uploads/2009/09/diamond_staggered.png for example.

It's all in the appearance and texture - if it's 2D, you must draw it three dimensional for it to feel right. If it's a 3D game however, simply tilt the tile 45-70 degrees.

Share this post


Link to post
Share on other sites
This perspective is called "3/4 overhead" (in addition to isometric) so you could try googling that. Also have you ever read a basic book on perspective drawing? It's really useful to know how to use a t-square and where to put the vanishing points (and how many, and wtf is a vanishing point anyway).

Share this post


Link to post
Share on other sites
The typical isometric game (ie, Diablo) uses an axonometric projection that results in a 2:1 on-screen tile ratio, ie tiles that are twice as wide as they are tall. With that in mind, you need to draw your ground tiles so that the ground features and bumps are twice as densely packed in the Y direction as in the X, to simulate being viewed at an oblique angle. A simple way to do it is to draw your texture squarely as normal, then map it to a polygon in a 3D editor. Set up your camera so that you view the polygon from about 30 degrees above the horizon, and render it. (Rotate 45 degrees around the vertical axis to get the diamond-shape of a typical isometric tile.)



Also, when you draw or create your ground textures, remember that the human brain typically relies on lighting and shading to provide information about a surface, so you should shade the surface accordingly to provide the depth information the brain needs to make a judgment on what the view angle is.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!