• Mi chevron_right

      Contact publication

      marc · pubsub.kikeriki.at / miegakure · Tuesday, 14 December, 2021 - 17:15 edit · 3 minutes

    One of the shapes people requested the most for 4D Toys is the Klein Bottle, so I finally added it! I originally wasn’t very keen on adding the Klein Bottle for a strange reason: because it’s a 2D shape when sliced it would give thin 1D lines, which are obviously too thin to be interesting […]

    <p>One of the shapes people requested the most for 4D Toys is the Klein Bottle, so I finally added it!</p> <p><center><iframe loading="lazy" src="https://www.youtube.com/embed/N_4VaG7ZQE8" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" width="560" height="315" frameborder="0"></iframe></center></p> <p>I originally wasn&#8217;t very keen on adding the Klein Bottle for a strange reason: because it&#8217;s a 2D shape when sliced it would give thin 1D lines, which are obviously too thin to be interesting to look at. But people kept requesting it, and after thinking about it I figured I could give thickness to the lines by sweeping a circle across the 2D surface to get a 3D surface. This would look way better than simply extruding the Klein Bottle in 4D.</p> <p>I also wanted to use this update as an opportunity to make a great video about Klein Bottles because the current ones on YouTube are in my opinion unnecessarily confusing. For example I don&#8217;t think it&#8217;s good to start with how the Klein bottle is two Möbius strips glued together. And I knew I could make better illustrations of the constructions.</p> <p>Also, and importantly, none of the previous Klein bottle videos on YouTube properly explain the 4D part of it (the fact that a Klein Bottle has to self-intersect in 3D, but not in 4D). I was uniquely suited to fix that, ahah.</p> <p><center></p> <div style="display: inline-block; overflow: hidden; height: calc(190px - 44px);"><iframe loading="lazy" src="https://gfycat.com/ifr/conventionalrawgibbon?controls=0" scrolling="no" width="260" height="190" frameborder="0"></iframe></div> <div style="display: inline-block; overflow: hidden; height: calc(190px - 44px);"><iframe loading="lazy" src="https://gfycat.com/ifr/unimportantmiserlydingo?controls=0" scrolling="no" width="260" height="190" frameborder="0"></iframe></div> <p></center></p> <p>In the end, I am very proud of the illustrations I came up with. For example: showing the exact same perspective/construction for the Möbius Strip and the Klein Bottle really makes it clear what is going on! And as a bonus you get how the Klein Bottle is made out of two Möbius strips in an incredibly straightforward way&#8230;</p> <p>It was obvious to me that the same construction could be done in higher dimensions to make what I call a &#8220;Spherinder Klein Bottle&#8221; which is a 3D version of the 2D Klein Bottle. Well, technically the &#8220;thickened&#8221; 2D Klein bottle in 4D Toys is also three-dimensional, but in a less interesting way since it&#8217;s just the Cartesian product of the 2D Klein Bottle with a 1D circle&#8230; Anyway, interestingly it looks almost simpler when sliced than the 2D Klein bottle.</p> <p>Relatedly, because people have asked me before: yes there is a Klein bottle in <a href="https://miegakure.com">Miegakure</a>, and it shows up in a yet another unexpected way.</p> <p>As always, thank you for your patience and enthusiasm!</p> <p>By the way, I&#8217;ve decided to more seriously update the <a href="https://www.patreon.com/marctenbosch">Patreon</a> I originally made for my <a href="https://marctenbosch.com/quaternions/">quaternion article/video</a>. In many ways Miegakure is more than a game: It is revolutionizing how people explore scientific concepts with games, its YouTube channel is an educational tool in its own right with millions of views and many thousands of subscribers, scientific research developed for the game is published alongside it, etc… If you would like to support us, the Miegakure team would be very grateful. I will also post exclusive previews of what we are working on!</p>
    • Mi chevron_right

      Contact publication

      marc · pubsub.kikeriki.at / miegakure · Wednesday, 8 September, 2021 - 09:03 edit · 3 minutes

    Hi, here is the update since last time! Among other things: – We polished the main characters with improvements to the 3D models, inverse kinematics for the feet, cloth simulation, better collision detection, etc.. That kind of polish seemed very important since the player is looking at the main character all the time. We also […]

    <figure class="wp-block-image size-large" style="width: 100%; margin: auto; margin-top: 30px"><a href="https://www.instagram.com/p/BxVj_AuFH7g/"><img src="https://marctenbosch.com/miegakure/data/concepti/59699250_128999614949879_8765084278068410709_n.jpg" alt=""></a></figure> <p>Hi, here is the update since last time! Among other things:</p> <p>&#8211; We polished the main characters with improvements to the 3D models, inverse kinematics for the feet, cloth simulation, better collision detection, etc.. That kind of polish seemed very important since the player is looking at the main character all the time. We also fixed issues with the character rig we were using.</p> <p>&#8211; I cleaned up and improved the way shaders are implemented in the game, so that it is very easy to create new textures (ex: as grass, sand, rocks&#8230;). I improved and added new types of procedural textures. One example is Gabor noise, which is great for anisotropic patterns.</p> <p>During development I often programmed specific systems because I had no idea that it was possible to do much better. For example, I had specific systems for drawing specific types of object (cubic-shaped rocks, buildings, vegetation&#8230;) which all got replaced by only two or three systems (ex: tetrahedral meshes). So now I worked everything around them, and simplified the code, which allowed complexity to be put elsewhere where it is more needed. </p> <p>&#8211; Similarly, I finalized the sound code, since at this point it is clear what we actually needed. For example: all sounds now change in a similar way based on what should be heard across the 4th dimension.</p> <p>&#8211; We finished all the large building scenes except one, and put them in the game with the final (PBR) lighting and they really look super great!</p> <p>The game looks much more refined and polished compared to what we have shown so far. Some changes also make it much more immersive. I love our concept art by <a href="https://www.instagram.com/kellan_jett/">Kellan Jett</a>; it is really original and gives the world a truly unique feel. We worked hard to bring it to life in 3D (well, actually 4D ahah) and do it justice. The fact that the game gives the sense of a world, and not just a series a puzzles in an abstract place is very exciting to me.</p> <figure class="wp-block-image size-large" style="width: 100%; margin-top: 30px;"><a href="https://www.instagram.com/p/BhPZzBqnfaT/"><img src="https://marctenbosch.com/miegakure/data/concepti/29737656_213547729401695_2311225754286817280_n.jpg" alt=""></a></figure> <p>&#8211; For a fun few days break I also quickly cleaned up a mechanic that I wasn&#8217;t sure was going to be in the game, and made the few puzzles for it. The game is going to be very rich and dense!</p> <p>&#8211; We also did the final polish on many &#8220;one-off things&#8221; in the game (I shall remain vague about this for now ahah).</p> <p>Generally I have now done a final polish pass on almost every part of the game, and now basically the only thing left, for realsies, is we need to go through most levels and give them a final look, by placing (and sometimes making) props, and creating specific types of 4D objects/textures! (As I said before, all the puzzle design has been done for a long time). So this is a pretty exciting time!</p> <p>As always, thank you for your patience and enthusiasm.</p>
    • Mi chevron_right

      Contact publication

      marc · pubsub.kikeriki.at / miegakure · Tuesday, 5 January, 2021 - 18:55 edit

    It’s very exciting for work from a game (and a first for an indie game) to be presented in the SIGGRAPH Technical Papers program! Thank you all for your patience during development of the game, as you can see it can get pretty involved, ahah! Link to the paper

    <p><iframe loading="lazy" src="https://www.youtube.com/embed/JpxZQxXxMWY" allowfullscreen="allowfullscreen" width="650" height="365" frameborder="0"></iframe></p> <p>It&#8217;s very exciting for work from a game (and a first for an indie game) to be presented in the SIGGRAPH Technical Papers program! Thank you all for your patience during development of the game, as you can see it can get pretty involved, ahah!</p> <p><a href="https://marctenbosch.com/ndphysics/" data-type="URL" data-id="https://marctenbosch.com/ndphysics/">Link to the paper</a></p>
    • Mi chevron_right

      Contact publication

      marc · pubsub.kikeriki.at / miegakure · Tuesday, 15 December, 2020 - 19:15 edit · 2 minutes

    4D Toys Update (iOS) (Steam VR + Mouse & Keyboard). New button: Wireframe Projections. When enabled, the edges of objects are projected onto the current slice. That means that no matter where the slice is, the edges of the objects will always be visible. It’s an “old school” way of displaying 4D objects which you […]

    <div class="wp-block-image"><figure class="aligncenter size-large" style="width:700px"><img src="https://marctenbosch.com/miegakure/data/4dtoys/wireframeprojections.png" alt=""></figure></div> <p><a href="https://4dtoys.com/">4D Toys</a> Update (<a href="http://4dtoys.com/ios">iOS</a>) (<a href="http://4dtoys.com/steam">Steam</a> VR + Mouse &amp; Keyboard).</p> <p>New button: <strong>Wireframe Projections</strong>.</p> <p>When enabled, the edges of objects are projected onto the current slice.</p> <p>That means that no matter where the slice is, the edges of the objects will always be visible.</p> <p>It&#8217;s an &#8220;old school&#8221; way of displaying 4D objects which you may have seen before!</p> <p>Try it in the 2D Levels!</p> <p>I had fun going back to every level to check it out. It lets you see the movement of the objects even if you are not in the same slice.</p> <center><div style="display: inline-block; overflow: hidden; height: calc(381px - 44px);"><iframe loading="lazy" src="https://gfycat.com/ifr/incredibleelatedjabiru?controls=0" scrolling="no" width="600" height="381" frameborder="0"></iframe></div></center> <p>As with the previous update, there is a new page at the right-most end of the level select hub. After you play the relevant level there the button will be unlocked.</p> <p>The 2D/3D version gives an idea of what exactly these lines are showing:</p> <center><div style="display: inline-block; overflow: hidden; height: calc(381px - 44px);"><iframe loading="lazy" src="https://gfycat.com/ifr/fittinggiftedduckbillcat?controls=0" scrolling="no" width="600" height="381" frameborder="0"></iframe></div></center> <p style="font-size: 13px"> Note: for simplicity each 4D toys update is now called 1.x, where x is the number of the update.</p>
    • Mi chevron_right

      Contact publication

      marc · pubsub.kikeriki.at / miegakure · Wednesday, 11 November, 2020 - 21:38 edit · 6 minutes

    Development on Miegakure is going well. Modeling the large buildings is very far along and will be done soon. I polished many things across the entire game. In July I recorded my SIGGRAPH 2020 Talk about my Technical Paper on n-Dimensional rigid body dynamics, and will post it publicly soon. I started working with a […]

    <p>Development on Miegakure is going well. </p> <p>Modeling the large buildings is very far along and will be done soon. </p> <p>I polished many things across the entire game.</p> <p>In July I recorded my SIGGRAPH 2020 Talk about my <a href="https://marctenbosch.com/news/2020/05/siggraph-2020-technical-paper-n-dimensional-rigid-body-dynamics/" data-type="post" data-id="2461">Technical Paper on n-Dimensional rigid body dynamics</a>, and will post it publicly soon.</p> <p>I started working with a new artist to *really* nail down the final look of the game and environments across the whole game in a more integrated way. In the process we finally fully switched the engine to Physically Based Rendering (It was an easy switch, actually, contrary to what could be expected!)&#8230; and it makes the game look even better. </p> <p>These were my thoughts as we nailed down the look of the game, and about how 4D space constrains our art direction in Miegakure:</p> <p>In Miegakure we procedurally generate many 4D meshes and 3D textures. Just like 3D objects have a surface that is 2D, 4D objects have a surface that is 3D! The game also has many regular 3D meshes (with 2D textures) which are embedded in the 4D world, by giving them 4D thickness. </p> <p>At first it might seem difficult to generate procedural 3D textures which are as detailed as 2D ones made by hand. And we need both at the same time!</p> <p>In order to have details that aren&#8217;t noisy during transition, for a while I was using a combination of a 2D texture and a 3D texture, where the 2D texture contained more detail but was not affected by the slicing, and was just projected onto the sliced object&#8217;s surface. This was a hack, which you can see in the trailers: the high frequency detail of the texture just either slides or streches. </p> <center><iframe loading="lazy" src="https://giphy.com/embed/589kIkTTmzY3K" width="250" height="177" frameBorder="0" class="giphy-embed" allowFullScreen></iframe></center> <p>However too much 3D texture detail looks bad during the &#8220;transition&#8221; anyway. (The transition is what I call the time when the slice rotates 90 degrees after you press the 4D rotate button.) If the slice goes through many tiny objects as it rotates, the time each tiny object will be visible will be very short. This would look like many appearing/disappearing objects. The smaller the objects, the quicker they will be appearing/disappearing. In this video of an MRI of a fruit, the tiny seeds look noisier than the larger overall shape as the slice changes (but the colors are all grayscale and the size is still fairly big so it doesn&#8217;t look bad). So if a 3D texture has too much small detail, even if it looks good as a static 2D slice, it will look very noisy during the transition. So actually we don&#8217;t want to generate too much 3D texture detail, even if we can!</p> <p>By the way there is a noise issue in 3D too: when the 3D camera moves over quickly changing detail it can create aliasing (a &#8220;shimmering&#8221; effect). Much of our 3D handmade content (large buildings, trees…) was already made to be less noisy in that sense. Stylized games have an easier time avoiding this problem since they often contain large flat regions of color.</p> <p>Also, note that we can replace texture detail by geometric detail. This is part of what happened in the games industry with the transition to Physically-Based Rendering. Textures in PBR are not supposed to contain lighting/shadow information, only material information. For example, a rock texture might just be a simple gray color, and if we want actual cracks in the stone we model them as geometry (or normal maps) instead of dark lines in the texture. One of the goals of PBR is to make sure that the props will look good under many lighting conditions: for example a texture where the dark shadows are already stored in the texture (as opposed to computed using the light source) makes it harder to do that. <a href="https://marmoset.co/posts/pbr-texture-conversion/">Here is an example comparison/explanation.</a> </p> <div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img loading="lazy" src="https://marctenbosch.com/miegakure/data/pbrcompare.png" alt="" width="391" height="145"/><figcaption>Traditional and PBR textures</figcaption></figure></div> <p>So it is in some sense more correct to use geometric detail instead of texture detail anyway. And most of the time it is simpler to procedurally generate geometry, so!</p> <p>Miegakure can display more 4D geometric detail now compared to when development started. But there is obviously a similar limit for geometric detail where too much looks noisy.</p> <p>So we can&#8217;t have too much texture/geometry detail, but on the other hand I don&#8217;t want the game to have very large flat section of colors like so many games have these days. I think it doesn&#8217;t work very well with the dioramas seen from far away, where all the visuals are condensed in a small section of the screen. I think it&#8217;s fine for the visuals to be simple if they fill a large area like the entire screen, but if they don&#8217;t then it does not give enough interesting stuff to look at.</p> <div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img loading="lazy" src="https://marctenbosch.com/miegakure/data/journey.png" alt="" width="318" height="212"/></figure></div> <p>The slicing mechanic also forces upon the game a certain level of realism. For example the tree canopies need to look good when sliced. We could model the canopy with a small number of large flat planes to give a nice painterly/low-noise vibe. This looks good in a regular game, but not when sliced, because the inner structure of the planes is revealed. It just looks like a bunch of simple intersecting planes instead of many tiny leaves creating a canopy. So we need to model leaves more realistically, but we can always make them mostly the same color to reduce noise, as shown here:</p> <div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img loading="lazy" src="https://marctenbosch.com/miegakure/data/treesredarch.png" alt="" width="191" height="321"/></figure></div> <p>So to summarize: we want detail (enough to look good when sliced, and in dioramas, etc&#8230;), but not so much that it looks noisy (in the 3D and 4D sense). Compared to texture detail, geometric detail is easier to make and more correct (in the PBR sense and in how it doesn&#8217;t require 4D hacks). The final result is a combination of these constraints. It looks much more polished than before. I can&#8217;t wait to show it!</p>
    • Mi chevron_right

      Contact publication

      marc · pubsub.kikeriki.at / miegakure · Wednesday, 19 August, 2020 - 16:57 edit · 2 minutes

    Here is another 4D Toys Update (iOS) (Steam VR + Mouse & Keyboard). It adds three buttons: Export Mesh: Exports a 3D mesh of what is currently visible on screen. These meshes can then be 3D printed, etc… (Unfortunately 4D printing is not yet available in this universe :P). Find the meshes in your Documents […]

    <div class="wp-block-image"><figure class="aligncenter size-large" style="width:700px"><img src="https://marctenbosch.com/miegakure/data/4dtoys/print3d.jpg" alt=""></figure></div> <p>Here is another <a href="https://4dtoys.com/">4D Toys</a> Update (<a href="http://4dtoys.com/ios">iOS</a>) (<a href="http://4dtoys.com/steam">Steam</a> VR + Mouse &amp; Keyboard).</p> <p>It adds three buttons:</p> <ul><li><strong>Export Mesh</strong>: Exports a 3D mesh of what is currently visible on screen.<br><br>These meshes can then be 3D printed, etc… (Unfortunately 4D printing is not yet available in this universe :P).<br><br>Find the meshes in your Documents folder. (On iOS you can access it by connecting your iDevice to your computer and using Finder).<br><br>Note that Shapeways&#8217; algorithm for filling the inside of meshes sadly fails on some of the coolest meshes like the Star Polychora from the last update, since they are filled with lots of polygons on the inside (btw it&#8217;s fun to poke your head inside these meshes in VR!).</li></ul> <ul><li><strong>Anti-Gravity</strong>: Creates an anti-gravity field that makes objects float. Besides the obvious coolness, this allows to see rotations that are unrestricted from the constraints of the collision with the ground.<br><br></li><li><strong>4D Accelerometer</strong> (iOS only): Swaps the forward/backward direction of the accelerometer with the 4th dimension.<br><br>That is, tilting your device toward/away from you will result in a force along the 4th dimension instead.</li></ul> <p>A new page of shapes has been added, with one new level for each button. Visiting each of these levels unlocks the corresponding buttons. Also, all special buttons are now gathered into a new menu button. This lays the groundwork for easily adding new features in future updates!</p> <center><div style="display: inline-block; overflow: hidden; height: calc(381px - 44px);"><iframe loading="lazy" src="https://gfycat.com/ifr/whirlwindinsecureargusfish?controls=0" scrolling="no" width="600" height="381" frameborder="0"></iframe></div></center> <p>Btw, the SIGGRAPH conference started and my talk on nD Rigid Body Dynamics is now online (I will post it publicly in a few weeks). The Q&amp;A session is on Wed Aug 26 at 9:00AM PDT!</p>
    • Mi chevron_right

      Contact publication

      marc · pubsub.kikeriki.at / miegakure · Thursday, 7 May, 2020 - 16:04 · 2 minutes

    Excited to announce that my technical paper “N-Dimensional Rigid Body Dynamics” was accepted to SIGGRAPH 2020! Very proud to present research developed for 4D Toys & Miegakure at such a prestigious conference. Here is the link to the paper and the abstract: I present a formulation for Rigid Body Dynamics that is independent of the […]

    <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}, messageStyle: "none" }); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script> <style> .inmargin { position: relative; left: calc(50% - 100px); } </style> <iframe loading="lazy" src="https://www.youtube.com/embed/0t4aKJuKP0Q" allowfullscreen="allowfullscreen" width="650" height="365" frameborder="0"></iframe> <p>Excited to announce that my technical paper &#8220;<a href="http://marctenbosch.com/ndphysics">N-Dimensional Rigid Body Dynamics</a>&#8221; was accepted to <a href="https://s2020.siggraph.org/conference/program-events/technical-papers/">SIGGRAPH 2020</a>! Very proud to present research developed for <a href="http://4dtoys.com">4D Toys</a> &amp; <a href="http://miegakure.com">Miegakure</a> at such a prestigious conference.</p> <p>Here is the <a href="https://marctenbosch.com/ndphysics/">link to the paper</a> and the abstract:</p> <blockquote class="wp-block-quote"><p>I present a formulation for Rigid Body Dynamics that is independent of the dimension of the space. I describe the state and equations of motion of rigid bodies using geometric algebra. Using collision detection algorithms extended to nD I resolve collisions and contact between bodies. My implementation is 4D, but the techniques described here apply to any number of dimensions. I display these four-dimensional rigid bodies by taking a three-dimensional slice through them. I allow the user to manipulate these bodies in real-time.</p></blockquote> <p>Btw I believe it is basically unheard of to have work from an indie game presented in the SIGGRAPH technical papers track?</p> <p>The paper is full of really fun and beautiful math (obviously Geometric Algebra based, <a href="https://marctenbosch.com/quaternions">see my recent article</a>) that makes me happy. One reviewer called the work “whimsical,” and they’re not wrong, ahah.</p> <p>Most of this work (including writing the paper) is from ~2012, but I added a section on the (4D) <a href="https://www.youtube.com/watch?v=1VPfZ_XzisU">Dzhanibekov effect</a> at the suggestion of the reviewers. Many thanks to them for helping me greatly improve the paper.</p> <p></p>
    • Mi chevron_right

      Contact publication

      marc · pubsub.kikeriki.at / miegakure · Monday, 3 February, 2020 - 21:35 edit · 8 minutes

    I have not yet posted on this blog that last year I released an article/video with interactive diagrams on Geometric Algebra, specifically Rotors. (I also recently updated it). Here is the introduction: To represent 3D rotations graphics programmers use Quaternions. However, Quaternions are taught at face value. We just accept their odd multiplication tables and […]

    <p><iframe loading="lazy" src="https://www.youtube.com/embed/Idlv83CxP-8" allowfullscreen="allowfullscreen" width="650" height="365" frameborder="0"></iframe></p> <p>I have not yet posted on this blog that last year I released an <a href="https://marctenbosch.com/quaternions/" class="red">article/video with interactive diagrams on Geometric Algebra</a>, specifically Rotors. (I also recently updated it). Here is the introduction:</p> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}, messageStyle: "none" }); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script> <style> .inmargin { position: relative; left: calc(50% - 100px); } </style> <div style="background-color: rgba(255,255,255,0.2); padding: 10px; padding-left: 30px; padding-right: 30px"> <p>To represent 3D rotations graphics programmers use <i>Quaternions</i>. However, <strong>Quaternions are taught at face value</strong>. We just accept their odd multiplication tables and other arcane definitions and use them as black boxes that rotate vectors in the ways we want. Why does $\mathbf{i}^2=\mathbf{j}^2=\mathbf{k}^2=-1$ and $\mathbf{i} \mathbf{j} = \mathbf{k}$? Why do we take a vector and upgrade it to an &#8220;imaginary&#8221; vector in order to transform it, like $\mathbf{q} (x\mathbf{i} + y\mathbf{j} + z \mathbf{k}) \mathbf{q}^{*}$? Who cares as long as it rotates vectors the right way, right?</p> <p>Personally, I have always found it <strong>important to actually understand the things I am using</strong>. I remember learning about Cross Products and Quaternions and being confused about why they worked this way, but nobody talked about it. Later on I learned about <i>Geometric Algebra</i> and suddenly I could see that the questions I had were legitimate, and everything became so much clearer.</p> <p>In Geometric Algebra there is a way to represent rotations called a <i>Rotor</i> that <strong>generalizes</strong> Quaternions (in 3D) and Complex Numbers (in 2D) and even works in any number of dimensions. </p> <p>3D Rotors are in a sense <strong>the true form</strong> of quaternions, or in other words Quaternions are an <strong>obfuscated</strong> version of Rotors. They are equivalent in that they have the same number of components, their API is the same, they are as efficient, they are good for interpolation and avoiding gimbal lock, etc&#8230; in fact, they are isomorphic, so it is possible to do some math to turn a rotor into a quaternion, <strong>but doing so makes them less general and less intuitive</strong> (and loses extra capabilites). </p> <p>But instead of defining Quaternions out of nowhere and trying to explain how they work <strong>retroactively</strong>, it is possible to explain Rotors <strong>almost entirely from scratch</strong>. This obviously takes more time, but I find it is very much worth it because it makes them much easier to understand!</p> <img src="https://marctenbosch.com/quaternions/planets.png" alt="Earth-Centric planetary motion" class="inmargin" width="200"> <p>For example, Quaternions are introduced as this mysterious four-dimensional object, but why introduce a fourth dimension of space to visualize a 3D concept? By contrast 3D Rotors do not require the use of a fourth dimension of space in order to be visualized.</p> <p>Trying to visualize quaternions as operating in 4D just to explain 3D rotations is a bit like trying to understand planetary motion from an earth-centric perspective i.e. overly complex because you are looking at it from the wrong viewpoint.</p> <p>It would be great if we could start phasing out the use and teaching of Quaternions and replace them with Rotors. The change is simple and <strong>the <a href="code.htm" style="color: black">code</a> remains almost the same, but the understanding grows a lot.</strong> </p> <p>As a side note, Geometric Algebra contains more than just Rotors, and is a very useful tool to have in one&#8217;s toolbox. This article also serves as an introduction to it.</p> </div> <p>And here are some quotes about it:</p> <blockquote class="nopad"><i>The clearest explanation of 3D geometric algebra within 15 minutes that I&#8217;ve seen so far</i> <span class="g">—BrokenSymmetry</span></blockquote> <blockquote class="nopad"><i>I am sold. While I can understand quaternions to an extent, this way of thinking is a much more intuitive and elegant approach.</i> <span class="g">—Jack Rasksilver</span></blockquote> <blockquote class="nopad"><i>This sets a high standard for educational material, and is a shining example of how we can improve education with today&#8217;s technologies.</i> <span class="g">—Sebastien Pierre</span></blockquote> <blockquote class="nopad"><i>When I was in college, I asked one of my math professors why the cross product of two vectors results in a perpendicular vector whose magnitude is equal to the area of the parallelogram formed by the two vectors. Like..what? Why? And what about 2D? They blew me off, and that was a big part of why I stopped taking math in college. [&#8230;] Anyway, I had pretty much given up on ever truly understanding the whole jumble of seemingly unrelated types that are cross products. But then I saw this: And&#8230;wow. Just 15 minutes and a lot more than just cross products suddenly make a lot more sense.</i> <span class="g">—Mason Remaley</span></blockquote> <blockquote class="nopad"><i>I&#8217;m a pure math dude at heart, even if I don&#8217;t get to do it much any more. Two years ago, my wife asked me, &#8220;If you had to get a math equation tattooed on your body, what would it be?&#8221; I answered, &#8220;i^2 = j^2 = k^2 = ijk = -1&#8221;. I felt a brief flush of anger when I saw this headline. This is an extraordinarily good article that should be read by pretty much anyone doing graphics programming.</i> <span class="g">—pflats</span></blockquote> <p>I wrote most of in 2011/2012, but didn&#8217;t release it because I was not satisfied with part of it. But I thought it was time to let go and release it anyway. I actually think it is hurting the advancement of science that people are still mainly using quaternions instead of Geometric Algebra, so holding on to it was not good.</p> <p>So last fall/summer I cleaned up some of the diagrams and made a 15 minute long video that follows the article exactly. I never made a video this long, and it was quite exhausting. But I thought it would be really cool to make an article that is perfectly synced to a video, so you can either read it or watch it, and the article serves as an exact table of contents for the video. </p> <p>I think I came across Geometric Algebra from attending SIGGRAPH a long time ago? Specifically this book: <a href="http://www.amazon.com/gp/product/0123749425/ref=as_li_tf_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0123749425&amp;linkCode=as2&amp;tag=martenbos-20">Geometric Algebra for Computer Science by Dorst et al.</a> Later on I found this great book: <a href="http://www.amazon.com/gp/product/1453854932/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=miegakure-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1453854932">Linear and Geometric Algebra by Macdonald</a></p> <p>Geometric Algebra soon came in handy for Miegakure, specifically to define the 4D equivalent to Quaternions, <a href="https://marctenbosch.com/news/2011/05/4d-rotations-and-the-4d-equivalent-of-quaternions/">which I posted about on this blog</a>. Later on it became the backbone of 4D Toys. </p> <p>Learning about Geometric Algebra was also great because it answered so many questions I had when learning linear algebra, the cross product, quaternions, etc… <strong>I basically wrote this article for my past self as a college student.</strong> </p> <p>I recently rewrote the introduction to add more detail about the properties of Rotors and how they relate to quaternions. Even though the content went into detail, it should now be clear what Rotors are from only reading the introduction. I can already see from reading recent comments that it was worth it.</p> <p> I deliberately picked a cheeky click-bait title&#8230;</p> <p>Something else that might be of interest is the history of Geometric Algebra, so I recently added a heavily summarized version to the <a href="https://marctenbosch.com/quaternions/#history">end of the article</a>. I think looking at the history makes it clearer <em>how </em>the quaternion viewpoint stayed in people&#8217;s minds for longer than necessary&#8230;</p>
    • Mi chevron_right

      Contact publication

      marc · pubsub.kikeriki.at / miegakure · Thursday, 23 January, 2020 - 23:01 edit · 6 minutes

    It occurred to me that it should be possible to give more detailed progress updates without spoiling the game too much. Thanks to those of you who emailed me to check on the progress of the game and thank you for your patience. As I said last time, all the mechanics, levels, story & dialogs […]

    <figure class="wp-block-image size-large"><a href="https://www.instagram.com/p/Bh95JFLFwIJ/"><img src="https://marctenbosch.com/miegakure/data/concepti/30592481_2077532419170508_8809147382030663680_n.jpg" alt=""/></a></figure> <p>It occurred to me that it should be possible to give more detailed progress updates without spoiling the game too much. Thanks to those of you who emailed me to check on the progress of the game and thank you for your patience. As I said last time, all the mechanics, levels, story &amp; dialogs are done. We still are polishing up the game. Here are some things that we worked on since the last blog update (a lot of these could, and maybe will be their own blog posts):</p> <p>We implemented the sound of the moving blocks. The code still needs to be cleaned up a bit. It seems we tend to not really know how it should work until we try it in game. There is still of bunch of sound work left.</p> <p>I spent a while looking for and building additional methods of procedurally generating 4D geometry, especially for the large tesseract-shaped rocks which are very common in the game. This allowed me to really improve the visuals throughout the game. I initially implemented a few complex generic algorithm, but some of them were not stable enough (I need very clean geometry for collision detection) so I spent some time figuring out how to achieve the effects I wanted using simpler methods, and I am very happy with the original solutions I came up with! Some of this work will also be useful for 4D Toys.</p> <p>I added a few finishing touches and released this <a href="https://marctenbosch.com/quaternions/">Article with Interactive Diagrams</a> on Rotors and Geometric Algebra I had made back in 2012. It look longer than I thought it would… making a 15 minutes long video took a long time and was very exhausting. I recently updated it, and will do a separate blog post about it very soon.</p> <p>I figured out the rough look and layout of the few remaining large buildings in the game, and built them as prototypes. There is a strong interconnection between the visuals, gameplay, and story in the game, and that made for intricate &#8220;puzzles&#8221; with lots of moving parts that I had to figure out… The concept artist is working on the final look for these in the next few months.</p> <p>I went on vacation, because honestly I was pretty burnt out last year. I went to Japan, which is always amazing and heals my soul. I needed a break after crunching on this game for the last one hundred and eighty three years (give or take).</p> <p>I worked on nailing down the final look of the game… I worked on some Physically Based Rendering (PBR) stuff to include. A bunch more work remains to be done there. </p> <p>We found and fixed issues with the animation rig we were using. Working on finishing all the animations now with an animator who has recently joined the project.</p> <p>I made how the water is shown in the game consistent across every level, and worked to finalize the look of the &#8220;empty space&#8221; around the &#8220;diorama&#8221; that is each level. </p> <p>I finalized the look of the gates used to go from level to level. We have to make sure anything in the game is easy to learn and manipulate for a 3D being inside a 4D world, and that brings all these complications to something that should be quite simple normally&#8230; but also: &#8211; there is a ton of information that needs to be displayed on this one element (ex: level is done/available/etc…) &#8211; there are around five slightly different versions of it with different constraints &#8211; it needs to be visible enough but not grab too much attention &#8211; it needs to belong with natural elements such as trees and rocks but also stand out as an &#8220;interface&#8221; element &#8211; it needs to match the feel of the game &#8211; it needs to use the 4D in a cool way, etc… </p> <p>As a side-note, many of the things I worked on lately had the property that they were pretty good, but not good enough to ship. For example they worked fine for part of the game, but not for the whole thing. Or my friends would point them out to me saying something feels off there. But I didn&#8217;t know how to finish them at the time, so I left them as is, to be picked up later. Coming back to them, I could tell they were often &#8220;local maxima&#8221; solutions: it felt like any changes made them worse, and I didn&#8217;t know how to proceed anymore, but there had to be a better solution. After thinking hard for a while, breakthroughs came and the best solutions ended up very different than the solutions that were in the game for a long time! Or sometimes I found out that they really <em>were</em> the best solutions and I had to move on, ahah. </p> <p>I made the way the buildings are sliced consistent across the entire game. The old way I was using for some buildings was made very early on, back when I didn&#8217;t understand 4D space very much. But it also had extra features that were not trivial to port to proper 4D geometry, like fading out certain sections to let the player see inside. Interestingly, the hacky method I was using to display these buildings was simpler, and so in some way potentially easier to understand. But it was inconsistent with the rest of the game. So while it seemed a bit of a loss, I opted for more consistency and correctness. I am keeping in the back of my mind the counter-intuitive way in which adding the tetrahedral meshes and making doodads be &#8220;correct&#8221; in 4D made the game more visually complicated but also <em>easier</em> to play, probably because of some unconscious pattern recognition. </p> <p>The very talented artists on the team have modeled/textured most of the large buildings in the game at this point and they look amazing. We are moving on to the smaller ones!</p> <p>We also finally built the main element of a very exciting and beautiful level that I had planned almost from the very beginning. This level is so cool that it will be showcased in a video as one of the &#8220;Main Miracles&#8221; of being to able to move in 4D, along with <a href="https://www.youtube.com/watch?v=9yW--eQaA2I">Going around Walls</a>, Binding Two Rings (which I still need to redo), Stealing From Inside a Closed Building, etc…</p> <p>And many other things! </p> <p>As always, thank you for your patience and enthusiasm.</p> <p>Marc</p>