This topic is 4247 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

this should be some kind of poll :) how do you usually set up the up-vector of your camera? y-axis? <0,1,0> z-axis? <0,0,1> or even x-axis? <1,0,0> personally i like y, but since 3ds max is kind of a standard for game models and it uses z, i consider changing.

##### Share on other sites
Y. If I'm dealing with meshes from a different coordinate system, I just rotate them. Here's a matrix that swaps a mesh's Y and Z axis:

1 0 0 00 0 1 00 1 0 00 0 0 1

##### Share on other sites
Y, all the way. I don't know why, but it just feels most natural. Probably because in 2D, y is up and down on my monitor, so I want to keep that assossiation with 3D.

##### Share on other sites
yer, respect to +y

2d x (left/right), y (up/down)

##### Share on other sites
Normally for me, +Z is +Altitude.. so <0,0,1>

##### Share on other sites
- Z-up feels more natural for me. I see the up coordinate to be an extension to the x,y 2d space.

In a 3d-world, it feels simpler to define a location of something as x,y-coordinate pair than x,z.

About the screen space correlating to the 3d space, I get most annoyed in 3d modelling programs such as AutoCAD when they change the z-axis to be y-axis.

##### Share on other sites
I like Y+ as up and Z+ as depth.
Coming from a 2D background the x controls left and right, and Y controls up and down. Then Z would naturally add depth and make things 3D.

If you started doing 3D by looking at 3D software like 3D Studio Max you'd probably like Z+ as up more :)

##### Share on other sites
Y-Axis - <0, 1, 0>

##### Share on other sites
Y-axis is always up for me. I can't see why you'd use Z. All math and physics use Y as the up axis (at least that I've seen so far) so why change it?

##### Share on other sites
Quote:
 Original post by NickGravelynI can't see why you'd use Z.

Terrains, x,y -> latitutude, longitude (heightmap indices, x,y are 'natura' loop itors)
z-> altitude

Z is also the direction the OpenGL camera looks through, and if you're looking down on a terrain from a birds eye view, then....

The point is moot, my game's a Descent Clone, there is no up or down. And I use a freecamera that uses direct orientation matrices so I don't care about x,y,z rotation direction reference...

and my physics code is all Vector/Matrix encapsulated, so i don't care what direction the textbooks use as up or down; I don't deal with anything that low level...

So Yeah, 'up' is pretty meaningless

##### Share on other sites
I always use Y+ as my up, as well.

##### Share on other sites
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.

##### Share on other sites
+Y in local space, +Z in world space (when it makes sense for xy to be the 'ground' plane).

##### Share on other sites
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.

##### Share on other sites
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 :(

##### Share on other sites
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?

+Y for me.

##### Share on other sites
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...

##### Share on other sites

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 ?

##### Share on other sites
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...

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.

##### Share on other sites
Both.

Neither is superior to the other, they just have their own uses. It's very clear that x,y are the primary axes, and z is the third axis. So it all just depends on what way is most convenient to orient your x,y plane. When you're working with a map, it's obviously the ground plane. When you're working in screen space it's obviously the screen plane. So which way is up? It depends on the situation...

##### Share on other sites
I've always used Y as pretty much all the samples and tutorials and books I've read have dealt with it that way. Not had a reason to change the way it was shown me yet.

But looking at a 2D graph X was always across and Y was always up so it makes sense that 3D would introduce a 3rd option for depth.

##### Share on other sites
I'm 'Y' person, though orginally i was +Z because of the modeling software, but once i began G-Programming all the tutorials used Y, and i found it more convinient. But modeling software, for some reason use +Z. And most pure math books use Z for the up vector, while more programing type(especially DX) books use Y.

##### Share on other sites

overall it seems it is pretty even out between Y and Z.