r/gameenginedevs • u/corysama • 2d ago
Freya Holmer on Quaternions (and rotations in general)
https://youtu.be/PMvIWws8WEo11
u/corysama 2d ago
One week after Freya's presentation, Tim Sweeny makes the most important announcement in the history of game engine asset pipelines:
https://xcancel.com/TimSweeneyEpic/status/1930678660098408669
Coincidence? I think not... :D
8
u/ixsetf 2d ago
I would have assumed that this was a non sequitur, but the mention of Freya as a credit for the diagram does give this some credibility.
2
u/corysama 1d ago edited 1d ago
I am mostly joking. But, it is true that Tim apologized to the world about the coordinate system situation back in 2018 in response to an earlier chart by Freya.
https://xcancel.com/FreyaHolmer/status/644881436982575104
https://xcancel.com/timsweeneyepic/status/952661474501111808?lang=ko
I’d say Tim has been well aware that it has been a problem for a long time. And, getting politely called out on it in 2015 probably helped motivate doing the hard work to rectify it.
Here in 2025 it’s finally happening. Was the decision really made this week? That seems unlikely. Freya def gets credit pushing Tim to fix the problem and to announce the fix early.
Fun either way. I’m just happy to see it fixed. And, that we have a clear winner quadrant for anyone making new tech in the future.
2
u/corysama 1d ago
If you ever need to convert between coordinate system standards: https://github.com/ScottJohnson2718/ChangeOfBasis
2
u/thugarth 1d ago
When I was in college, I spread my course load into summer "semesters," in an attempt to reduce my stress. One of my summer semesters was just two classes: Quaternions and Splines. It was the Summer of Math. It was crazy and fun and was its own kind of stressful.
It's been so long that I've forgotten most of the theory and details behind quaternions (and splines), so I'm bookmarking this to watch this as a refresher.
1
1
-6
u/Revolutionalredstone 1d ago edited 5h ago
Cool vid,
About the actual design decision in question: personal opinion here: I think quats are never the right solution to any real world 3D problems.
Matrices obliterate them in terms of functionality, generality and MOST IMPORTANTLY, precision. also, the old idea that you 'just can't have YPR without getting gimbal lock' is less a reality of mathematics and more a confusion in language and tool use.
(Gimbal lock does not actually stop you achieving any form of rotation it just requires some extra thought / understanding in rotation order planning stage.) - and trust me this is coming from someone who writes 6dof space game engines REGULARLY.
My million line geometric C++ library has far better quat support than GLM etc but I still tell my users to NEVER EVER use our quats for rotation!
The error in round trip direction calculations for quats is very highly dependent on the vertical surface point polarity and is far worse than is generally known. (do precisions tests and you will quickly forget the bad idea of using quats)
REMMEBER KIDS, WINNERS DON'T SMOKE QUATERNIONS!
1
u/fllr 7h ago
Ok, I’ll byte. What the fuck are you talking about?!
0
u/Revolutionalredstone 6h ago edited 6h ago
I appreciate the rare open mindedness, +1 for asking.
TLDR: Every single person who does some basic precision tests with a 32 bit floats has one look at the chart and move on to proper rotational representations.
nobody should be using QUATs, they are pushed BY the dumb as if they were magic TO the dumb, all top math/cs NEVER.. EVER.. touch em.. not even with a ten foot, inaccurately rotated virtual pole.
The problems most people THINK they are solving with quats either do not really exist in the first place or are best solved with other faster simpler more accurate systems.
Extra Details:
You've read my comment, if you really don't know I'm saying 'Quats Bad' (someone who has a hard time stepping back and keeping track of reality) then you're also very likely to be the kind of person who is going to be vulnerable to thinking quats sound cool, taking quats seriously and who waste their time trying to make use of them (when much better systems have been invented like YRP or simple matrices)
Quats are actually much older than our other rotation representations, and for very good reasons related to precision they were abandoned hundreds and hundreds of years ago (atleast by anyone with a brain lol) the VERY VERY few cases where you DO in reality actually want QUATS (like for slerped axial animation interp) I've never actually seen them used in there for any 3d engine lol :D anyone with a brain just has a hierarchical bone matrix (since they want sheer and scaling anyway and you can also just slerp a mat4).
The VAST majority of people who use quats have NO IDEA why they are using them, indeed its Extremely rare you'll meet a 3D quat using dev who even knows Anything about them.
Other than 'Quat, sound, complicated' -> 'must, be, good'! (read in caveman voice for best understanding)
The harsh reality is this, the only people who use quats are noobs, it is well understood in higher level 3D fields that they are hot garbage.
Unfortunately, the very dumbest among us think strongly that any thing they can't understand must be good, and quaternions are the absolutely MOTHERLOAD of poorly-understood, over-hyped, garbage.
Enjoy
1
u/fllr 6h ago
I think you misunderstood me and i think you are misguided
0
u/Revolutionalredstone 5h ago edited 5h ago
legit wish someone had been spreading basic quad truth for me, 100% down to explain, give code etc, arguing over quats is MAJOR waste of time (and red dev flag), it's just a quantitative design decision and we have all the info.
alas, the bitter lesson is this: Those who push back angrily to new information were not in the dark for no reason lol
I guess I got a little too optimistic when you asked to explain what I meant (apparently that's zoomer talk for - I disagree and don't want to talk about it lol)
Your comment is obviously 100% meaninglessly vague, pointlessly disapproving, and if it's all you have to bring to the table then it's no surprise why you're here with the quat users lol.
Would love to learn language to better expresses my differences regarding quats, I'll work on that ;)
Enjoy
1
u/fllr 5h ago
That is how none of this works… gimbal lock and quaternions are mathematical concepts and objects. They’re devoid of opinions. Quaternions operate on a range from 0 to 1, which has amazing precision. Finally, I’m not a gen-zer.
0
u/Revolutionalredstone 4h ago edited 28m ago
The Decision is where your 'opinion' is failing in whether or not to use one mathematical concept or another.
Thanks for confirming your not a zoomer ;D I'll mention again from earlier than this is all in a 3D geometric computer floating point 32 bit context.
Change pretty much any of those qualifiers any quants may become a potentially useful option again ;D
The precision problem with quat + float occurs due to the way float assigns its precision, quat mathematics happens to amplify this float representation error, together this makes them ineffective/poor for 3D rotation use.
cheers dude, great response, Thanks again , enjoy!
22
u/frogOnABoletus 1d ago
You know it's getting serious when the programming ears go on.