Examples from the playground

@Necips, I accept your baton of particles :slight_smile:

Here is the Babylon particles spiced with some shaders
https://www.babylonjs-playground.com/#8GKG5X#13

6 Likes

That is FANTASTIC Avin!

Took a quick look. LIKE all those fract()s!

I changed ONE number. BOOM. So relaxing…

https://www.babylonjs-playground.com/#8GKG5X#15

Nice work.

How are the particles - even there? Lost em in the fracts()
Vertex set at… #110?
IDK.

Thanks!

~ : )

2 Likes

@aFalcon These lines multiply all position values (xyz) ​​by the noise value(float number). thus you multiply the position by a higher value and the sphere becomes larger (each particle has become longer from the center). and you find yourself inside a sphere :slight_smile:

1 Like

T-Junctions and LOD Chunking.

https://www.babylonjs-playground.com/#I9SC1Q

It’s a little glitchy on how it cleans up the chunks, but I’m sure a little bit of work could make this a full fledged Terrain System.

3 Likes

@avin @Pryme8 @Necips @jerome

People make this forum GREATEST ALL TIME.

It appears: LOAD CHUNK, LOD, Mutli-Material, GALAXY, Spin-Blast, Particle-Systems… in reach.

And BABYLON gets GALACTIC.

~ : )

Oh SNAP - the MATRIX.

Amazing patterns:

Wireframe Mountians

https://www.babylonjs-playground.com/#CGTKV7#11

6 Likes

magnificient !

2 Likes

@Necips made ultra simple version of this twitter demo :))

https://playground.babylonjs.com/#A9LUPS#10

11 Likes

Black hole in space (2.5D version)

https://www.babylonjs-playground.com/#BEJEB3#9

9 Likes

Very cool!

1 Like

and here is a full 3D version of particles tornado (play with zoom, it has a focus-effect with smoothstep under the hood)

https://www.babylonjs-playground.com/#UYS16D#8

1 Like

LIKE. Black hole. Found the alternate ROTATION to make it GROW and SHRINK.

https://www.babylonjs-playground.com/#BEJEB3#13 COOL.

Went looking for FIBONACCI (makes that shape), but found FRACT() and smoothstep().

I try to LEARN this. So THANKS.

It helped to find these:

#define rand1(p) fract(sin(p* 78.233)* 43758.5453) 

The SINE in the FRACT, makes sense, but I do not understand what it is.

mat2 rot (float a){
	float ca = cos(a);
    float sa = sin(a);
    return mat2(ca,-sa,sa,ca);
}

Stellar ROTATION MATRIX, if, that is what iuv is.

And performance.now seems important.

Thanks for sharing.

1 Like

Circles rotate around center with rot (aka rotation) function - it rotates uv around zero point.

performance.now uses as a timer, seems like it is better solution rather then increment time with fixed value each frame

rand1 is a classic randomize function for GLSL (it does not have native one)

I highly recomend this site https://thebookofshaders.com/ and lessons of this guy YouTube to start writing your own shaders - it’s very fun :slight_smile:

3 Likes

It is very helpful, thank you @avin.

I did not know about “Art of Code”.

That looks great!

Hopefully I get that far.

1 Like

Very juicy resource thank you.

1 Like

using shadertoy.com filter shaders with your Babylon scene
(similar demo already was in standart examples, but I added some helper code to just copy shader from site and paste it in your code)

https://www.babylonjs-playground.com/#XH185X#2

https://www.babylonjs-playground.com/#XH185X#3

10 Likes

Excellent !!! :blush:

1 Like

You should add some of this to Shader Talk - Conversations on GLSL

1 Like

https://www.babylonjs-playground.com/#XH185X#4

4 Likes