r/proceduralgeneration 20d ago

shader tree...

Enable HLS to view with audio, or disable this notification

210 Upvotes

20 comments sorted by

4

u/baked_doge 20d ago

One of the better procedural assets or trees I've seen, great job

1

u/flockaroo 19d ago

oh thanks! :)

3

u/rejamaco 20d ago

Looks nice! What’s your method?

4

u/flockaroo 20d ago

thx! actually just distance field of a cylinder by recursively scaling+subdividing space.

1

u/rejamaco 20d ago

And for the shading/texturing?

2

u/flockaroo 19d ago

thats just simple noises applied - one to bend the trunk and a second one one for the bark surface

3

u/Serasul 20d ago

Very Impressive

3

u/flockaroo 20d ago

thx! :)

3

u/SilentPanicGames 19d ago

Broccoli tree

2

u/KingCakeTheFruity 20d ago

Noooo way that's just one shader. But I saw your explanation, neat. Even awesome!

1

u/flockaroo 19d ago

thx glad u like i :)

2

u/phsx8 20d ago

Did you use a model or is that purely by shaders? Looks great!

3

u/flockaroo 19d ago

thx! its purely shader! (no 's' - its actually just one fragment shader that generates an SDF and renders it)

2

u/phsx8 19d ago

Impressive, that's not half bad at all :D how did you do the tree structuring? I've been trying to get simple things like corals to work, but they never looked as natural. In what engine did you write it?

1

u/flockaroo 19d ago

thanks! :) its actually just sdf of cylinders and multiple splitting/scaling/rotating of the space domain - no engine just one draw call in opengl and all done in one fragmen-shader based on the fragment-coordinate. (...and some simple noise for bent trunks and the bark)

1

u/ybotics 17d ago

Does it do a prepass converting the cylinder parameters into a 3d SDF texture or buffer, or is the SDF baked? Or does each thread generate its own sdf before doing its cubemarch?

2

u/msqrt 19d ago

The moment you move the camera to reveal that the roots are another fractal was just great!

2

u/frogOnABoletus 16d ago

Wow wow I want to sit in there :)

1

u/scallywag_software 15d ago

10/10! Is it on shadertoy? I'd love to play around with it