Head to squarespace.com/cgmatter to save 10% off your first purchase of a website or domain using code CGMATTER 🐒 ➟ www.patreon.com/posts/blend-c... 🌐 ➟ www.cgmatter.com
I don't think I will ever going to use this technique, but I still sat through the whole thing, because this is one of my top favorite channels. Dude wastes no time. So on point. Love it.
One thing to note about this iterative optimization is that it doesn't necessarily find the most optimal result, just the one that is better than all of the nearby ones. So for example with the two mountains, you would probably never get the line to cross a mountain and find the best path around, because when it tries to go over a mountain, the middle is still comparatively better.
That just depends on your math, for example you could multiply any z axis distance by some arbitrary value to weight inclines more heavily. If the noise distortion is sufficient then one of the random paths would probably eventually skirt around to either side and that would become the new shortest path.
@@OGPatriot03 but if the noise is too strong and big you'll get poor accuracy toward the end. Ideally the noise scaling and strength should decrease overtime in order to get good exploration at the start and small distortion in the end.
one approach to help with that which wouldn't be too hard to fit into this would be to always accept changes which reduce the length, but also possibly accept changes which increase it, but with a chance which goes down the larger the increase, instead of simply adding more noise. This means the path still strongly favors becoming shorter, but still retains some chance to wander about. You could also keep track of what the shortest path found was, besides the current path.
@@namor_votilav that won't work for most metrics, will it? Like, if you're using euclidian, which is the usual, it should work, but for anything else I think it would fail
Just in case you are not aware, you can uncheck "Normalize" on the "Noise Texture" to change the range from (0, 1) -> (-1, 1) which would have the same effect as the "Subtract" vector node. (But with a factor of 2)🙂
Damn this is amazing. I had a flashback to my machine learning class where we optimize a function. This could be an amazing learning aid, if a teacher can actually use blender as well as you. And you can actually use better optimizing functions instead of random. Though even in this simple form I had a hard time following.
In order to reach optimal target faster you can add "temperature" to the simulation. At start the added noise can be high but as the simulation continues it can cool down i.e. the added noise can become smaller and smaller.
man explained calc of var in like a minute and my physics professor never could get anyone in class to understand lol This is very cool, I've always liked calc of var. it creates some very cool shapes
That last example reminds me of that thing you can do on graph paper, where you draw a line from x1 to y10, then x2 to y9 and so on and it ends up tracing out a curve.
@@user-sl6gn1ss8p As in draw a line between the points 1,0 to 0,10 then again between 2,0 and 0,9 and again from 3,0 to 0,8 etc.. If you then imagined drawing an infinite amount of these lines (in this case the step =1) but if we used a step that was infinitely small we would get a smooth curve. And also im pretty sure the name of this curve will be a quadratic Bézier curve since what you are doing is essentially evaluating nested lerp functions. It is pretty much a geometric interpretation of De Casteljau's algorithm on paper - very cool imo and hope this helps :)
@@rubenoconnor198 I think I'm misundertanding something, the way I got it this would make a curve mirrored in the y axis. Which is still kinda cool tho
Pro-tip: decrease the scale of the exploratory offset you use in each iteration. Extreme pro-tip: try to identify linear or convex aspects of the particular problem and then exploit that. In the case of the bubbles, try to minimize tension. Instead of moving each vertex in a random direction, weight each vertice's movement towards neighbors which are near longer-than-average edges.
This is useful, but you can get similar results by applying a smoothing operation instead of random noise, then you don't even need to test that the surface area is going down. much less general though i suppose
Great tutorial, as always! It seems that the algorithm converges to the local optimum and not to the global optimum. on a flat surface they're the same, but we cannot be sure for other geometry.
Maxon! Take notes. Why is Blender better in so many features. I just figured you cannot measure surface area in C4D. Lame! Thanks for this great video!
Cette conversation rappelle l’importance de la curiosité et de l’apprentissage tout au long de la vie. C'est un voyage qui vaut la peine d'être entrepris.💋