VEX Ray Tracer #4: Blinn-Phong Shading

How I’ve been looking forward to this part. When I wrote this ray tracer for the first time, implementing the Blinn–Phong Reflection Model was one of my proudest achievements. Not because it’s complicated or anything (it’s actually pretty straightforward), but because it was the first time I translated a technical write-up and pseudo-code into something useful for my purpose. It was also the first time where I could’ve stopped and have a working product....

January 30, 2021

VEX Ray Tracer #3: Supersampling Anti-Aliasing

And we’re back. In the last part, we projected three teapots onto our plane and gathered the colour from the teapot’s Cd attribute. But what you probably noticed is that our objects have very jagged/pixelated edges. That is because every pixel sends only a single ray in a single direction and hitting a single point before it reports back. That’s where Supersampling comes into play. The general idea of supersampling or SSAA (Supersampling Anti-Aliasing) is to instead of using a single ray to gather scene data, using multiple with slightly different offsets and directions....

January 23, 2021

VEX Ray Tracer #2: Plane Projection

Now let’s get into it. I read in all three elements (plane, camera and scene) into the empty ray_tracer geometry. Make sure to choose the camOrigin Add SOP inside the camera object to only merge in a single point instead of the camera visualizer. Also, transform into the object for both the camOrigin and the plane since they probably will have object transforms. We are also adding point normals to the scene in case the come in on vertices or not at all....

January 17, 2021

VEX Ray Tracer #1: Initial Setup

No more procrastinating. After thinking about all the different ways to put this on the internet, I decided to start a blog, and this is my first blog post. In August 2019, I uploaded a video on my Vimeo channel, showcasing a ray tracer written in VEX inside SideFX’s Houdini. I’ve been meaning to put up some explanation, video tutorial, class, whatever you want to call it on how to write this thing....

January 17, 2021