adding images
BIN
03/time.png
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
BIN
06/easing.png
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
BIN
07/batman.png
|
Before Width: | Height: | Size: 241 KiB After Width: | Height: | Size: 241 KiB |
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
BIN
09/dots5.png
|
Before Width: | Height: | Size: 284 KiB After Width: | Height: | Size: 284 KiB |
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 88 KiB |
BIN
09/nuts.png
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 146 KiB |
BIN
10/1d-random.png
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 73 KiB |
BIN
10/ikeda-00.png
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
BIN
10/ikeda-02.png
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 40 KiB |
BIN
10/ikeda-03.png
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
BIN
11/1d-noise.png
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
BIN
11/3d-noise.png
|
Before Width: | Height: | Size: 253 KiB After Width: | Height: | Size: 253 KiB |
BIN
11/3d-pnoise.png
|
Before Width: | Height: | Size: 224 KiB After Width: | Height: | Size: 225 KiB |
BIN
11/3d-snoise.png
|
Before Width: | Height: | Size: 338 KiB After Width: | Height: | Size: 338 KiB |
|
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 108 KiB |
BIN
11/iching-03.png
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
BIN
11/lava-lamp.png
|
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 646 KiB After Width: | Height: | Size: 648 KiB |
|
Before Width: | Height: | Size: 266 KiB After Width: | Height: | Size: 266 KiB |
BIN
12/2d-cnoise.png
|
Before Width: | Height: | Size: 622 KiB After Width: | Height: | Size: 622 KiB |
|
Before Width: | Height: | Size: 618 KiB After Width: | Height: | Size: 623 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 266 KiB |
BIN
12/3d-cnoise.png
|
Before Width: | Height: | Size: 560 KiB After Width: | Height: | Size: 559 KiB |
|
|
@ -155,8 +155,6 @@ Once you figurate out this algorithm think interesting and creative uses for it.
|
|||
|
||||

|
||||
|
||||
<iframe src="https://player.vimeo.com/video/82989945?title=0&byline=0&portrait=0" width="800" height="450" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
||||
|
||||
### Improving Voronoi
|
||||
|
||||
In 2011, [Stefan Gustavson optimized Steven Worley's algorithm to GPU](http://webstaff.itn.liu.se/~stegu/GLSL-cellular/GLSL-cellular-notes.pdf) by only iterating trough a 2x2 matrix instead of 3x3. This reduce the work significantly but can create artifacts in form of discontinuities. Take a look to the following examples.
|
||||
|
|
@ -173,8 +171,8 @@ Inigio's experiment on voronoi didn't stop there. In 2014 he wrote this nice art
|
|||
|
||||
<a href="../edit.html#12/2d-voronoise.frag"><canvas id="custom" class="canvas" data-fragment-url="2d-voronoise.frag" width="520px" height="200px"></canvas></a>
|
||||
|
||||
Now is up to you to observe and learn how to use and modify this technique for your own expressive porpoises.
|
||||
Now is up to look closely at things, be inspired by nature to find your own voice on this technique.
|
||||
|
||||

|
||||
|
||||
<div class="glslGallery" data="12/metaballs,12/stippling,12/cell,12/tissue,12/cracks,160504143842" data-properties="clickRun:edior,openFrameIcon:false"></div>
|
||||
|
||||

|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// Author @patriciogv - 2015
|
||||
// Author: @patriciogv - 2015
|
||||
// Title: Cell
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// Author @patriciogv - 2015
|
||||
// Author: @patriciogv - 2015
|
||||
// Title: Cracks
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
|
|
@ -57,7 +58,7 @@ vec2 cellular2x2(vec2 P) {
|
|||
|
||||
void main(void) {
|
||||
vec2 st = gl_FragCoord.xy/u_resolution.xy;
|
||||
st = (st-.5)*.25+.5;
|
||||
st = (st-.5)*.75+.5;
|
||||
if (u_resolution.y > u_resolution.x ) {
|
||||
st.y *= u_resolution.y/u_resolution.x;
|
||||
st.y -= (u_resolution.y*.5-u_resolution.x*.5)/u_resolution.x;
|
||||
|
|
|
|||
BIN
12/cracks.png
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 78 KiB |
|
|
@ -1,5 +1,5 @@
|
|||
// Author: @patriciogv
|
||||
// Title: MetaBalls
|
||||
// Author: @patriciogv - 2015
|
||||
// Title: Metaballs
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
|
|
|
|||
BIN
12/metaballs.gif
|
Before Width: | Height: | Size: 1.9 MiB |
BIN
12/metaballs.png
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
|
@ -1,4 +1,5 @@
|
|||
// Author @patriciogv - 2015
|
||||
// Author: @patriciogv - 2015
|
||||
// Title: Stippling
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
|
|
@ -57,7 +58,7 @@ vec2 cellular2x2(vec2 P) {
|
|||
|
||||
void main(void) {
|
||||
vec2 st = gl_FragCoord.xy/u_resolution.xy;
|
||||
st = (st-.5)*.5+.5;
|
||||
st = (st-.5)*.75+.5;
|
||||
if (u_resolution.y > u_resolution.x ) {
|
||||
st.y *= u_resolution.y/u_resolution.x;
|
||||
st.y -= (u_resolution.y*.5-u_resolution.x*.5)/u_resolution.x;
|
||||
|
|
|
|||
BIN
12/stippling.png
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 60 KiB |
|
|
@ -1,3 +1,6 @@
|
|||
// Author: @patriciogv - 2015
|
||||
// Title: Tissue
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
|
@ -60,7 +63,7 @@ vec3 voronoi( in vec2 x, float rnd ) {
|
|||
|
||||
void main() {
|
||||
vec2 st = gl_FragCoord.xy/u_resolution.xy;
|
||||
st = (st-.5)*.25+.5;
|
||||
st = (st-.5)*.75+.5;
|
||||
if (u_resolution.y > u_resolution.x ) {
|
||||
st.y *= u_resolution.y/u_resolution.x;
|
||||
st.y -= (u_resolution.y*.5-u_resolution.x*.5)/u_resolution.x;
|
||||
|
|
@ -73,8 +76,6 @@ void main() {
|
|||
float d = dot(st-.5,st-.5);
|
||||
vec3 c = voronoi( 20.*st, pow(d,.4) );
|
||||
|
||||
// isolines
|
||||
// color = c.x*(0.5 + 0.5*sin(64.0*c.x))*vec3(1.0);
|
||||
// borders
|
||||
color = mix( vec3(1.0), color, smoothstep( 0.01, 0.02, c.x ) );
|
||||
// feature points
|
||||
|
|
|
|||
BIN
12/tissue.png
|
Before Width: | Height: | Size: 168 KiB After Width: | Height: | Size: 274 KiB |
BIN
12/vorono-01.png
|
Before Width: | Height: | Size: 668 KiB After Width: | Height: | Size: 666 KiB |
BIN
13/1d-fbm.png
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
19
13/README.md
|
|
@ -1,3 +1,5 @@
|
|||

|
||||
|
||||
## Fractal Brownian Motion
|
||||
|
||||
Noise tends to means different things for different people. Musicians will think it in disturbing sounds, communicators as interference and astrophysics as cosmic microwave background. In fact most of this concept have one things in common that bring as back to the begining of random. Waves and their properties. Audio or electromagnetical waves, fluctuation overtime of a signal. That change happens in amplitud and frequency. The ecuation for it looks like this:
|
||||
|
|
@ -66,7 +68,11 @@ The following code is an example of how fBm could be implemented on two dimensio
|
|||
* Modify the lacunarity of the fBm on line 47
|
||||
* Explore by changing the gain on line 48
|
||||
|
||||
This techniques is use commonly to construct procedural landscapes. The self similarity of the fBm is perfect for mountains, together with a close cassing known as turbulence. Esentially a fBm but constructed from the absolute value of a signed noise.
|
||||
This techniques is use commonly to construct procedural landscapes. The self similarity of the fBm is perfect for mountains. If you are interested in this use you defenetly should read [this great article of Inigo Quiles about advance noise](http://www.iquilezles.org/www/articles/morenoise/morenoise.htm).
|
||||
|
||||

|
||||
|
||||
Using escentially the same technique is also possible to obtain other effect like what is known as **turbulence**. It's esentially a fBm but constructed from the absolute value of a signed noise.
|
||||
|
||||
```glsl
|
||||
for (int i = 0; i < OCTAVES; i++) {
|
||||
|
|
@ -78,7 +84,7 @@ for (int i = 0; i < OCTAVES; i++) {
|
|||
|
||||
<a href="../edit.html#13/turbulence.frag"><img src="turbulence-long.png" width="520px" height="200px"></img></a>
|
||||
|
||||
Another member of this family is the ridge. Constructed similarly to the turbolence but with some extra calculations:
|
||||
Another member of this family of algorithms is the **ridge**. Constructed similarly to the turbolence but with some extra calculations:
|
||||
|
||||
```glsl
|
||||
n = abs(n); // create creases
|
||||
|
|
@ -88,3 +94,12 @@ Another member of this family is the ridge. Constructed similarly to the turbole
|
|||
|
||||
<a href="../edit.html#13/ridge.frag"><img src="ridge-long.png" width="520px" height="200px"></img></a>
|
||||
|
||||
### Domain Warping
|
||||
|
||||
[Inigo Quiles wrote this other fascinating article](http://www.iquilezles.org/www/articles/warp/warp.htm) about how is possible to use fBm to warp a space of a fBm. Mind blowing, Right? Is like the dream inside the dream of Inception.
|
||||
|
||||

|
||||
|
||||
A mild example of this technique is the following code where the wrap is use to produce something this clouds-like texture. Note how the self similarity propertie still is apreciated.
|
||||
|
||||
<div class='codeAndCanvas' data='clouds.frag'></div>
|
||||
|
|
|
|||
BIN
13/clouds.png
|
Before Width: | Height: | Size: 812 KiB After Width: | Height: | Size: 812 KiB |
|
After Width: | Height: | Size: 135 KiB |
BIN
13/noise.png
|
Before Width: | Height: | Size: 556 KiB After Width: | Height: | Size: 558 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 222 KiB |