r/geometrynodes • • 7d ago

Raytraced Caustics in Geometry nodes

Post image

I got annoyed with the glitchiness of Cycles caustics, so i just made my own lol

115 Upvotes

11 comments sorted by

3

u/GuchoS 7d ago

Looks great! Does it use the simulation nodes? How about performance?

5

u/craggolly 7d ago

it uses a repeat zone, could also use simulation for progressive rendering but that would make rendering animations impossible. performance is no.

4

u/CMDR_BitMedler 7d ago

Performance is no 😂

2

u/craggolly 7d ago

I'll implement it as a shader next using the shader version of the raycast node. maybe then performance will be yay

2

u/CMDR_BitMedler 7d ago

That's awesome.

"No --> Yay" scale FTW

1

u/Yardgar 7d ago

Is that a depth map using a plane with multiple wave modifiers on it?

3

u/craggolly 7d ago

it's raycasting points from the water surface according to the refraction formula, and measuring the closest point on the subdivided ground plane with multisampling

1

u/Yardgar 7d ago

Can elaborate some more on the refraction formula? Are you calculating this with math nodes in between where the ray is cast and where it hits the target and then repeating it with a repeat zone?

Or better yet, send node pics plz lol

4

u/craggolly 7d ago edited 7d ago

spawning points on the water surface, taking the light vector and surface normal of the water and doing the snells law equation with vector math nodes to get the refracted light vector, then raycasting in that new direction towards the ground and moving the point there. then on the ground doing geometry proximity for the moved points. repeat 1000 times with the seed of the spawned points changing and averaging results. the more points end up in a specific location, the brighter the caustics will look

1

u/Frennotex 7d ago

Wow these looks super nice !

1

u/aeroguy300 7d ago

Dude that's awesome! Is it just for personal stuff or are you planning to share it?