No video

Voronoi Edges Explained Part 2

  Рет қаралды 3,486

Yusef28

Yusef28

Күн бұрын

If you already understand the basic voronoi algorithm you can start here. Part one explains why I dont use fract(). Otherwise feel free to check out part 1: • Voronoi Edges Explained
In this video:
More vector diagrams and code for the voronoi edges algorithm. I discuss other versions you might find and explain why although they might seem different on the surface, algebraicly they are the same. Then I walk through the process of creating the artwork I show in the thumbnail.
In the introductory video:
I do vector diagrams and show the code for a version of the basic voronoi algorithm that doesn't use the fract function. This isn't strictly nessessary for the voronoi edges algorithm. I chose to show this version because it might help people see the math better.
Here is the final code for this project running live on shadertoy:
www.shadertoy....
Resources:
Inigo Quilez's origional article on the algorithm
iquilezles.org...
tomkh's shader which also has links to a diagram he wrote that helped it make sense for me
www.shadertoy....
Shane's Rounded border shader inspired the lighting/art style:
www.shadertoy....
Resource on the smooth minumum function:
• Function Smoothing Exp...
floating point image was by Stannered from wikipedia commons:
commons.wikime...

Пікірлер: 14
@truefiasco2637
@truefiasco2637 Ай бұрын
it's about half a year since last playing with voronoi, One of my favourite things to do is normalise the values from centre of cell to edge, I do this by dividing dist of closest point by dist of second closest. I also like to normalise the normal map or slope and multiply that my my norm dist. this gives me a perfect polar uv map of each cell. doing this before or after smooth function makes a difference. really nice tutorial
@Yusef28
@Yusef28 Ай бұрын
Excellent idea. Another commenter also asked about normalizing cells so I'll point them to this comment!
@Dryym
@Dryym Ай бұрын
Quick note. 16:00 The true colour of the apple is not white. That is instead the colour of the light itself. Unless you have a metallic surface, Specular reflections are in most cases the colour of the light. The reason is weird and quantum mechanical and has to do with the fact that metals are conductors but apples aren't. Edit: Also. As a suggestion for a future video, I have always wanted to know how one would get a normalized voronoi texture such that the central point of the cell has a value of 0, And the edge of the cell has a value of 1.
@Yusef28
@Yusef28 Ай бұрын
Thanks for your comment. Yes I meant to say the color that we see is white so if I said the apple's color that was a mistake. Very good point about metallic surfaces being conductors also. Interesting question about normalized voronoi cell values. Off the top of my head I can only imagine that for every cell you would have to run a separate calculation comparing distances from each edge to the center of the cell, store the longest distance and use that to find a normalized distance. I'm not sure if this is even the way it would be done though. Also you can find the comment by truefiasco2637 on this video who described the method they use for normalization!
@curiouspers
@curiouspers Ай бұрын
This is very nice, thank you! ❤
@Yusef28
@Yusef28 Ай бұрын
Glad you enjoyed!
@user-sg3vx1xe6b
@user-sg3vx1xe6b Ай бұрын
hey, i was curious what would happen if we used a tan function insead of sin function...
@Yusef28
@Yusef28 28 күн бұрын
Good question. If you look at the graph for the tan(angle) function you'll see that as the angle moves towards pi/2 (+ any multple of 2pi) tan(angle) goes to towards infinity. Although it's undefined at exactly the above angles. This is because internally tan(a) is actually sin(a)/cos(a) so as the angle moves towards pi/2 etc it causes division by very small numbers and then 0. After this though the function comes back in from negative infinity. To answer your question I imagine it would mean the "points" or cells would quickly move out of view but also come back into view. (I cheated and tried this out myself). It actually makes for an interesting effect!
@_-8980
@_-8980 Ай бұрын
really good video
@Yusef28
@Yusef28 Ай бұрын
I'm glad to hear it!
@juanitome1327
@juanitome1327 Ай бұрын
Goated video great work! Any good places on where to start learning to animate with python?? This looks like a lot of fun!
@Yusef28
@Yusef28 Ай бұрын
I'm glad to hear you enjoyed the video. I've only used GLSL to make these sorts of animations and thebookofshaders would be a good start. I'm not sure about python.
@truefiasco2637
@truefiasco2637 24 күн бұрын
I would explore using software like TouchDesigner, that uses Vulkan as a render engine but allows you to program variables using python.
@Yusef28
@Yusef28 15 күн бұрын
@@truefiasco2637 Hey I saw this reply in my feed but then couldn't find it until now. Yes I have played around with touch designer a bit already but this is a great suggestion. Especially since the shader used in my upcoming video would lend itself well to art installations. I mention that in the video but I didn't have time to get the effect running in touch. I'll keep this idea in mind for the future!
Beating Connect 4 with Graph Theory
10:51
2swap
Рет қаралды 86 М.
One second to compute the largest Fibonacci number I can
25:55
Sheafification of G
Рет қаралды 270 М.
Can This Bubble Save My Life? 😱
00:55
Topper Guild
Рет қаралды 85 МЛН
The Giant sleep in the town 👹🛏️🏡
00:24
Construction Site
Рет қаралды 20 МЛН
Joker can't swim!#joker #shorts
00:46
Untitled Joker
Рет қаралды 40 МЛН
Bony Just Wants To Take A Shower #animation
00:10
GREEN MAX
Рет қаралды 7 МЛН
Is the Future of Linear Algebra.. Random?
35:11
Mutual Information
Рет қаралды 273 М.
10 weird algorithms
9:06
Fireship
Рет қаралды 1,2 МЛН
Voronoi Edges Explained
9:57
Yusef28
Рет қаралды 10 М.
Biggest Breakthroughs in Math: 2023
19:12
Quanta Magazine
Рет қаралды 1,7 МЛН
Learn to code with an unfair advantage.
15:05
Jason Goodison
Рет қаралды 173 М.
*Next-door 10x Software Engineer* [FULL]
4:50
Programmers are also human
Рет қаралды 541 М.
I Made the WEIRDEST ASCII Renderer...ever.
8:02
Yusef28
Рет қаралды 3,5 М.
Every Weird Math Paradox
11:15
ThoughtThrill
Рет қаралды 375 М.
Ray Tracing Harmonic Functions
9:19
Mark Gillespie
Рет қаралды 5 М.
Can This Bubble Save My Life? 😱
00:55
Topper Guild
Рет қаралды 85 МЛН