@@blackedoutkI can tell there is a huge amount of work behind each one of your videos, so I can image you cannot focus on them 100% while you have other priorities. I have subscribed anyway, so when the next one comes I will know for sure ;-)
Great video, very useful as I currently have only box and cylinder inertia tensors predefined so this will be very helpful in the near future, thank you! 👍
Yeah, I know, this one has been in my ToDo list for a while. This definitely saves you a lot of time, but sometimes you want to play around with the IT to give a unique behavior to certain objects, for example, some racing games place the center of mass below the object physical hull so that when it turns upside down it flips back on its wheels by itself, and with the IT you can create an inertia tensor to have the bulk of the mass unevenly distributed along an axis to prevent it from rotating in a certain direction, IMO the physics engine goal is to fit the gameplay requirements and not simply to be realistic but that's a debate for your discord 🙂
@@ramoncf7 Ah I've seen that people want to manually move the center of mass in the bullet forum haha. Actually I agree with what you're saying. I would just prioritize a realistic setting as a default and also let the user choose realistic methods of changing the inertia tensor instead of only having the option to arbitrarily move the center of mass. For example to make the bottom part of a car heavier one could add a heavy box to the model just for the computation.
By the way, I located a copy of Grioli's book and I checked vs. Tonon. Equation (2) in Tonon's paper doesn't match Eq. (22) - Chapter X in Grioli's book. The problem is in the definition of that matrix rather than in the definitions of a, a', b, b' and c, c', which seem to be coherent between the two. In Grioli the inertia operator is [ [ a -c' -b' ], [ -c' b -a' ], [ -b' -a' c ] ], which is exactly what you would get from Eq (2) in Tonon by swapping b' and c' in the matrix, hence the mistake is in Eq (2) of Tonon's paper and Grioli has the correct version. The definitions of the elements a, a' etc. are correct and coherent in both sources. If you had to swap the definitions of b' and c' you would lose the symmetry with the respective b and c, which is definitely not correct.
Ah really cool, thanks for sharing. I can see the symmetry argument. So it would be nicer if I swapped the variables b' and c' when plugging them into the matrix creation rather than swapping the values they compute, right? Though why would you say breaking the symmetry is definitely not correct?
@@blackedoutkindeed, swapping b' and c' in the compute matrix rather than swapping their definitions, which breaks symmetry with the corresponding b and c terms, is the correct approach. I didn't understand why the upper and lower triangles in Tonon's matrix are different from Grioli's while the definitions of the corresponding terms are the same. Unless he is somehow using a left handed coordinate system, but would need to check.
@@marcoghislanzoni I think it's just an error in the paper, so the Grioli definition that you mentioned is correct. I don't believe the handedness of the coordinate system could correct the error
Seems like it'd be easier to just approximate it by slicing in to voxels, calculating the tensor for that as a point mass, and then adding them up. Could do the Center of Mass with the same data first, so you know what point to calculate the tensor relative to.
Don' t forget to use your framework for some fun simulations and games. Myself I have played with pyBullet to make 4-legged-robots, spinning tops (check that you get precession and nutation correct), hopping robots and rockets and satellites in the past. There are still a few old videos on my YT channel if you like. I'm still interested in one day making a simulation of a hopping robot that can do a backflip.
I've looked into some of your videos, really cool :D I still need to figure out quite a few things before I could make something similar. But I definitely want to use my framework for having some fun with it in the end, my goal is to simulate a simplified car that I can drive and make a game with it where the player needs to solve puzzles
Question(/Suggestion?): since you can already create a tetrahedral mesh, couldn't you implement the Inertia Tensor calculation by the following procedure? 1. for each tetrahedron i in the tetrahedral mesh calculate the Inertia Tensor I_i like you describe in the video (I am assuming the origin is then arbitrary) 2. then for each I_i recenter it from the arbitrary origin to the CoM, as you described for the total inertia tensor 3. finally add each inertia tensor i to get the total inertia tensor I0 for the mesh.
I don't think this would work correctly because it's like pretending all of the tetrahedrons lie in the same position. Why do you want to recenter each tetrahedron instead of the result?
I thought about it sometime but don't really want to do it because development would be even more time consuming. Vulkan requires more code than OpenGL for the same result and seems to be more lower level, so not only does writing the code take more time, I also need to learn how to even do the lower level programming. If I had all of this time I would want to try it but I'm already struggling creating these videos. It saddens me too that OpenGL restricted on MacOS and dying but so far it's still the easier way to get graphics on the display for me. Maybe that will change at some point but idk
you mean release as in make a release? that will probably be a long time in the future because I have barely added anything. but if you just want to look at the code you can check out the link in the description of this video
@@shivanshuraj7175 hmm I don't know if I can help you really. the only 3D physics engine I have ever used is bullet. I can't say if it's good or bad compared to others because I have nothing to compare it to and also I haven't even done anything significant with it
Most likely yes using compute shaders for example. But if it‘s worth it depends on how effectively you can parallelize it. Might be hard when having to handle collisions. Haven‘t really tried it so far, so not sure
Ich hab eine Vorlesung an der JGU besucht, bei der es allgemein um ein paar Themen aus der Computeranimation ging (wie Hüllkörperhierarchien, physikalische Gesetzmäßigkeiten und kinematische Ketten) und eine an der TU Darmstadt, die nur Echtzeit-Physiksimulation behandelt hat. Durch die erste Vorlesung habe ich ein erstes Verständnis von den physikalischen Größen in der Simulation und dem mathematischen Umgang mit Matrixgleichungen bekommen. Dort bin ich auch auf XPBD gestoßen. Die zweite Vorlesung hatte nichts mit XPBD zu tun, aber behandelte Simulationsmethoden, die XPBD bezogen auf die Ergebnisqualität vermutlich sogar überlegen sind. Ich bin auf jeden Fall dankbar, dass mir diese Vorlesungen angeboten wurden, aber es ist auch viel Eigenarbeit in meinem Lernprozess dabeigewesen. Gleichungen, die der Prof umgeformt hat oder auch Umformungen aus dem XPBD Paper mal selbst durchzuführen und die Schritte im Detail nachzuvollziehen. Die Inhalte in diesem Video beispielsweise waren abgesehen von den mathematischen Grundlagen kein Teil der beiden Veranstaltungen. Oder auch die Volume und Bending Constraints aus Episode 2 und 3 wurden nur kurz erwähnt in einer Vorlesung, dass es die gibt. Die genauen Herleitungen habe ich dann selber mithilfe der Paper, yt Videos und mathematischen Regeln durchgeführt. Ich sag das nicht um mich selbst zu loben oder so, sondern um eine Perspektive zu geben, was man von solchen Veranstaltungen erwarten kann. Die Vorlesungen geben einem praktisch eine manchmal sogar recht kleine Grundlage und daraus kann man sich dann weiterentwickeln. Bist du an der FAU? Ich hab mal in das Modulhandbuch für den Bachelor of Science Informatik reingeschaut und es gibt in der Vertiefungsrichtung Visual Computing eine Vorlesung "Physically-based Simulation in Computer Graphics". Hast du das schon gesehen? Würd dir auf jeden Fall empfehlen das mal anzuschauen.
@@blackedoutk Danke für die ausführliche Antwort! Bin im Maschinenbaumaster. Und darf leider keine VL besuchen von den Informatikern. Aber ich halt mir das mal im Hinterkopf. Danke dir!!
@@playakilla4513 Gerne, freut mich wenn ich helfen kann. Dass du das nicht wählen kannst ist natürlich doof, aber sonst würd ich vorschlagen setz dich einfach so rein und frag vllt einen Studenten dort, ob er dir die Übungsblätter zukommen lässt. Natürlich nur, wenn du dadurch keinem den Platz wegnimmst
Hi, I don't think there is that much setup to do such that it would be worth making a video about. If I remember correclty you only have to install Xcode. After that you can try out the SDL template that I have on my github github.com/blackedout01/sdl-gl-template. The instructions to build and run are in the readme file on that page. You are also welcome to join my discord server, where I or other members could offer more detailed help. A link is in the description of this video.
the editing, the comedic timing, the math, everything is top notch. wow thank you
:D 🙏🙏
It's amazing how accessible you make such a difficult topic. I've been looking for something like this for years.
That's great to hear, thanks. I've been looking for it too 😅
This series is pure gold for anyone interested in physics simulation. Really enjoyed every minute and every equations in it. 🙂 Keep it flowing! 👍
Thank you, I'm really happy to hear that, it means a lot. I hope I can continue soon, when I'm less busy with other stuff
@@blackedoutkI can tell there is a huge amount of work behind each one of your videos, so I can image you cannot focus on them 100% while you have other priorities. I have subscribed anyway, so when the next one comes I will know for sure ;-)
some time in the future I'll get there..
thanks for the great content
your progress is pretty good so far
Great video, very useful as I currently have only box and cylinder inertia tensors predefined so this will be very helpful in the near future, thank you! 👍
Thanks! Boxes and cylinders are a good starting point, but I think matching them to the shape of a mesh can get a bit annoying
Yeah, I know, this one has been in my ToDo list for a while.
This definitely saves you a lot of time, but sometimes you want to play around with the IT to give a unique behavior to certain objects, for example, some racing games place the center of mass below the object physical hull so that when it turns upside down it flips back on its wheels by itself, and with the IT you can create an inertia tensor to have the bulk of the mass unevenly distributed along an axis to prevent it from rotating in a certain direction, IMO the physics engine goal is to fit the gameplay requirements and not simply to be realistic but that's a debate for your discord 🙂
@@ramoncf7 Ah I've seen that people want to manually move the center of mass in the bullet forum haha. Actually I agree with what you're saying. I would just prioritize a realistic setting as a default and also let the user choose realistic methods of changing the inertia tensor instead of only having the option to arbitrarily move the center of mass. For example to make the bottom part of a car heavier one could add a heavy box to the model just for the computation.
I really like your videos :D, are you going to make another soon? It would be cool a video about the implementation of collisions.
Glad you like them:D probably not that soon but I want to yes. Collisions is definitely necessary
omg, your videos are amazing! I love that you don't try to hide the math but explain it, AWESOME!
really glad you like them, thank you!
Thanks for the video :)
Thanks for your support in the comments :)
Bro you are great. Keep up the good work.
Thank you
Great video as always.
Thanks :)
By the way, I located a copy of Grioli's book and I checked vs. Tonon. Equation (2) in Tonon's paper doesn't match Eq. (22) - Chapter X in Grioli's book. The problem is in the definition of that matrix rather than in the definitions of a, a', b, b' and c, c', which seem to be coherent between the two. In Grioli the inertia operator is [ [ a -c' -b' ], [ -c' b -a' ], [ -b' -a' c ] ], which is exactly what you would get from Eq (2) in Tonon by swapping b' and c' in the matrix, hence the mistake is in Eq (2) of Tonon's paper and Grioli has the correct version. The definitions of the elements a, a' etc. are correct and coherent in both sources. If you had to swap the definitions of b' and c' you would lose the symmetry with the respective b and c, which is definitely not correct.
Ah really cool, thanks for sharing. I can see the symmetry argument. So it would be nicer if I swapped the variables b' and c' when plugging them into the matrix creation rather than swapping the values they compute, right? Though why would you say breaking the symmetry is definitely not correct?
@@blackedoutkindeed, swapping b' and c' in the compute matrix rather than swapping their definitions, which breaks symmetry with the corresponding b and c terms, is the correct approach. I didn't understand why the upper and lower triangles in Tonon's matrix are different from Grioli's while the definitions of the corresponding terms are the same. Unless he is somehow using a left handed coordinate system, but would need to check.
@@marcoghislanzoni I think it's just an error in the paper, so the Grioli definition that you mentioned is correct. I don't believe the handedness of the coordinate system could correct the error
Such an awesome video!
Thank you glad you like it
Thanks! Any video soon about free objects colliding in 3D space?
Can't say soon unfortunately because I've been busy lately. But I want to do it eventually
i'm curious too. subscribed
Seems like it'd be easier to just approximate it by slicing in to voxels, calculating the tensor for that as a point mass, and then adding them up. Could do the Center of Mass with the same data first, so you know what point to calculate the tensor relative to.
Love it :))
Please make more
Nice:D Planning to improve my time management, so I can finally start working on these again
Don' t forget to use your framework for some fun simulations and games. Myself I have played with pyBullet to make 4-legged-robots, spinning tops (check that you get precession and nutation correct), hopping robots and rockets and satellites in the past. There are still a few old videos on my YT channel if you like. I'm still interested in one day making a simulation of a hopping robot that can do a backflip.
I've looked into some of your videos, really cool :D I still need to figure out quite a few things before I could make something similar. But I definitely want to use my framework for having some fun with it in the end, my goal is to simulate a simplified car that I can drive and make a game with it where the player needs to solve puzzles
@@blackedoutk Happy you liked it. Personally I'm much more impressed by your work. Good thing YT exists.
when will you upload next part?
I don't know sorry :/ I hope this year
Sehr gut
Zweimal sehr gut, ich werde zum Einserschüler:D vielen Dank
I learned so much than i see that only one minute had passes 💀
💀
Question(/Suggestion?):
since you can already create a tetrahedral mesh, couldn't you implement the Inertia Tensor calculation by the following procedure?
1. for each tetrahedron i in the tetrahedral mesh calculate the Inertia Tensor I_i like you describe in the video (I am assuming the origin is then arbitrary)
2. then for each I_i recenter it from the arbitrary origin to the CoM, as you described for the total inertia tensor
3. finally add each inertia tensor i to get the total inertia tensor I0 for the mesh.
I don't think this would work correctly because it's like pretending all of the tetrahedrons lie in the same position. Why do you want to recenter each tetrahedron instead of the result?
hey do you know if software like solidworks do this in their inner workings? I mean in their source code
Have you thought about switching to vulkan (Molten VK) ? openGl is kinda dead on macos :/
I thought about it sometime but don't really want to do it because development would be even more time consuming. Vulkan requires more code than OpenGL for the same result and seems to be more lower level, so not only does writing the code take more time, I also need to learn how to even do the lower level programming.
If I had all of this time I would want to try it but I'm already struggling creating these videos. It saddens me too that OpenGL restricted on MacOS and dying but so far it's still the easier way to get graphics on the display for me. Maybe that will change at some point but idk
When you will release library?
you mean release as in make a release? that will probably be a long time in the future because I have barely added anything. but if you just want to look at the code you can check out the link in the description of this video
@@blackedoutk I wanted to use your physics engine.since it's not ready then suggest me one..that is simple and less verbose
@@shivanshuraj7175 hmm I don't know if I can help you really. the only 3D physics engine I have ever used is bullet. I can't say if it's good or bad compared to others because I have nothing to compare it to and also I haven't even done anything significant with it
Minecraft is OP ngl. Despite having just cubes y'all get a lot to make in there lmao. But ngl, I should soon try game dev with your videos
true
Can GPU be used for physics computations?
Most likely yes using compute shaders for example. But if it‘s worth it depends on how effectively you can parallelize it. Might be hard when having to handle collisions. Haven‘t really tried it so far, so not sure
An welcher Uni hast du das lernen können? Bei mir wird sowas leider nicht angeboten... Bin aus Nürnberg
Ich hab eine Vorlesung an der JGU besucht, bei der es allgemein um ein paar Themen aus der Computeranimation ging (wie Hüllkörperhierarchien, physikalische Gesetzmäßigkeiten und kinematische Ketten) und eine an der TU Darmstadt, die nur Echtzeit-Physiksimulation behandelt hat. Durch die erste Vorlesung habe ich ein erstes Verständnis von den physikalischen Größen in der Simulation und dem mathematischen Umgang mit Matrixgleichungen bekommen. Dort bin ich auch auf XPBD gestoßen. Die zweite Vorlesung hatte nichts mit XPBD zu tun, aber behandelte Simulationsmethoden, die XPBD bezogen auf die Ergebnisqualität vermutlich sogar überlegen sind.
Ich bin auf jeden Fall dankbar, dass mir diese Vorlesungen angeboten wurden, aber es ist auch viel Eigenarbeit in meinem Lernprozess dabeigewesen. Gleichungen, die der Prof umgeformt hat oder auch Umformungen aus dem XPBD Paper mal selbst durchzuführen und die Schritte im Detail nachzuvollziehen. Die Inhalte in diesem Video beispielsweise waren abgesehen von den mathematischen Grundlagen kein Teil der beiden Veranstaltungen. Oder auch die Volume und Bending Constraints aus Episode 2 und 3 wurden nur kurz erwähnt in einer Vorlesung, dass es die gibt. Die genauen Herleitungen habe ich dann selber mithilfe der Paper, yt Videos und mathematischen Regeln durchgeführt.
Ich sag das nicht um mich selbst zu loben oder so, sondern um eine Perspektive zu geben, was man von solchen Veranstaltungen erwarten kann. Die Vorlesungen geben einem praktisch eine manchmal sogar recht kleine Grundlage und daraus kann man sich dann weiterentwickeln.
Bist du an der FAU? Ich hab mal in das Modulhandbuch für den Bachelor of Science Informatik reingeschaut und es gibt in der Vertiefungsrichtung Visual Computing eine Vorlesung "Physically-based Simulation in Computer Graphics". Hast du das schon gesehen? Würd dir auf jeden Fall empfehlen das mal anzuschauen.
@@blackedoutk Danke für die ausführliche Antwort! Bin im Maschinenbaumaster. Und darf leider keine VL besuchen von den Informatikern. Aber ich halt mir das mal im Hinterkopf. Danke dir!!
@@playakilla4513 Gerne, freut mich wenn ich helfen kann. Dass du das nicht wählen kannst ist natürlich doof, aber sonst würd ich vorschlagen setz dich einfach so rein und frag vllt einen Studenten dort, ob er dir die Übungsblätter zukommen lässt. Natürlich nur, wenn du dadurch keinem den Platz wegnimmst
hey can you please make a videoon how to configure opengl on mac
It seems like your comment popped up twice, may I delete this one?
Do you have discord channel?
yes, it's in the video description
hey can you please make a videoon how to configure opengl on mac
Hi, I don't think there is that much setup to do such that it would be worth making a video about. If I remember correclty you only have to install Xcode. After that you can try out the SDL template that I have on my github github.com/blackedout01/sdl-gl-template. The instructions to build and run are in the readme file on that page. You are also welcome to join my discord server, where I or other members could offer more detailed help. A link is in the description of this video.