A SideFX Houdini VEX raytracer
with photon mapping global illumination and full recursive reflections and refractions.
Tested on SideFX Houdini 16.x.x
Very high poly count geometry processed with SOPGI at high settings. Viewport is set to Hidden Wireframe
SOPGI work on the geometry points, so to viz the result properly set your viewport to HIDDEN LINE INVISIBLE mode ( WIREFRAME )
SOPGI is a personal side project to teach me how to do mostly global illumination with photons and many other things I learned on the way. It try to be correct enough to make things look good.
It also doesn't want to be a renderer. It is mainly a solution to store lighting, shading and GI data into the geometry to use later for things like any other attribute.
For animation, you will need a toons of photons to remove the noise/flicker in the GI solution. It is just an almost brute force solution after all.
It's been architected to give you the best result as quick as I could possibly make it so it is to be considered a very Novel approach in many areas.
Everything in here is more for educational purpose so do not expect a SolidAngle Arnold render quality and performance out of this.
Some of the functionality have been implemented in a simple fashion. Please update this repository if you add or improve anything.
Some part have been coded earlier and some other later in time so some may be a bit incorrect from a pure mathematical point of view then some other as I was learning on the go.
SOPGI is comprised of a set of nodes to generate and store a Raytrace, GI, ShadowMaps and Recursions on a per point level.
Every aspect of the render data will be stored on a per points attributes for later use as you would with any other attributes.
SOPGI Node's list:
This node is the core renderer.
It will generate all the render data and output the final attributes value.
It will also comp out the final result and store it on the Cd
channel for you ro review.
The second optional output, will output only the photonmap points.
Final SOPGI result followed from Left to Right by: BRDF, AO, GI and Shadows samples.
It is subdivided in 3 main Tabs:
Will give you the ability to change the number of samples to use for the Raycasting calculation.
For example you can change the number of photons or AmbientOcclusion rays to use.
There are also optimization parameters you can tweak to speed up the calculation and
every parameter responsible for speeding up the process
are marked with an Astersisk *
in front of their name.
Since everthing get stored on photons, SOPGI ARay create a point cloud with all the necessary attributes and everything get transferred to the Geometry using point clouds mechanism. This tab let you control how those values get transferred like the point cloud Radius, precision and Gaussian Blur filter to fine tune the final soultion. This can heavily impact the final quality.
This tab let you tweak the way every single render data get composited together. Since this happen after the raycasting, depending on your geometry tessellation, it can be as fast as realtime.
The " USE BRDF
" option on the main SOPGI ARay's node option tab will disable all the heavy calculation
and only output Diffuse and Specular to work with the Recursive Reflections and Refractions.
This way you can preview Recursions very quickly and tweak Specular and Diffuse
before moving into tweaking GI etc.
More info about this node soon.
This node will prepare a geometry to be plugged and processed by the SOPGI ARay node. It will attach all the shading attributes so in some way this node is your Geometry Shader. For Reflection or Refractions, you can only have full mirrors or full transparent shader or a mix of both.
It does include for DIFFUSE:
For SPECULAR:
You can also apply textures to your objects as long as they get stored into point
attributes and inside v@diffuseColor
SOPGI ARay will pick them up automatically and use
them in the computation.
Simple anti-alias noise applied to the cornellBox.
This node is a simple utility node that will let you quickly generate a CornellBox geometry and tweak its colors. It will also let you create some simple geometry inside the box like a sphere and some standard Houdini geo and they will also be all animated so the sphere and other geo will rotate inside the CornellBox for you to test out SOPGI render feautures.
This node will let you convert any Geo into a SOPGI Light to be plugged into the SOPGI ARay node.
In this implementation LIghts are very simple, they have a color, and intensity, a distance radius and samples count.
Increasing the light distance/radius.
This node is an utility node to let you visualize Light Rays along their traced path. It include light bounces so you can specify how many light bounces you want to viz. Since Recursions has been implemented later, this node does not take into account transparent/IOR geometry.