Jump to content


Some more Ray Tracing Help (Smoke)


2 replies to this topic

#1 Psycho_Gamer

    New Member

  • Members
  • Pip
  • 8 posts

Posted 02 April 2007 - 07:35 AM

Hello again,

Is there somehow a way to raytrace smoke, such as that from a cigarette? I can only seem to find software packages that do it for you, but nothing useful providing hints on how to do so via good ol c++ :P. Thanks

#2 Hertta

    Member

  • Members
  • PipPip
  • 81 posts

Posted 02 April 2007 - 02:28 PM

Hmm. What about just adding the base color of the smoke (blueish grey?) and then define it's "deepness" from how thick the smoke is or so.

A bit hard to explain, but it should work like that.

#3 Reedbeta

    DevMaster Staff

  • Administrators
  • 4979 posts
  • LocationBellevue, WA

Posted 02 April 2007 - 02:41 PM

Raytracing high-quality smoke, steam, clouds, fire and so forth is done with volumetric scattering. Basically, your scene definition can contain volumes filled with participating media (participating in light transport, that is). When a ray passes through a participating medium, you have to cut the ray into many small intervals and take into account the effects of light absorption/scattering by the medium at each point. It's pretty complicated - if you're interested in learning more, google for 'volumetring scattering' and 'participating media', or I also recommend picking up the book Physically Based Rendering by Pharr and Humphreys, which is the standard text on advanced raytracing techniques.
reedbeta.com - developer blog, OpenGL demos, and other projects





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users