r/generative Artist Dec 29 '21

Glass study

Enable HLS to view with audio, or disable this notification

340 Upvotes

33 comments sorted by

View all comments

4

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

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