Procedural Geometry - An Improvised Live Course
Вставка
- Опубліковано 9 тра 2024
- 🔽 Click for Timestamps & Info
It's here! The 5 hour spline-based procedural geometry stream! Enjoy~
👩💻 Source code / Unity project ❱ / 29301827
📚 Slides ❱ docs.google.com/presentation/...
➰ Play with a Béziér curve ❱ acegikmo.com/bezier/
Timestamps available below - thank you all so much for watching!!
💖 Patreon ❱ / acegikmo
🐦 Twitter ❱ / freyaholmer
📺 Twitch ❱ / acegikmo
💬 Discord ❱ / discord
🌸 Instagram ❱ / freya_holmer
00:00 - Intro
03:02 - Content Index
04:12 - Pre-Stream Chatting
12:38 - Structure of a Mesh
15:04 - Generating a Quad
1:08:48 - Generating a Quad Ring
3:00:20 - Béziér Curves in Flowstorm
3:15:26 - Béziér Control Points & Gizmos
3:24:45 - Constructing a Béziér Curve
3:51:12 - Béziér Space Coordinates
4:00:14 - Creating a 2D Mesh Format
4:41:32 - Extruding Along the Curve - Наука та технологія
When you find a gold mine that is this channel
My girlfriend has a degree in actuarial mathematics and she said she never witnessed a better explanation of curve derivative in her entire life. I must say I've been trying to understand this tangent, curve, slope, etc regarding bezier curves for YEARS and you explained it so well! Thank you!
Seriously Freya your content is amazing, I've spent most of my weekend watching your live courses. I really appreciate you doing this
This is the best introduction to procedural geometry on the internet. THANK YOU SO MUCH
I am so glad I found this video. I love this quote "That's the whole point of a tutorial. Please rip everything off." And your style of teaching and vocal pattern are amazing.
I learnt quite a lot from this. I knew most of the concepts of UVs, normals, mesh-generation and so forth, but you described them in such an elegant way that I think I can finally properly put them all together. Going into a 6 hour video is daunting, but was in the end a very pleasant experience. Thanks for this awesome content, and I immensely enjoyed Budget Cuts :D
I've been avoiding this tutorial for a long time, but scared off because of the length. Now that I've finally learned enough unity to take this on, it's the best lesson ever, thank you so much for creating it!
The most useful part to me is seeing you reason through new ideas. If that's easiest in streams I'm prepared to watch meandering. There are tons of abridged math videos but showing the perfect solution on first go is less instructive to me than seeing things you tried with explanations of why you tried then why it didn't work is the greatest value imho.
Thanks a mil for all your work
Wow! this is amazing! huge shout out to patreon peeps. I'm definitely gonna go support for sure. 🙏🙏
wow... ive split this stream across multiple days because there is so much info. and i've learned so much! thank you!
I work with scientists and artists but its very rare to see it in one person. I don't play or develop games but extremely excited to watch how you do it
Just when I thought the topic was already awesome, the last 10 mins add angles/rotation to the curves, wow
I must admit I was shocked with the simplicity and effectiveness of the nested "for" loops - I was expecting a lot more manual allocation for triangles and stuff (when we start playing with the road mesh, that is) , but in the end, it's all about being smart with the way you're going to setup indexes - and in my particular case, not forgetting to apply the mesh changes to the shared mesh hahaha
I am looking forward to making some funky stuff with this in the near future - thanks so much for this eternal gem of geometry
The fact that you put so much thought into whether doing a modulo would be slower or not to then turn around and recreate the mesh every frame "because we dont care about performance" really got me XD XD
You have. the record of the longest video I have watched on youtube ;).. thanks for the effort, it was entertaining and educational
yo i found you an twitter a little while back. just want to say you are amazing. learn so much even just from your tweets
Such a calming , therapeutic voice + Maths!!! This works like a healing channel for me.
The speedcoding to add banking, and refactoring to use the transform gizmo was impressive 👏 👌
Great Video Freya, I prefer the meandering format, the explanations that drift off into other subjects can be very useful, for finding out about the mental landscape that you cross in the process. The index is useful also. ;o)
I think the timestamps are super useful! Thanks again for sharing your knowledge and experience.
.
So well explained, thanks! :)
Amazing work, thanks!
You're so smart. I'm starting a video game engine project in C++ using vulkan for my graphics rendering pipeline. You're a treasure trove of graphics/math. Definitely going to be the first, and probably only, person I'll support on patreon :)
It makes me happy to finally properly know what a UV is, means, and yeah the meaning of life for UVs. Bless.
1:14:12 YES!! YES I'M READY!! This is a great session so far, I'm learning heaps!
This wa amazing ! Thank you !
I couldn't agree more about the static extension methods. It's frustrating that it still hasn't been implemented considering regular extension methods are more complex with the instance.
I specifically ended up making GizmoHelpers and MathHelpers classes.
This channel is underrated AF btw 🤩 Im so impressed by the content
U are amazing i viewed your channel u explain it very well and doesnot matter about length
3:11:14 "I love explaining béziér curves.." and we finally got to witness the extent of that love :D
Yes pre recorded videos would be awesome but it's a lot of work for you, those tutorials are awesome enough so your call :)
this is translated: entered by curiosity and ends up seeing 2 hours, excellent explanation.
Whenever she said let's do it naively... I think, yea let's do it my way... SO educational this was.... Thank you.
Very awesome Channel! Im soo lucky that I found it :D You got my follow!
You would not beLIEVE how long it took me to get my 'road' rendering after I followed along.
Then I found I had no Mesh Renderer on my Game Object.
Stressed, frustrated, nearly (not quite!) angry - but having absolutely great fun!
But I swear arrays of indexes of arrays will be the death of me :)
Thank you for doing these!
Oh, what a woman! Thank you so much
Smart, very smart c;
Nice tutorial. Awesome!!
I know this is very late to comment on this video... however, even as an UE programmer, I find your videos both informative, entertaining, and strangely calming.i hope things are going well, and even though I'm not a patreon member (sorry), I think you're efforts are legendary.
I'm glad you like them
@@acegikmo BTW - I was wondering if you had done much coding with UE... I'm in two minds... on one hand UE4 has a lot of power out of the box, but it seems that Unity allows a lot of low level flexibility. One thing I wanted to do in UE4 was to have a light dependent shader... so the colour was dependent on the light intensity... but their deferred render pipeline seems to make that impossible, unless you want rewrite their engine... or halve the framerate to render every frame twice. I always appreciate the freedom you have to just jump into the code like you do. Anyway keep up the good work, and I hope you're still finding fun challenges ro keep you making videos and tutorials.
Thank you for the course Freya! Really dig the freestyle. and thank you for Shader Forge. I'm not going to thank you for Budget Cuts, cos it made me headbutt the floor.. :mango_face:
Now off to watch the shader course! Hope to see more content in future! :)
You are smart A F. Very very cool video. Love your work
IT Help alot. As i'm beginning my journey to game dev !! Thanks
thank you ,learns a lot
Thank god i found your channel. Love your video's. Greets from Belgium.
Really late to the party, but I found great use of the timestamps in the comments! Great content!!
Awesome vid!!
You're explaining this so much better then my uni lecturers.
Just wanted to say thanks for this video -- good maths on youtube are my jam!
i think i have a suggestion for the flowstorm mesh generator edge cases... what about you don't generate the mesh till the loop is closed (just draw a line till then) then find one, or better more point inside the loop and project some rays from that point and use those to geenerate the procedural mesh, btw loved the video
the first complex mesh i made in unity was that 2d ring, to make a circular arena with multiple segments
awesome , amazing
You are the besttt.. i love you :)
Fantastic !
I never understood math this well in school as much as i am understanding here. I failed my math and if Freya was my teacher, i would be a scientist today
Heya! I'm about 3 hours in and really enjoying this so far! Very educational!
You mentioned there were a lot of edge cases in Flowstorm that you had to take care of, would you mind telling me more about what those edge cases were and how you solved the intersection issue? I'm looking to build something similar soon (if time permits)
the biggest issue was intersecting geometry. I ended up passing clipping planes to the material on the GPU side, which meant I could discard rendering those in the overlapping sections. It got extra complex with bezier curves though, because while linear intersections only have one clipping plane, bezier intersections have a clipping *curve*. Ultimately I solved that one by making a piecewise curve with 5 planes, matching the intervals of edge loops of the 2D mesh I was extruding
@@acegikmo Thanks! Now I know what to look for! Btw, really enjoying the video! Also, give that cat some pets for me ^^
Oh I didn't know you made budget cuts!
I rly enjoyed that game. One of the few VR ones that are actually fun.
I wonder how you handled the annoyances of jumping back and forth between VR and desktop tho?
Wow this channel is so underrated!!!!!
Hey, I followed along your videao, its awesome btw, were able to undersand and reproduce the road creation. One thing that I can't figure out, nor find anywhere, is how to handle intersections, so if you could do that I would apreciate a lot! Thank you.
This was very mind opening, thank you Freya.
I am pretty much new to Unity, could anyone explain to me how she accesses the HLSL code as material and make changes accordingly ? Need to tamper with it :)).
Should the project be URP or HDRP ?
Great video. How would you go about checking the curvature of a road spline and adding the red and white ripple strips you normally get in the corners of race tracks. This way that only the corners would have them and the straight sections would not.
incidentally, I've been working on the exact same thing for Flowstorm! so, there *is* a mathematical way to calculate curvature, but unfortunately it doesn't quite behave the way you'd expect for stripes in curves - generally stripes go further than just the parts with high curvature. the way I went with this is to first calculate curvature, and then apply a gaussian blur to the data, effectively spreading it out! search for curvature on Wikipedia for the formula :)
Solid content, coming from a hard 3D Modelling and Animation background, it is pretty hard to get my head around lots of code. The more I engage in just listening and watching, i find helps ease the pain in not knowing what the actual **** is happening. I wrote some procedural Environment stuff earlier in the year, I'm struggling to see how it works coming back to it. So hopefully time will help.
But this.... THIS will help so much with my plans for the project.
My sweet fair lady, you are truly a wonderful educational national treasure... and I gladly with all my heart, mind, and soul, bent the knee, to your profound skills, wisdom, and knowledge as my first among equals... computer mathematics teacher.
If it's not too much of a hassle pre recorded would be great! Either way, thank you for these, so helpful!
At 2:45:00, I don't understand how using dir vector makes it a top down uv projection. For it to be top down, I figured we would have to calculate a bounding box around the quad ring and give the four vertices of the box as the uv coordinates. Can you explain how the dir makes it top down because I am having a hard time visualizing it.
5:55:35 yes can you just did function that calculate length based on precision number. if you make it int.Max lol. its anyway calculate those connecting lines. more of them more acurate
Either there's something special about your voice or your mic, since I get a real ASRM vibe out of your videos.
Solid tutoring, as well. Very enjoyable to follow along to or just keep in the background while getting work done, since you conjure a sort of relaxed productivity vibe.
Great stuff! Keep it up.
hah, I'm glad!
road generation with the existence of a single bezier curve is simple enough, but what about when there's the presence of many 2D curves/lines with some of them intersecting? how could a road be generated from that? i tried to tackle this problem a year ago but never figured out a proper solution
Late to the party, I know, but enjoying every one of the 372 minutes!
I had always assumed the 't' param for Lerps was used because 'i' was already 'reserved' and it represents the inTerpolant. But I always remember it as representing 'time', cause who can remember the word 'Interpolant" ? :)
At 5:14:42, your road segment is much bigger than the bezier curve line. I wanted to make the road fit the line by adding the variable "scale". So the smaller scale, the fitter the road
Then I made this:
vertices.Add(op.LocalToWorldPosition(mesh2D.Vertices[j].Point * scale))
but as the result my road, yes, became smaller, but had a big offset.
Or, for example, if I set not integers but floats as the initial coordinates, then my road has an offset, as well!
Do you know what's the problem? Thanks in advance!
Someone said in chat at 59:25 that GPU caps vertices at around 65k
That makes me believe the value is probably a max unsigned short (65535)
How would you recommend that I separate the flat plane on the bottom into it's own submesh?
I have been going at it for quite a while now, can't quite figure it out.
Interesting tutorial , but there is a way to do a model without entering play mode? to make all in the scene?
Hey Freya, the 🤔think emoticon texture is always mirrored at 2:48:40. If i change the GetUnitVectorByAngle (first introduction at 1:28:32) from Vector2(Mathf.Cos(angRad),Mathf.Sin(angRad)) to Vector2(Mathf.Sin(angRad),Mathf.Cos(angRad)) the texture is now correctly projected. And now my normals looking away from the z-axis. I wonder were we need to fix this issue. Flip the normals or use Vector2(Mathf.Sin(angRad),Mathf.Cos(angRad)); - seems to be more clockwise.
Thank you so much for making this courses! This is Gold.
This. Is. Amazing.
Just one thing that bugged me a little; % is not modulo. It's remainder. It works fine for what you used it for, but if you had to go through the array backwards, it will fail. Trust me. I've failed in this way before. Modulo will work, but C# doesn't have a modulo that I am aware of
Thank you! I was confused at that point in the video, but it makes sense now
Hi, I am trying to make a procedural 2d endless road. I am facing an issue with the colliders. I can't figure out how to add 2d edge colliders at the boundaries of the road via code. I even tried using Unity's 2d sprite shape asset but that only does it for one collider (as far as I am aware). Do you have any suggestions on how I can implement this? My goal is simple. I want a 2d road (top-down) that has colliders on both its boundaries. If the player hits the boundaries, the game restarts.
At 1:06:00, I didn't catch why the uvs were horizontally flipped. Could you explain what happened?
I miss you please come back ;(
you are one of the most smartest people in the industry . really miss your streams
I HOPE FOR YOUR COME BACK , SOON ...!
hey now I streamed yesterday! I'm not completely gone
Finally. Some one, who can count vertexes!
Love you mamm, please make video on geometrical programming.
5:58:11 thats how you take first pixel from texture and span it
Can we make it in runtime with meshes?
thanks for the knowledge, i shall conquer universe now
How can we extend this path. How do we add new points like endless road
Where is the .png map Freya? Idk how to create this kind of map yet. :) Last 16 min just watching the video. But I did everything else with you. Thank you very much for the stream and patience. God bless you and Ashley.
Hi, I know I am very late to the party, but I really wanted to know how you or anyone in the comments would deal with the up orientation problem of looped curves. You talked about it at roughly 3:39:45. You did just use Look Rotation and wanted to tell us the harder way later. Is it in the video or did no one ask for this at the end? Your stream was awesome for me to understand better what I am doing, but I can't come to solution for getting the right up vector in a loop. If someone could help, I would really appreciate it. Thanks anyway for this great stream!
one of the solutions is something called a rotation minimizing frame, which can either be pretty basic or very advanced, depending on which one you go for. but yeah, that's a term to google if you want to look into it :)
NICEEE
how to calculate u's if i dont have maya? how was start vertex for u's defined?
I know this is an old video and don't really expect an answer, but at 2:15:42 while generating the quad ring you were altering the value for AngularSegmentCount and getting the result as expected. However, when I try to do the same modifying the angularSegmentCount simply cuts the ring instead of creating a new ring with the desired angular segments(for instance putting it at 16 gives me a semicircle). However, if I exit play mode and reset the angularSegmentCount then hit play, I get the output as one would expect. I went through the entire code line by line but can't understand what's causing this. (It's also the same with other inputs like inner radius and thickness.)
I'm watching the video today. As sooner as possible I'll report to you what happened with my test.
@@Perjoshann So apparently I had declared my vertices list outside the function GenerateMesh. Putting the declaration inside fixed it immediately. Can't believe this is what I lost sleep over for 2 days.
@@kunalkankaria2893 nice you've got. Congrats!
how do I add custom mesh element to define procedual bezier mesh ,not by code?
I"m having an awful time extruding the mesh along the curve. It just comes out looking more like a random jumbled mess than a road. :/ I'm clearly missing something, but I don't know what. Is anyone else having issues at this stage in the course?
"I thought handwriting would improve on hrt"
God mood... :(
I feel lsd like euphoria getting 6 hrs of u just bein like ‘let’s go’
才华与颜值齐飞❤
return new OrientedPoint(pos, tangent);
error:
Cannot implicitly convert type 'OrientedPoint' to 'UnityEngine.Vector3'?
40:17 so if the normals are implicitly created by the order of the points, why do we need to RecalculateNormals? Or is there a difference between these facenormals and the other normals?
the order of the vertices only define the "face normals", in other words, which side is the front. RecalculateNormals recalculate the vertex normals, which are fundamentally different, and are stored in the vertices
@@acegikmo gotcha, thanks!
I thought the T was for tangent bc it follows the center tangent
Please, continue to Improvise.
Could this whole video be summed up with "bless this mesh"?
you said that t doesn't represent the percent of the curve since the distance is unequal. So, what is t, mathematically, in terms of the curve?
it's a parameter that covers the curve from 0 to 1, it doesn't really have an attached physical quantity to it. it's not the same thing as percentage of distance, except at t = 0, t = 0.5 and t = 1, between those values it's non-uniform
1:14:05 well yes. raidus is half of it duh. and yes PI. tau is PI2 xD
damn you are smart
Hi Freya, can you create subtitles for videos? My english is not good. Thank you.
I can't auto-generate it for this video, youtube doesn't allow it for videos that are this long :(
@@acegikmo what a pity! i wil try to learn in video. It is great.Thank you.
I am noob and I'm noob, thanks Freya!