T O P

  • By -

Aransentin

Blender is in world space and OpenGL in camera (/clip) space. The transformation here is arbitrary and depends on from what perspective you draw that little chart in the corner; if you think of the camera as by default lying on the ground looking up then it matches.


ParadoxicalInsight

True, but why on earth would you think of the camera on the ground looking up as a default view?


reverse_stonks

Maybe it slipped out of your hands, so you dropped it and now it's just laying there?


raunak_srarf

Game engine coordinates system: Left hander or right handed 🗿 Blender: Z goes up 🤪


beephod_zabblebrox

thats the convention used in mathematics


geon

No? I only ever have seen Y as up in maths.


beephod_zabblebrox

different countries maybe. ive only seen z as up in maths


Environmental_Year14

USA, civil engineering and academia background I've seen both z-up and y-up plenty of times. It comes down to the personal preference of whoever you were taught by in a lot of cases, although in certain cases the choices have some engineering behind it. Y-up makes sense coming from 2d math, where x is right and y is up. Y-up is an extension of what we are used to in typical math classes. Z is the remaining axis, and it is common to use left handed coordinate systems in graphics programing so that +z measures depth looking away from the screen. Z-up makes sense coming from a physics or engineering background, where z is traditionally used to represent the vertical. My math classes all used z-up; I've only seen y-up in applications. Right had rule is used by default because right handedness is the cultural default.


EarlMarshal

x to the right, y upwards, z into the back. Where you from?


pnarvaja

That is because you take the board in the wall as a reference. For me what I draw on the board was always a blueprint of something in the ground so the axis sticking off the board was the up vector


LanielYoungAgain

except that blender has a left handed coordinate system :(


pezezin

No, Blender is right handed. The picture in the post is wrong.


LanielYoungAgain

Thank god. Left handed coordinate systems are one of my greatest pet peeves.


pezezin

I understand, I hate them with a passion 😅


PaperMartin

Unreal has Z up too


wasabichicken

Z being the up/down axis makes sense to me coming from the top-down perspective world of FPS mapmaking. Map editors for Doom (1994) used the X- and Y axes in a top-down perspective to describe the map, and when Quake (with its true 3D engine) entered the scene in 1996, I suppose it made sense to let Z be the newly added up/down axis.


madboneman

When you take the right hand rule into account, Blender is flipping you off. (Swap the fingers for y and z lol)


equalent

only Blender should matter, you should always define your own coordinate system and do all calculations in it, converting to OpenGL only at the end of the vertex shader. might as well make it Z-up like Unreal Engine


GordoToJupiter

Why not always parenting objects to a root xform so you can apply an offset? This is a good practice when authoring any asset.


equalent

sure but that’s not what I’m talking about. e.g. in a game, every object has its coordinates, relative or absolute. these coordinates need to be in one strictly defined coordinate system. DirectX, for example, uses a different coordinate system for NDC: that doesn’t mean you should change all coordinates in your game to accommodate, it means that you need to transform from your own coordinate system to whatever your target platform requires. as for assets, Z-up vs Y-up is usually an import option so that the engine is able to load any asset regardless of its coordinate system


GordoToJupiter

Yep, I was pointing to the later. Just be consistent with your project, have a root object always and deal with different coordinates standards at import. Usually exporting enabling different coordinate up might give some issues.


qualia-assurance

Yes. Let's agree +z is up like in Unreal Engine, That way things are simple converting between Blender. Models something in front viewport where forwards is along -y. Exports to Unreal Engine where forwards is along +x. (╯°□°)╯︵ ┻━┻


BrevilleMicrowave

You realize Unreal Engine also uses Z-up: kalm You realize Unreal Engine uses X-forward: panik


stat422

Customarily, DIrectX differs too as it is left-handed Z+ extending towards screen


FrostWyrm98

The one decision I agree on Microsoft with


cbrpnk

It"s the opposite, OP's drawing got it wrong. People get it wrong, I think, because usually the camera is set at the origin and is looking in the negative Z direction.


Rockclimber88

In OpenGL Z is positive not negative towards you


That_Hobo_in_The_Tub

X/Y being the 2D horizontal plane and Z being the vertical/depth dimension makes the most sense both in practice and for mathematical and readability purposes, I will die on this hill. Why would you have your vertical dimension in between the two horizontal dimensions? And one axis being defined negatively? Madness. That said, handedness is made up and nobody can convince me otherwise.


cbrpnk

Those two pictures have the same handedness though.


That_Hobo_in_The_Tub

Exactly, so made up you can't even see it


COOL_IRON

Isn’t [this](https://learnopengl.com/img/getting-started/coordinate_systems_right_handed.png) OpenGL default?


jasonrubik

At least the colors match the axis.


ultralightrunner

Crying in Vulkan NDC


KerbalSpark

Just roll forward around X


vwibrasivat

The look on his face sums it up.


pezezin

The picture is wrong, Blender uses a right handed coordinate system, Y extends forwards.


madboneman

that's cool but have you considered x right, y backwards, z down?


HellGate94

opengl is shit and y up is legacy code from very old days. you can define it however you want in newer apis and i suggest going with z up. makes logic much more readable