Jump to content

Vex Pathtracer


DonRomano

Recommended Posts

Hey guys, 

I started making a very simple pathtracer with vex in sopland. I'll add basic reflection and refraction, and keep it very simple as it is made as an "educational tool" to help students understand how pathtracing works under the hood. Once I'll have finish I'll share the file here if some of you are interested.

I added an "animation" in which we can see the different paths a ray takes : the primary path (in red/blue in the video), the next event estimation path (in black/yellow), and the diffuse bounces (in magenta). I'll also add the next event estimation for the diffuse bounces, and of course when it will be implemented, reflection and refraction paths.

Here's a little video of the animation, and a very non-converged render

https://streamable.com/37kxua

vex_raytracer.thumb.png.3e6a37b05cb2829bfda118cfeba30c8a.png

(I think I have a bug in the global illumination I'll fix it tomorrow).

 

Cheers,

Edited by DonRomano
  • Like 4
Link to comment
Share on other sites

Go a bit of time yesterday and this morning so I rewrote the whole thing from scratch, with fresnel blend for glass (to get both reflection and refraction), and I fixed a few bugs in the gi. I need to fix the animation of the rays now, and it should be good. I might add antialiasing too to get smoother renders (and maybe add a simple photon mapping help to caustics because they are still very noisy).

 

60897087f20d4_unknown(4).thumb.png.9c729e2456092a4e43f411e1503a6c28.png

6089707a5366c_unknown(1).thumb.png.b0864599070afe472174ccb4f1b28e6e.png

60897069e43fb_unknown(3).thumb.png.baed2b6cbdc2ac0d0548f2932dd27fb0.pngunknown.thumb.png.d7a7033e49de83f1dd9d759dd1baea12.png

 

I attached the file though it's not finished (in case you want to also test). I need to add more comments and notes to help understand what's going on, and once everything's fine I'll share the "final" file. You need to include the "raytracer.h" file in a directory defined in the HOUDINI_VEX_PATH in houdini.env.

raytracer.hipnc   raytracer.h

 

Cheers,

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...