Skip to content

grievans/VolumetricStudy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VolumetricStudy

Expanding on my existing coursework creating a GPU-side monte carlo path tracer, I implemented path tracing for volumetric models, allowing the rendering of effects such as smoke and fire.

I developed three integrators of increasing complexity:

  • A simple model which only samples lighting directly from point lights and from the environment map behind the volume.

  • An integrator based on Physically Based Rendering's SimpleVolPathIntegrator; running in GPU-side GLSL rather than C++, adapted to use pre-defined RGB channels rather than their spectrum model, and adding support for surfaces with BSDFs, naïvely sampling bounces based off the BSDF when collisions occur.

  • An expanded version of the above integrator based on PBRT's VolPathIntegrator, adding multiple-importance sampling and hence allowing the use of point/spot lights and better sampling contributions per each frame.

All three integrators were used with a variety of sources for the density of the volumes:

  • Pre-defined noise functions with user-controllable parameters (having user-set radius contain a volume of varying density based on one noise pattern, while another perturbs the coordinates used to find values within that region, with the magnitude and frequency of the perturbance and the distribution of density values controllable).

  • Metaballs, with real-time editing of their placement/count/scale through clicking and dragging by the user.

  • Density field data loaded from VDB files into a 3D texture using OpenVDB.

  • A pre-programmed array which I had used as testing before swapping to 3D textures for the above approach, which can be made to tile or use trilinear interpolation.

The volume can also be made emissive, either scaling emissions linearly with density or using temperature data loaded in through a VDB file. Such temperature data can be used either as a threshold for linearly scaling to a user-specified color or it can be used with shading replicating the effects of blackbody radiation.

Other controllable properties include the asymmetry factor used by the Henyey-Greenstein phase function and scales for the sigma_a and sigma_s values for the volume used within the latter two integrators.

Other render settings include step lengths and max iteration depths for various aspects of the pathmarching process. This includes options for variable step lengths, which is useful for rendering large-scale volumes while reducing the artifacts that would be caused by simply increasing the step length to a large constant amount, without requiring many more steps to be taken.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors