Where Blender's Axes are Defined?

I’ve been hunting through the source trying to figure out where Blender defines its axes/orientation. Could someone please point me at the right file(s)?

1 Like

This question is too vague to answer, it’s not clear what you mean exactly or want to achieve.

If you want to change Blender to have e.g. a different up axis, that’s not something that’s explicitly defined in a specific place. It’s an implicit assumption throughout the code.

Not sure what your goal is, but if you’re trying to make Blender Y-up or something, you’re better off doing what Modo does and just change the user’s perception of which axis is up and then handling the transformation on export to any other file format, rather than change the actual coordinate system (which would probably be a herculean feat at this point).

3 Likes

This thought has always appealed to me. Probably full of ugly weeds, but still interesting to think about.

1 Like

It honestly wouldn’t be that difficult, the hardest part would be making sure all of the exporters can correctly transform to a new coordinate system (which most already do). The rest is just polishing up the user experience- changing the viewport Gizmo, re-ordering any vec3 properties, etc. At the end of the day it boils down to demand… do people really care that much?

1 Like

I’m not (yet) convinced. I’ve got down uncountable roads that ended up dark and full of terrors that started with “not that difficult” and “just”. It would have to add minimal complexity yet work 100%. Even if it worked 98% we’d be inviting new bug reports from people complaining about something moving backward while running it “x-up”. LOL

1 Like

Oh for sure, a solution like this would basically be edge-case whack-a-mole, but the consequences wouldn’t be as dire as trying to unravel the underpinnings of the whole coordinate system. So I guess ‘not that difficult’ is entirely relative in this case :slight_smile:

Hey, I would probably contribute to a branch if someone else wanted to start such a project, just because it would be fun making it look as if it were Y-up. But I think I would quickly get bored of making it actually work that way. I don’t like having an unknown number of moles to whack.

Any idea of how Maya handles its axes? Maybe like Modo since we can chose between yup and zup in its preferences and the exported assets are always as asked in the export options.

If the goal is “Y up”, there aren’t that many places where the coordinates really matter. Walk/fly (which I never use, hence assume nobody else ever uses lol), default gravity vector. The big one is the view, which orbits based around poles at plus and minus world Z. And which, to my knowledge, can’t be changed without coding up a fork.

Change the view tracking poles, and if people want to change their numpad 7 hotkey to numpad 1, they can feel free. (Wouldn’t expect it would be worth it to try to change the whole coordinate system handedness, I doubt anybody is very invested in whether they’re moving in plus or minus X.)

Honestly, I don’t really know why people care… Up is up, left is left, etc. Shouldn’t really matter what color your arrows are, so long as when you export it’s pointing the right direction for the target coordinate system (which already happens). That said, clearly there is a lot of interest in this type of functionality- since the reasons seem to be somatic, I still think changing the users perception of what the axes are is a much better idea than messing with things like gravity, gimbal rotation order, etc.

you’d be surprised: https://blender.community/c/rightclickselect/3Tdbbc/

Its very Important to change y _up you want to know why because its world base all software in world make z up except blender take look befor 3d software the x is left and y is up after create 3d software they add z mean depth so we have change and make y up in official blender 2.81

First- welcome to devtalk. Second- low effort arguments like that aren’t going to get you very far here, so there’s not much point in trying unless you’re going to put forth a more compelling case that can be discussed rationally.

Thanks for the welcome. Tell me how to make the topic big for discussion. I have an idea. What do you think you would do to post a vote about that topic on the Facebook page? Or I have big idea what about add this change in preferences like spacebar if I want to change y to up just by preferences ?

To be totally honest, something like that is best posted on Right Click Select. If you’re not familiar, it’s a site where people can pitch ideas/proposals to the blender community and they will get upvoted or downvoted based on user interest. Doing a quick search, I can see that there are already several proposals asking for Blender to be made Y-up, so the easiest thing to do would just be to upvote one of those and add your own comments on the subject to one of the existing threads for discussion Proposal: Industry standard axis orientation option (Y up axis, Z depth axis)

I apologize for my vagueness…

I’m working toward an understanding how to build a 3D viewport, a view into a 3D world, in other words. I’m assuming that the axes have to be defined somewhere so that everything else viewport related can reference them?

And please also excuse my tardiness in replying. It involves alligators, armpits, and a lack of wack-a-mole clubs.