POV-Ray : Newsgroups : povray.general : Dust motes Server Time
27 Nov 2024 00:36:58 EST (-0500)
  Dust motes (Message 1 to 4 of 4)  
From: Christian Froeschlin
Subject: Dust motes
Date: 3 Jul 2009 11:28:35
Message: <4a4e23a3$1@news.povray.org>
I was wondering how to achieve the effect of seeing
dust motes as glowing specks in a light ray. I tried
using scattering media but then I also got black spots
outside the light ray. Of course I could just restrict
the container but I'm looking for a more "purist" way
to understand how real dust motes work ;)


Post a reply to this message

From: Tim Attwood
Subject: Re: Dust motes
Date: 3 Jul 2009 18:58:05
Message: <4a4e8cfd$1@news.povray.org>
>I was wondering how to achieve the effect of seeing
> dust motes as glowing specks in a light ray. I tried
> using scattering media but then I also got black spots
> outside the light ray. Of course I could just restrict
> the container but I'm looking for a more "purist" way
> to understand how real dust motes work ;)

If you think about it, a dust mote is essentially clear
under normal conditions, the bright parts you see
in a light ray are the bright highlights.

#include "colors.inc"

camera {
   location  <0.0, 0.5, -4.0>
   direction 1.5*z
   right     x*image_width/image_height
   look_at   <0.0, 0.0,  0.0>
}

background {Black}

light_source {
  <0,10,0>
  color <1,1,1>*3
  spotlight
  point_at <0,-1,0>
  radius 2.5
  falloff 5
}

#default {finish{ambient 0 diffuse 1}}

plane {y,-1 pigment{checker White Blue}}

box { // media container
   <-2,-1,-2>,<2,9.9,2>
   hollow
   material {
      texture {
         pigment {
            Clear
         }
      }
      interior {
         media {
            scattering {
               1,<1,1,1>*0.2
            }
         }
      }
   }
}

#declare mote = triangle {
   <0,0,0>,<0.01,0,0>,<0,0.01,0.005>
   hollow // hollow is important because of the media
   texture {
      pigment {Clear}
      finish{
         specular 1
         roughness 0.5
      }
   }
};
#declare s = seed(1);
#declare c = 0;
#while (c<5000)  
   #declare loc = <rand(s)*4-2,rand(s)*4-0.99,rand(s)*4-2>;
   object {mote 
      rotate <0,rand(s)*360,0>
      translate loc
   }
   #declare c=c+1;
#end


Post a reply to this message

From: Reactor
Subject: Re: Dust motes
Date: 3 Jul 2009 19:30:00
Message: <web.4a4e93ecec282374c0ba268c0@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> I was wondering how to achieve the effect of seeing
> dust motes as glowing specks in a light ray. I tried
> using scattering media but then I also got black spots
> outside the light ray. Of course I could just restrict
> the container but I'm looking for a more "purist" way
> to understand how real dust motes work ;)


If you post your code, I can be more helpful, but I'd like to remind you that
scattering media has an absorption component controlled by the 'extinction'
keyword - I don't know if the black spots you are referring to are areas where
the media absorbed some of the light coming toward the camera or not.

Alternatively, Tim's recommendation of the clear-but-shiny motes would also be a
good way.


-Reactor


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Dust motes
Date: 4 Jul 2009 08:29:48
Message: <4a4f4b3c$1@news.povray.org>
Thanks both of you, either solution works to give the expexted
effect. Simply setting extinction to 0 is rather elegant as it
makes it simple to fill arbitrary shapes with media-based dust
without worrying where to place random particles.

Of course, it is physically completely impossible ;) Tim's
solution is probably closer to the real thing, but actually
I don't think dust motes are really transparent - at home,
my dust unfortunately seems visible once landed :-P

I suppose individual particles or fibres are just too thin
to resolve at a distance, but reveal their presence when they
emit light. I tried to emulate this by making Tim's dust motes
have color rgb 1, scaling them down by a factor of 10 and using
insane aa settings afterwards (+a0.0 +am2 +r4), but only got
visible specks after faking the specular value up to 100.
Anyway its not really a feasible solution ;)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.