Posts

Showing posts from May, 2020

Final Project: Volumetric Rendering Proposal

Image
For my final project of CSE 168, I decided to do volumetric rendering. My end goal is to create either a fog or smoke environment image. With some research I now know that they are four processes about a volumetric rendering: absorption, out-scattering, emission, and in-scattering. For my first initial goal, I wanted to render a isotropic homogenous volume. To render effect of going through a participating medium, I have to create a volume that serves as the medium. To make it simple, I used a sphere as a volume. I modified the test file from HW2, and created a sphere in front of a quadlight. The brown sphere represents the medium Then I started working on absorption. I defined an absorption coefficient of vec3(2, 2, 2). For now, I shoot a ray in the scene until it hits a surface, if it is a volume, ignore then shoot again until it is a surface or went out of the scene. Then, I get the emission color and shoots another ray in the opposite direction ( ​ ), but this time on