whats your up vector?

Started by
23 comments, last by vNistelrooy 17 years, 10 months ago
I always use Y+ as my up, as well.

Advertisement
I like +Y to be up in the engine (since Z is usually depth in a graphics context), but +Z to be up in the world for the level designers (since Z is usually altitude in a world context). Then you just reconcile the difference in your level loader and everyone's happy.
+Y in local space, +Z in world space (when it makes sense for xy to be the 'ground' plane).
Haha... when I first read the title, I thought it said "what's up your vector?" and laughed at the geeky joke.

Definitely Y. Z is always feels like depth to me.
Im pretty sure if you use Z as your up vector, your crazy or some 3D program's bitch. Up is obviously in the Y direction and Z is depth.


The only place this fails to work for me is when using heightmaps. Id like to represent the heightmap as a X/Y array, but since I use Y as up (in 2D sense).. I find I cant use my beloved Y for the actual y scaling of my heightmapKinda annoying, maybe I should switch :(
Consider a regular graph on a computer screen (y = cos x or whatever) and do the following:
  1. Fix a way to describe deepth (z-axis)
Why would 'up' suddenly change?
[s]--------------------------------------------------------[/s]chromecode.com - software with source code
+Y for me.
----------------------------"I refuse to answer that question on the grounds that I don't know the answer"-- Douglas Adams (1952 - 2001)
Z all the way; I think in world space, and the (x,y) plane is always the ground for me.

If I was working on a side scroller I might make Y the vertical...
Geordi
George D. Filiotis

I am actually surprised to see that so many people use Y as their up vector.

Quote:
Im pretty sure if you use Z as your up vector, your crazy or some 3D program's bitch. Up is obviously in the Y direction and Z is depth.


By no means I find it obvious that Z is "depth". In the screen space it just happens to be more logical that way. I have 3d modelling background, but I consider z to be up even before using these programs.

But if you are moving on a 2d-grid, is it logical to express your location as x,z pair or x,y pair ? When you add the height to the 2d grid, it seems more logical that the height is the z.

Another thing, if you are moving in space with huge bodies such as planets etc, which way is up ?
I'd say that anyone who did 2D maths would naturally pick up +Y as Up & +X as Right, so +Z is either toward you or 'inside' the screen...
Then depending on your favorite API you might have changed your mind and adapt.

I use OpenGL coordinates for they match my natural X & Y choices.

It's really up to each what to use, in the end you'll be able to perform a simple transform to get things right no matter what system you use.
-* So many things to do, so little time to spend. *-

This topic is closed to new replies.

Advertisement