Rounding Corners in SDFs

  Рет қаралды 73,052

Inigo Quilez

Inigo Quilez

Күн бұрын

Пікірлер: 119
@ThaRemo
@ThaRemo 5 жыл бұрын
3:20 that transition is so goood!
@mactyler
@mactyler 5 жыл бұрын
ThaRemo lol same i rewatched it like 5 times when it happened the first time through
@aornelas
@aornelas 5 жыл бұрын
yaaaas! i saw this as the teaser in the tweet (twitter.com/iquilezles/status/1191507589487415297) and couldn't help but watch the whole video -- even when this is the first time i hear about SDF 😆
@collection6062
@collection6062 3 жыл бұрын
jeezus christ that was to much
@pronotron
@pronotron 2 жыл бұрын
I need a couple of days to do it in blender, he is just using math
@miketuritzin
@miketuritzin 5 жыл бұрын
I am blown away by the quality of these videos! (as well as how well-explained everything is)
@NonTwinBrothers
@NonTwinBrothers 2 жыл бұрын
I swear one day this channel will explode
@sanjuro_493
@sanjuro_493 2 жыл бұрын
i love the lapsus at 1:29 when you said "older", i was thinking about counting trees' age too, lol.
@iestynne
@iestynne 5 жыл бұрын
Would love to see a video about the common difficulties you may encounter when using SDFs and how to work around them. For example the "metric distortion" that you mention occurs when perturbing a surface with noise. Or how the SDF of two touching boxes is different from the SDF of a box twice the width. That kind of thing.
@abuelospelico8945
@abuelospelico8945 2 жыл бұрын
Hola buenas tardes me volví con el que no te gusta en la casa de mi cumpleaños me volví a dormir mejor me volví con el lunes a las mejor no
@edub4rt
@edub4rt 5 жыл бұрын
Wow, awesome, please keep doing these kind of videos. I've admired your work for years, you are a genius in this field, I feel that we could learn a lot of stuff from you that is hardly taught out there. Your skills and knowledge about mathematical graphics is truly in a unique level and inspires me to learn and work more on the topic.
@Nolkaloid
@Nolkaloid 4 жыл бұрын
Just that intro music makes me have chills of excitement!
@xbzq
@xbzq 5 жыл бұрын
Holy cats. A+++. That's an amazingly high quality video, looks like it was produced by an entire agency or Pixar or DreamWorks. And it's just a KZbin video on a (yet) small channel. Hats off.
@iaobardar3452
@iaobardar3452 5 жыл бұрын
I love your videos. They really click in my head, helping me understand the SDFs. I can't wait till the next one!
@mactyler
@mactyler 5 жыл бұрын
I work in computer graphics and you literally blow me away with every video. What an incredible abstraction to create anything you can imagine in such an efficient way
@kylepena8908
@kylepena8908 4 жыл бұрын
Inigo this is world class content
@dgoberna
@dgoberna 5 жыл бұрын
wow man, the production effort you are investing in the new videos is amazing!! so profesional, neat and well done.. I'm sure it also takes a looot of time to make, how difficult may be to know where to draw the line :/
@InigoQuilez
@InigoQuilez 5 жыл бұрын
Yes. I feel the ratio of visual sexyness to content is a bit off in this one - the VFX part was for example unnecessary. But fun. The solution is not lowering the visuals, but upping the depth of the content in the next videos.
@xbzq
@xbzq 5 жыл бұрын
@@InigoQuilez Well, I think that by throwing in this deep visual awesomeness, you're not just showing everyone what kind of math you can do, but _exactly_ what the results can be if you're willing to hang in there. It's the carrot to reach for. Also, you make it seem effortless with your calm voice that doesn't once yell out: "Check out this awesome thing!"
@dgoberna
@dgoberna 5 жыл бұрын
@@InigoQuilez the VFX part was totally unexpected but utterly awesome! :D Same thing with the transition to the old columns scene, brutal. But wtf, you have fun and are happy, and we are watching quality content, learn, flip out and get inspired. What's the problem? Well, I guess problem is time and money, those little bastards :)
@yaseenkhattak1845
@yaseenkhattak1845 2 жыл бұрын
I just found Gold on the internet, Your explanations are so on spot !
@TimMatthewsX
@TimMatthewsX 5 жыл бұрын
As always, absolutely amazing Inigo! I've watched this a few times now, both for the content - which has really clarified the role of isolines in SDF - but also because it is incredibly beautiful! Making a useful tutorial that is also stand-alone art in its own right is wonderful
@johnjackson9767
@johnjackson9767 4 жыл бұрын
It's a crime that these don't have more views.
@MichaelProstka
@MichaelProstka 3 жыл бұрын
Brilliant! Been following your work for a few years, you are the Undisputed SDF Sensei!
@KingCakeTheFruity
@KingCakeTheFruity 4 жыл бұрын
Beautiful video! It really helped me understand what's going on. Smooth sdf connection is also quite an interesting thing to look at btw.
@Nicoblabla
@Nicoblabla 5 жыл бұрын
The animations are so smooth ! Really nice video, thx
@sanderbos4243
@sanderbos4243 2 жыл бұрын
Awesome, I now understand what makes SDFs so great!
@batmansmk
@batmansmk 5 жыл бұрын
You went all out!! Congrats on the level of production. You have to tell me how you get such a good AR tracking.
@dgoberna
@dgoberna 5 жыл бұрын
That's not AR, but traditional tracking, probably done with After Effects :)
@o_o............
@o_o............ 5 жыл бұрын
@@dgoberna wtf
@catafest-work
@catafest-work 5 жыл бұрын
good article ... depends of issues some objects with intersection can have an SDF (Signed Distance Field) after create ... or you can build them with SDF (Signed Distance Field) ... the optimization depends of this goal ...
@Nicola5
@Nicola5 2 жыл бұрын
Great video! Explains and visuals is outstanding! Subscribed!
@DoctorBabby
@DoctorBabby 5 жыл бұрын
Thanks for this very informative video! We're so used to polygonal rendering but alternative methods can be fascinating. Actually your name reminds me of something. Maybe I saw it before in a Blender or Shadertoy demo.
@CAyou
@CAyou 5 жыл бұрын
Hey man, awesome video! How do you handle the fact that the final result is not thicker? On all the example you show the base volume gets thicker. Thank you!
@s3vdev
@s3vdev 11 ай бұрын
That‘s what I thought. Missing this critical information - but love these explanations. Well done
@dgoberna
@dgoberna 5 жыл бұрын
hahaha, I've just noticed the glitch effect on the titles (0:24) synched with the music. This must be the most demoscener tutorial ever :D
@spencershrek1491
@spencershrek1491 5 жыл бұрын
Wow what!! This video quality is insane
@NikolaNevenov86
@NikolaNevenov86 5 жыл бұрын
As a beginner I have one question. How do you preserve the size of the sdf after the rounding. Even in the video it was obvious that giving any value to "r" it rounds but also enlarges the field. Yet right in the beginning of the video, you had your rectangle have it's round edges while maintaining the same size.
@InigoQuilez
@InigoQuilez 5 жыл бұрын
Yes, I forgot to mention that in the video, and I'll add it to a followup one. The basic idea is simple - make the source shape (box in the video) thinner by the same amount r, so after expansion the flat areas (no corners or edges) stay in place.
@rationalistfaith
@rationalistfaith 5 жыл бұрын
Awesome! Triggering my passion for graphics programming again :)
@RostamiMagic
@RostamiMagic 5 жыл бұрын
SUPER COOL!!!
@dudewaldo4
@dudewaldo4 2 жыл бұрын
This is amazing work
@kingreinhold9905
@kingreinhold9905 2 жыл бұрын
So well done man! But I still got one question... Why do these models in the end not get thicker? Wouldn't the distance also be increased by r on the flat surfaces as described before?
@kingreinhold9905
@kingreinhold9905 2 жыл бұрын
I guess you just scale it down with the same technique first and by the same amount..
@DanielStreck
@DanielStreck 5 жыл бұрын
This video format is amazing!
@brod515
@brod515 5 жыл бұрын
So that we keep the some size of the object It seems we should also adjust the actual SDF with r as well so the shape doesn't swell up.
@sea-saw
@sea-saw 5 жыл бұрын
How do you make rounded corners on non-primitive shapes? For example, if I had a shape made of the intersection of two primitives, can I use this technique to round the corners of that shape?
@InigoQuilez
@InigoQuilez 5 жыл бұрын
If you are computing the intersection with max(), then no, rounding won't work because intersections computed with max() don't produce euclidean distance fields, just bounds. That's the reason I try to derive the exact SDF of as many primitives as possible from first principles and not as the intersection of other primitives. See at the bottom of this list for example for exact SDFs that could have been approximated as booleans operations but I don't: iquilezles.org/www/articles/distfunctions2d/distfunctions2d.htm
@andrevenancio
@andrevenancio 5 жыл бұрын
Love your videos. Its really helpful for newcomers!
@TokisanGames
@TokisanGames 5 жыл бұрын
Wow, this is so amazing! I really appreciate the explanations and pacing.
@codingislove3707
@codingislove3707 Жыл бұрын
thanks for the amazing explantations. One thing I don't understand why that is is why do the isosurfaces become rounder when moving away from the origin of the shape., and why are they round in the first place? what is the cause, mathematically? Sorry, I am a newb :)
@geofftnz
@geofftnz 5 жыл бұрын
Great video iq! Keep them coming!
@nano_redstone
@nano_redstone 5 жыл бұрын
As always your content is really interesting! I alway's learn quite a bit keep up the good work !
@breakingkeyboards
@breakingkeyboards 5 жыл бұрын
Your work is always impressive!
@SpeedyPainterSoftware
@SpeedyPainterSoftware 3 жыл бұрын
man, you are amazing
@neur303
@neur303 5 жыл бұрын
Impressive! Thank you Inigo :) It makes it so clear what is going on with all these functions :)
@nrosquist
@nrosquist 3 жыл бұрын
fantastic videos. why do the isolines get rounder the further away you get? Is it a floating point rounding thing?
@InigoQuilez
@InigoQuilez 3 жыл бұрын
No. that's the geometry of distance. The isolines _must_ be rounded to be an Euclidean distance. Think how the distance to a point is a set of concentric circles, so the distance to a corner, which is a point, must have arcs of such circles.
@nrosquist
@nrosquist 3 жыл бұрын
@@InigoQuilez Ah thank you, very clear!
@sharathchandra6166
@sharathchandra6166 5 жыл бұрын
great channel i love your explanations!
@alejmc
@alejmc 5 жыл бұрын
Excellent video, explanation and music of choice! Unrelated but if possible, what’s the song? Thanks to this just started listening to Khrome but can’t find the one on this video (just listened to the ‘Absolute’ album)
@InigoQuilez
@InigoQuilez 5 жыл бұрын
I commissioned the score to Khrome!
@gamertech4589
@gamertech4589 Жыл бұрын
Do you have hls code or gls? Which can help manipulate it? Or link to ur webpage😅
@mactyler
@mactyler 5 жыл бұрын
Steppin on the scene like 💯 💯
@arodic
@arodic 5 жыл бұрын
Amazing work Inigo!
@InigoQuilez
@InigoQuilez 5 жыл бұрын
Thanks Aki!
@fonzjedelarosa7587
@fonzjedelarosa7587 4 жыл бұрын
Excellent!
@pantsoff
@pantsoff 5 жыл бұрын
Dude... please, more!
@GoatMen
@GoatMen 2 жыл бұрын
What software do you use to make the 3d art in these videos?
@ac12484
@ac12484 4 жыл бұрын
Genius!!! Thanks!
@Exoclypse
@Exoclypse 4 жыл бұрын
Awesome video but I was wondering how do you apply transforms on the edges only and not the entire surface? Do you get the distance between the rounded SDF and the unrounded SDF as a mask?
@InigoQuilez
@InigoQuilez 4 жыл бұрын
No. I think of it in two steps: 1. First, shrink the box dimensions by the same amount that you expect to inflate it through roundness. Since these two adjustments are equal in strength, let's call both the amount of roundness and shrinking R. This keeps the extents of the box unchanged and the volume approximately the same, but you got your roundness. That's because non-corners/edge parts of the surface recede as much during shrinking (R) as they advance during inflating (also R). However edges recede by an amount bigger than the shrinking amount R, for example sqrt(2)*R in thr case of a 90 degree angled edge. Corners move away from their original position about sqrt(3)*R. However when we inflate them back we are still inflating them by R. So, flat areas of the surface don't move, but edges and corners do move inwards (by an amount R(sqrt(2)-1) and R(sqrt(3)-1) in our examples). Which is what we want. 2. Second, we modulate R with the desired noise or pattern we want to give us R*M. In the areas were shrinking and roundness compensate exactly (the non-edges of our object) the modulation has no practical effect since we are still schrinkimg and inflating by R*M equally. But in the edge/corners, where rounding happened, the modulation still affects the net carving, since we get R*M*(sqrt(2)-1) of it in the edges. 3. Last, the modulation will break the global SDF metric, but you can dampen it easily. I'll try to cover this in a video.
@Exoclypse
@Exoclypse 4 жыл бұрын
@@InigoQuilez Oh I see, that's definitely smarter, thank you!
@bigolol
@bigolol 4 жыл бұрын
this is so incredibly good holy fucking shit
@gillian6792
@gillian6792 4 жыл бұрын
We want a tutorial or at least some clue of how you do augmented reality with sdf ! thx and love for everyone
@coolfunmario
@coolfunmario 5 жыл бұрын
Hi IQ, you have a beautiful mind and a lot of unique knowledge and programming skill on some very technical topics which seem hidden or even a kind of witchcraft for the most part ( average|common developers ). You should start raising a crowdfunding or investigating other money resources then announcing an important educational project ( book, etc. ) and making it publicly visible for the most. I am pretty sure that you will attract of lot of momentum from people interested in graphics, CGI, video games making, etc. ( the resulting interactive pictures from shaders are stunning ) but actually kept away due to the technical entry level and that arcane stuff|skill requirements. Your resulting work will be your own bible and a testimony|memorial for the humankind, to improve it. Anyway, keep up the good work.
@alijayameilio
@alijayameilio 5 жыл бұрын
This is some extreme quality video XD
@GeoffPlitt
@GeoffPlitt 5 жыл бұрын
What tools did you use to match-move and composite the video footage with your render?
@InigoQuilez
@InigoQuilez 5 жыл бұрын
I connect Shadertoy to After Effects with a custom plugin I wrote.
@GeoffPlitt
@GeoffPlitt 5 жыл бұрын
So cool :)
@dgoberna
@dgoberna 5 жыл бұрын
@@InigoQuilez LOL
@MichaelPohoreski
@MichaelPohoreski 5 жыл бұрын
Inigo Quilez Put that bad boy up on GitHub!
@GeoffPlitt
@GeoffPlitt 5 жыл бұрын
+1
@starburstdragon
@starburstdragon 5 жыл бұрын
Amazing as always - i like video before i watch it :)
@dark808bb8
@dark808bb8 5 жыл бұрын
great vid !
@gamertech4589
@gamertech4589 Жыл бұрын
Where get code for this😅
@ac12484
@ac12484 4 жыл бұрын
Could you explain please what “breaking the metric” means (if you didn’t later, I continue to watch)
@themrpancake
@themrpancake 3 жыл бұрын
3:08 lenght
@bukebeyond
@bukebeyond 5 жыл бұрын
This man is a true genius of 2020. He should be running Nvidia, Google, Facebook, Microsoft, Apple, Tesla as opposed to the stock salespeople.
@themerpheus
@themerpheus 5 жыл бұрын
Awesome!
@kupnitz
@kupnitz 4 жыл бұрын
thanks
@rendermanpro
@rendermanpro 5 жыл бұрын
awesome!
@o_o............
@o_o............ 5 жыл бұрын
2:56 banned for nudity: i challenge you youtube!
@zbl2550
@zbl2550 3 жыл бұрын
very cool...
@delgilchrist
@delgilchrist 5 жыл бұрын
great video :) keep it up!
@chucktrier
@chucktrier 5 жыл бұрын
I love it
@Lucas72928
@Lucas72928 4 жыл бұрын
Doesn't the shape get bigger when you round it? Because you're using a bigger isosurface
@InigoQuilez
@InigoQuilez 4 жыл бұрын
Yes it does. But you can made the "seed" object (the box in this case) smaller by the same amount, so keeping it's bounds constant. I know I should have say it explicitly in the video, my bad.
@SinanAkkoyun
@SinanAkkoyun 4 жыл бұрын
So basically you are programming the object into the shader itself, right?
@InigoQuilez
@InigoQuilez 4 жыл бұрын
Yes
@PixelPulse168
@PixelPulse168 5 жыл бұрын
I wish youtube can have more thumbs-up buttons.
@maxenceveilleux
@maxenceveilleux 8 ай бұрын
So... was I watching a Marvel movie? The VFX blew my mind!
@InigoQuilez
@InigoQuilez 5 ай бұрын
I got a bit carried away on this one :)
@amelavnyt
@amelavnyt 5 ай бұрын
​@InigoQuilez No, it was awesome! We need more people like you
@konstantinbondarenko5235
@konstantinbondarenko5235 5 жыл бұрын
super
@richardramirez5746
@richardramirez5746 6 ай бұрын
unbelievable...
@yellowduckgamedev
@yellowduckgamedev 2 жыл бұрын
how tf does one UV map SDF objects?
@InigoQuilez
@InigoQuilez 2 жыл бұрын
Generally, you don't!
@4arliEdinorog
@4arliEdinorog 4 жыл бұрын
Очень интересно и круто
@dimidrolhalitovich5241
@dimidrolhalitovich5241 5 жыл бұрын
i was looking for this in unreal! cos i use ofen fake chamfer in 3ds max
@andrea9015
@andrea9015 2 жыл бұрын
1:29 hahaha I understood that reference
@InigoQuilez
@InigoQuilez 2 жыл бұрын
Hehe
@omgomgomgd
@omgomgomgd 5 жыл бұрын
lenght != length whoops.
@Т1000-м1и
@Т1000-м1и 4 жыл бұрын
11 months ago
@adammajewski6381
@adammajewski6381 4 жыл бұрын
SDF = Signed Distance Functions
@ffncfhf9745
@ffncfhf9745 4 жыл бұрын
I scs
@朏
@朏 2 жыл бұрын
just random letters
Painting a Character with Maths
24:46
Inigo Quilez
Рет қаралды 418 М.
Ray Marching, and making 3D Worlds with Math
6:28
SimonDev
Рет қаралды 259 М.
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
Painting a Landscape with Maths
42:00
Inigo Quilez
Рет қаралды 719 М.
LIVE Coding "Happy Jumping"
5:43:06
Inigo Quilez
Рет қаралды 94 М.
Hexagons Are NotSoGreatAgons
14:36
Con Hathy
Рет қаралды 458 М.
Doubling the speed of my game's graphics [Voxel Devlog #18]
13:01
Real-life fractal zoom
9:16
Henry Segerman
Рет қаралды 1,1 МЛН
The SDF of a Line Segment
7:16
Inigo Quilez
Рет қаралды 95 М.
Glyphs, shapes, fonts, signed distance fields.
6:05
Martin Donald
Рет қаралды 68 М.
How Computers Draw Weird Shapes (Marching Squares)
28:00
Reducible
Рет қаралды 412 М.
SDF (signed distance function)
7:38
CGMatter
Рет қаралды 11 М.
How I made my own Fractal
17:33
Kuvina Saydaki
Рет қаралды 114 М.