POV-Ray : Newsgroups : povray.general : Dirty water and flouresence Server Time
23 Dec 2024 13:09:01 EST (-0500)
  Dirty water and flouresence (Message 1 to 7 of 7)  
From: Iodine
Subject: Dirty water and flouresence
Date: 27 Jul 2018 12:05:01
Message: <web.5b5b4207d8fa8f922d17ef5e0@news.povray.org>
I would like to ask if anyone has ever considered how to make a texture for a
droplet of dirty water.

If we consider for a moment a glass or a water, then it will have a refractive
index, also the medium will have an ability to adsorb light. The adsorption of
light can be expressed with ease in real life using the equation

Log (I / I0) = A = El

Where I is the intensity of light leaving the object on a given path, Io was the
light which would be leaving the object on that path if no adsroption was to
occur. While E is a constant while l is the length of the path through the
object.

I would like to also have water which is cloudy and to assume that a photon of
light for each unit of distance it travels forwards in the medium has a
probaility that it changes direction randomly. I think that this would allow me
to simulate milky water.

Finally I would like the option of being able to make the water flouresent, I
reason that if a photon of light passes through a given distance in the medium
then it should have a given probability of both changing colour and direction.


Post a reply to this message

From: Bald Eagle
Subject: Re: Dirty water and flouresence
Date: 27 Jul 2018 12:25:01
Message: <web.5b5b46cc6d9eb180c437ac910@news.povray.org>
"Iodine" <nomail@nomail> wrote:

I think if you look at the features of "media" - you'll get something that will
very closely simulate the Beer-Lambert Law.

> Finally I would like the option of being able to make the water flouresent,

That will be pure simulation.   You can probably write a function to vary the
emission value of the texture based upon the amount of incoming light.

POV-Ray doesn't handle light as wavelengths.


Post a reply to this message

From: Iodine
Subject: Re: Dirty water and flouresence
Date: 27 Jul 2018 12:25:01
Message: <web.5b5b46dc6d9eb1802d17ef5e0@news.povray.org>
Sorry I should have posted this POVray code, what I want the dirty water for is
to improve on this image. This is a simulation of a X-ray image of a series of
objects. Here is my code for viewing what you would see on the screen of the
X-ray machine. If you change the camera location to 10, 14, 0 then you can see
the objects viewed with the light without the screen.

  #include "colors.inc"
  #include "textures.inc"
#declare Floor_Texture     = texture {
                            pigment {color rgb <1,1,1> }
                            finish { diffuse 0.6,0.3 } }
camera {      #declare Object_Texture = texture {Green_Glass}
    location  <0, -14, 0>
    look_at   <0, 0, 0>
    angle 48
  }


light_source { < 0.0, 9.0,   0.0 >
      color red 1.20 green 1.20 blue 1.20 }
  plane {
    y, -1
    texture { Floor_Texture }
    }
  torus {
    1.5, 0.5
    texture { Object_Texture }
    rotate <0, 150, 0>
    translate <-2, 1, 0>
  }
  cone {
    <0,1,0>, 0, <0,0,0>, 1
    texture { Object_Texture }
    scale <1, 3, 1>
    translate <1, 1, 2>
  }
  sphere {
    <0,1,0>,1
    texture { Object_Texture }
    translate <1.5, 0, -2>
  }
  sphere {
    <0,1,0>,0.2
    texture { Object_Texture }
    translate <0.25, 0, -3>
  }


Post a reply to this message

From: clipka
Subject: Re: Dirty water and flouresence
Date: 27 Jul 2018 16:12:41
Message: <5b5b7cb9$1@news.povray.org>
Am 27.07.2018 um 18:22 schrieb Bald Eagle:
> "Iodine" <nomail@nomail> wrote:
> 
> I think if you look at the features of "media" - you'll get something that will
> very closely simulate the Beer-Lambert Law.
> 
>> Finally I would like the option of being able to make the water flouresent,
> 
> That will be pure simulation.   You can probably write a function to vary the
> emission value of the texture based upon the amount of incoming light.
> 
> POV-Ray doesn't handle light as wavelengths.

I guess it should be possible to assign a light group to the media
container.

Alternatively you could make sure that the incoming light has a non-zero
brightness for all three colour channels, and crank up the scattering
media colour to unrealistically bright values.


Post a reply to this message

From: clipka
Subject: Re: Dirty water and flouresence
Date: 27 Jul 2018 16:24:31
Message: <5b5b7f7f$1@news.povray.org>
Am 27.07.2018 um 18:02 schrieb Iodine:
> I would like to ask if anyone has ever considered how to make a texture for a
> droplet of dirty water.
> 
> If we consider for a moment a glass or a water, then it will have a refractive
> index, also the medium will have an ability to adsorb light. The adsorption of
> light can be expressed with ease in real life using the equation
> 
> Log (I / I0) = A = El
> 
> Where I is the intensity of light leaving the object on a given path, Io was the
> light which would be leaving the object on that path if no adsroption was to
> occur. While E is a constant while l is the length of the path through the
> object.

That's how POV-Ray's "media" feature works, and if the average number of
scattering/absorption events per photon is significantly smaller than 1
(i.e. cases where you can still see through the fluid) it gives pretty
good results.

If the medium is supposed to be uniform and absorption is dominant,
there's also a faster mechanismus, referred to as distance-based
attenuation; search for keywords `fade_distance` and `fade_power` (in
the context of interior; the same keywords also occur in the context of
light sources, but that's something different).


For materials where the expected number of scattering/absorption events
per photon is significantly higher than 1 (i.e. cases where you cannot
see through the fluid), the subsurface light transport feature probably
gives the most realistic results.


Post a reply to this message

From: Bald Eagle
Subject: Re: Dirty water and flouresence
Date: 27 Jul 2018 19:25:01
Message: <web.5b5ba9af6d9eb180458c7afe0@news.povray.org>
"Iodine" <nomail@nomail> wrote:
> Sorry I should have posted this POVray code, what I want the dirty water for is
> to improve on this image. This is a simulation of a X-ray image of a series of
> objects. Here is my code for viewing what you would see on the screen of the
> X-ray machine. If you change the camera location to 10, 14, 0 then you can see
> the objects viewed with the light without the screen.

So, as often happens, we've dived into the middle of things, somewhere between
what you want done and what you've tried in an effort to accomplish that goal.

I would say, from past experience, that the best thing to do at this juncture is
for you to as completely and as accurately as possible describe the final,
finished, end product.

Then list off a variety of thing you think might get you there, including, but
not limited to, what you're doing now and what you're asking about.

Are you looking for an x-ray-ish effect, or are you looking to scientifically,
accurately, replicate in POV-Ray the process by which an emulsion-film
radiograph is produced?

I'd say that maybe a very quick and easy way to get the effect is with an
orthographic camera, a parallel light source, a matte finish, and a y-gradient
from 0 to 1 with some transmit in the pigment.  Then apply a little bit of focal
blurring.

If that's satisfying, you may want to add a smoky-glass or polypropylene film
sheet as an overlay or backdrop or encasing thin sheet to give the "film" look.


Post a reply to this message

From: Alain
Subject: Re: Dirty water and flouresence
Date: 27 Jul 2018 20:43:59
Message: <5b5bbc4f$1@news.povray.org>
Le 18-07-27 à 16:12, clipka a écrit :
> Am 27.07.2018 um 18:22 schrieb Bald Eagle:
>> "Iodine" <nomail@nomail> wrote:
>>
>> I think if you look at the features of "media" - you'll get something that will
>> very closely simulate the Beer-Lambert Law.
>>
>>> Finally I would like the option of being able to make the water flouresent,
>>
>> That will be pure simulation.   You can probably write a function to vary the
>> emission value of the texture based upon the amount of incoming light.
>>
>> POV-Ray doesn't handle light as wavelengths.
> 
> I guess it should be possible to assign a light group to the media
> container.
> 
> Alternatively you could make sure that the incoming light has a non-zero
> brightness for all three colour channels, and crank up the scattering
> media colour to unrealistically bright values.
> 

Something like :
incoming light : rgb<0.01, 0.01, 1> //blue light
and, the media : scattering with rgb<300, 300, 0.01>
That media will glow yellow :)


Post a reply to this message

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