micheledallerive / raytracer

A C++ raytracer
0 stars 0 forks source link

Participating media - 10 points #7

Open micheledallerive opened 7 months ago

micheledallerive commented 7 months ago

Implement very basic version of a method for rendering participating media such as smoke or fog. In general, rendering volumetric effect is quite complicated due to multitude of effects influencing the appearance. However, for the purpose of our rendered we propose you consider any light absorption in homogenous medium. In other words, when the light ray goes through a medium its intensity is simply attenuated, and this attenuation depends on the distance the light travels through the medium as well as an absorption coefficient.

The purpose of this extension is not to render very realistically looking medium but rather experiment with simple volumetric rendering and create maybe an interesting effect.

Please follow these links, where other gives hints how to get volumetric renderer which considers only absorption:

https://computergraphics.stackexchange.com/questions/227/how-are-volumetric-effects-handled-in-raytracing https://blog.demofox.org/2014/06/22/analytic-fog-density/ https://www.cs.rpi.edu/~cutler/classes/advancedgraphics/S07/final_projects/fischc/fog_simulation.html Note that there are many different ways you can represent the shape of the participating media. You can use simple primitives, meshes, analytical functions, or even Perlin noise. For getting maximum points, implementing something more complex that a sphere made of absorbing materials. Ideas:

Use a mesh to be a boundary of an absorbing media Define blobs of a participating media using some control points, similar as described in the third link (above).

micheledallerive commented 7 months ago

https://www.icorsi.ch/mod/book/view.php?id=1003388&chapterid=24731