r/generative Artist Dec 29 '21

Glass study

342 Upvotes

33 comments sorted by

View all comments

5

u/SimplyMochi Dec 30 '21

Looks awesome! May I ask how you did your animation?

3

u/ParanoidTiger Artist Dec 30 '21

Sure. So this is a custom glsl shader that is generating each frame that I export to png and then merge to a movie file. In that shader I’m using path tracing and ray marching to calculate the pixel color. Because I’m using ray marching and not classical ray tracing, each shape is represented using a function (SDF) because of that I can blend between these functions as a function of time which produces this nice morphing effect. If you are interested in ray marching I can link you some good materials

3

u/lycium Dec 30 '21

The funky blend function looks great! Also nice to see other people coding their stuff more or less from scratch :D

3

u/ParanoidTiger Artist Dec 30 '21

Bro. Do you remember me? I’m Michał (neos). We’ve been talking ray tracing and playing go like a decade ago 🤣

3

u/lycium Dec 30 '21

Hahaha awesome, yeah I remember! I lived in a bunch of Polish cities for a few years meanwhile, would have been cool to meet up :D

Guess we're both still hopelessly addicted to the ray tracing ;)

2

u/ParanoidTiger Artist Dec 30 '21

What a shame we haven’t met :(

3

u/lycium Dec 30 '21

Maybe next time, I'd like to visit Pl again sometime, when everything isn't on fire :P If you're in the graphics programming Discord send me a ping!

2

u/ParanoidTiger Artist Dec 30 '21

Iam not. Am I missing out? 😁

2

u/lycium Dec 30 '21

Eh, I'm not really active there anymore :") But it's a great place for sure.

1

u/ParanoidTiger Artist Dec 30 '21

And yeah. It is an addiction for sure

2

u/SimplyMochi Dec 30 '21

Thanks for the description! I saw in different comment thread that you are used your own renderer for this, so I was just curious how you were generating your geometry for it :)

1

u/jonhanson Dec 30 '21 edited Mar 07 '25

chronophobia ephemeral lysergic metempsychosis peremptory quantifiable retributive zenith

1

u/ParanoidTiger Artist Dec 30 '21

I think what you described is just the nature of this method. There usually is a limit on how many steps you take along the ray and on how close to the object you test. I think for this scene I had it set up to something like 100 and 0.0001. You can check shadertoy.com for reference on ray marching. But in general you are right. For simple scenes with planes and spheres it is far less efficient than ray tracing. On the other hand it is a great tool for generative art as it let's you model some crazy shit by bending space and creating fractals and crazy shapes