Game Development Community

Which way is up?

by Timothy Graupmann · in Torque 3D Professional · 04/22/2009 (6:21 pm) · 28 replies

I was watching the excellent terrain editing video series and saw something really interesting. www.vimeo.com/2762649 Apparently the Z axis is the up axis?

Does T3D use the Y axis as up? Or the Z axis as up?

Is the up axis configurable or as simple as rotating the camera?
Page «Previous 1 2
#1
04/22/2009 (6:41 pm)
Since when has the Z axis not been the vertical - in any 3D application? That's TGEA 1.7.1 in the vid.
#2
04/22/2009 (6:59 pm)
Y is up in Modo.
#3
04/22/2009 (7:04 pm)
Its actually quite common for the Y-Axis to take on the representation of "UP" in 3D, but for all 3D Torque Engines, positive Z is up.
#4
04/22/2009 (7:24 pm)
I suppose it depends on the perspective the viewer/interface is built from then. Whether a default perspective would be from the horizontal (which I think is strange but hey) or ornithological/topdown were Z would be the vertical.
#5
04/23/2009 (1:50 am)
Well Z is depth, and depth is not up :-)
In 2D, X is horizontal, Y vertical
In 3D, X is horizontal, Y vertical and Z depth
Also to get Z to be up, I'm fairly sure Torque has to apply a rotation matrix each time since with an identity matrix it'd be Y up...
#6
04/23/2009 (3:21 am)
There is not correct answer (or extra rotation), its simply an arbitrary choice. Torque has always been a Z = up, the people who invented the Z buffer had Z = depth, its just a label that represents an axis. If its makes you feel better use W = depth ;)

Personally i'm on the Z=depth school of thought but then you can just move onto the classic Y up or down argument? :P again its just an arbitrary choice as the maths is coordinate system invariant.

Just always be consistent, and then realise how much of a pain rotations are :D
#7
04/23/2009 (3:36 am)
Z is depth in screen space, but that's not the necessarily same as world space, which can be Y or Z up. Both 3DMax and Blender use Z as up, while other 3D packages are Y up. Here is my armchair reasoning as to how there are two different conventions:

When I was a physics student in the early nineties, our text books and lectures all assumed Z up. I suppose physicists and other scholars throughout the ages were used to looking down on a page. X was left/right on the page and Y was top/bottom. The Z axis "obviously" and magically came out of the page to form the height component. 3DS Max, which evolved out of a CAD program, followed that reasoning. Its possible that Torque originally supported 3DS Max and that's why Z is up.

On the flip side, people involved with film for many years prior to computers looked through a lens, which was normally not pointed down, but perpendicular to the ground. X was still left/right and Y was still top/bottom. However, now Z was "obviously" the distance into the image and the distance to the subject.

Now that we all have computers and the vertical oriented monitors, its natural to side with the latter group. New 3D packages perhaps prefer Y-up for this reason. For me personally, I do a lot of design work on looking down on a piece of paper, so Z-up will always make the most sense for me :)




#8
04/23/2009 (7:22 am)
Convention has gravity moving in the Z direction, which makes the ground in the x-y plane most convenient. When you use the terrain engine, it will place terrain in the xy, height adjusted in z. I'm speaking of TGE and TGEA, haven't tried it in T3D but I imagine it is still the same.
#9
04/23/2009 (7:40 am)
Mathematician / Physician convetions have yes.

Game engines normally have it in the Y direction as the game coordinate systems started out with X - Y from the screen coordinates.
Thats also the reason why it is called z buffer and not y buffer.
#10
04/23/2009 (10:01 am)
This question is not to be confused with the other often asked question in game development. Namely, which way is forward?
#11
04/23/2009 (10:09 am)
There are multiple coordinate systems that can be used by 3D applications. Just for added clarity:

Quoted From Torque 3D Documentation

Each gizmo has a unique appearance to notify you of what you are adjust. When you wish to move an object from one place to another, you will use the Translate Tool. This is represented by a gizmo with arrows pointing toward different axes.

ggbetas.com/irc_hour_logs/TranslateGizmo.jpg
You can grab an arrow to move the object along an axis, or grab a space between two arrows to move it in both directions.


If you look carefully, you should see letters at the end of each arrow. These correspond to Torque 3D's world coordinate system. The engine utilizes the right-handed (or positive) Cartesian coordinate system, where Z is up (top), X is forward (front), and Y is side (left). This applies to the rest of the gizmos.
#12
04/23/2009 (10:51 am)
I recognize different systems choose various coordinate systems.

My original question was, is the Torque coordinate system configurable? Can I use setting to force all the gizmos to switch to left hand or right hand coordinate systems?

Otherwise I'll just rotate the camera. Assuming terrain can be painted sideways?

Or I can rotate my head and concede Z is up.
#13
04/23/2009 (11:01 am)
<bzbzbzbzb>

That was my brain short circuiting at that concept Timothy. No, it's not really configurable. Just keep the system in mind while creating your assets, and while designing your level.
#14
04/23/2009 (11:16 am)
Quote:
Quoted From Torque 3D Documentation
... notify you of what you are adjust.
Docs need a quick grammar check.

Cartesian - from cartography I suspect - that's what I meant to say originally but ended up with Ornithological/bird's eye view/other gibberish.

Quote:Or I can rotate my head and concede Z is up.
ROFL! Turn monitor on side = save neck muscles.
#15
04/23/2009 (11:20 am)
@Steve - Thanks for that correction. I do not have an editor, so when the first set of docs go live today I'll be relying on the community to spot problems.
#16
04/23/2009 (11:41 am)
Quote:
the first set of docs go live today
That's a legally binding statement!
#17
04/23/2009 (12:57 pm)
Doc's live today :)
#18
04/23/2009 (1:46 pm)
Docs? what docs? where?
#19
04/23/2009 (2:07 pm)
The link is not ready yet. We are in the process of pushing the first test live. Once that test is successful, I will start pushing new content.
#20
04/23/2009 (2:27 pm)
BTW I was going to buy the book written in 2006, and then the book written in 2008. From the post in another thread, it seemed like those books would not be worth buying for either 1.8 TGEA or Torque3d. Is that the position of GG?
Page «Previous 1 2