Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I learned at school that the z-axis is up. It is the same in modeling software like Blender. However in many games the y-axis is up.

What is reason?

share|improve this question
    
Actually, over here in university many people draw y in up-direction when they draw a 2D image (guess because in 2D y is also up and often we just use 3D as a generalization of 2D when showing examples). Cannot remember we really learnt a rule for it in school. –  Aufziehvogel Dec 25 '12 at 21:32
3  
Simple answer: for millions of years mathematicians drew XY graphs on paper which has X going left-right and Y going up-down, and when depth was added it became Z going in-out of the paper. Not so simple answer: no one agrees on anything, why would they agree on arbitrary axes? =) –  Patrick Hughes Dec 26 '12 at 0:27
1  
See also: gamedev.stackexchange.com/questions/13414/… –  Kylotan Dec 27 '12 at 14:46

4 Answers 4

up vote 33 down vote accepted

I think the direction of the coordinate axes are holdovers from different domains where the crucial plane was different, and X/Y were aligned with that crucial plane. In some applications the ground plane was the most important, thus X/Y were the ground and Z ended up perpendicular to that. For games however the crucial plane is usually the screen (especially of course back when they were 2D and just starting to transition to 3D) thus X/Y were the screen and then when games went 3D Z ended up perpendicular to that.

You can see that kind of distinction between the two biggest 3D art tools: 3ds max and Maya. The Z axis is up in 3ds max because that grew out of architectural tools, while the Y axis is up in Maya because that grew out of movie-making tools.

The important thing to realize when comparing any specific tool to what you learned in school is that it's all arbitrary. It really doesn't matter which way the axes are pointed as long as you keep everything consistent and translate correctly between different coordinate systems.

share|improve this answer

As far as I have ever gleaned the Y = up/down, and Z = depth is based off of physics where gravity is always in the (-Y) direction, and then adding 3D means you don't want to change a fundamental, so it was made depth.

On the Z = up/down method though that is a throw back to mathematicians. because X/Y was drawn on the paper that was flat on the table when the Z-axis was extended it was coming up out of the paper, and therefore up. though many of your engineers will also use this convention as well.

in regards to the convention used by the given tool: Maya, and Unity have Y-up (probably designed by someone with a physics background). while 3DsMax, and Unreal have Z-up (probably designed by mathematicians/engineers). though it can also be said that these could also be just a split decision made one day because a consistent system had to be used.

since this question focuses on a modelling tool, and is placed on a gamedevelopment Q&A site. you might want to look into what coordinate system you will be exporting to, and make sure that you conform to that.

also realize that some system the axis system is hard set, and permanent, and others it can be modified (think it can be changed in Blender and Unreal, but might be mistaken)

share|improve this answer

Because the coordinate system that are used in games are based off of the dimension of the monitor. When computer renders anything, it starts at the upper left hand corner which gives the x, and y coordinate of [ 0, 0 ]. As the rendering progresses towards the right side of the screen, the x value increments, respectively when the render moves down, the y value increments. The coordinate system is basically that of a 2D space, except the origin rest on the upper left hand corner and not the center of your screen.

In 3D packages such as 3DsMax and Maya, they have their own definition of x and y coordinates based on what is is important to them. 3DsMax was based off architectural design, if you draw a schematic on a 2D plane, y is up. In Maya, which is mainly use for animation therefore the ground is x, y and the height is z.

share|improve this answer
    
In Maya the screen is X/Y and Z is perpendicular to the screen. –  jhocking Dec 27 '12 at 13:07
    
Downvoted, because the question is "Why" not "How", it lacks the reasons as to why it is as it is, just reiterating how it is. –  Maik Semder Dec 27 '12 at 13:21
    
Well in fairness the first word is "because" ie. this answer starts with an explanation of reasons. Maybe it's not a great explanation, but it is an explanation. –  jhocking Dec 27 '12 at 16:32

It's mostly legacy from the times when all that could've been made with 3D was some screen-space rotating cube or parallax scrolling or something similar. In such applications, Z was "depth" because X and Y were the axes for the screen plane. As demos were getting more advanced, the original conventions stayed because it's easier not to change anything that works.

As for why exactly today's games have Y as the vertical axis - there are lots of poorly written tutorials out there that do not explain the difference. Usually it's most useful to have the primary movement plane on X and Y axes (so that most 2D calculations don't require swapping axes in code). For most sidescrollers, it is quite naturally coincident to the screen plane (X/Y). For adventure games and such, X/Y works nice as the horizontal plane (perpendicular to direction of gravity) because it maps perfectly to in-game maps, gamepad controls, terrain heightmaps and many other things.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.