POV-Ray : Newsgroups : povray.binaries.images : Another Photon Bug? : Re: Another Photon Bug? Server Time
30 Jul 2024 06:29:45 EDT (-0400)
  Re: Another Photon Bug?  
From: Ive
Date: 24 Sep 2012 00:21:28
Message: <505fdfc8@news.povray.org>
Am 24.09.2012 02:24, schrieb James Holsenback:

> Yes it left a visible line shadow on the ground plane ... thought merge
> would have gotten rid of coincident surface ( where the two cones met
> before difference ) but obviously not ... hmmm
>
Well, merge gets rid of *internal* surfaces but in this case, depending 
on viewing angle and floating point inaccuracy, it is not clear if a ray 
has left one surface and then enters the other or if the objects 
actually get merged.


>> #macro M_Gem (Color, IOR, FadeDist)
>>    material {
>>      texture {
>>        pigment {rgb Color filter 1}
>>        finish {
>>          ambient 0  emission 0  diffuse 0
>>          reflection {0 1 fresnel on} conserve_energy
>>        }
>>      }
>>      interior {
>>        ior IOR
>>        fade_power 1001
>>        fade_distance FadeDist
>>        fade_power rgb < pow(Color.red,3),
>>                         pow(Color.green,3)
>>                         pow(Color.blue,3) >
>>      }
>>    }
>>
>> #end
>>

Err, sorry, this was out of my head and has the usual bugs. It should be 
like this:

#macro M_Gem (Color, IOR, FadeDist)
    material {
      texture {
        pigment {Color filter 1}
        finish {
          ambient 0  emission 0  diffuse 0
           reflection {0 1 fresnel on} conserve_energy
        }
      }
      interior {
        ior IOR
        fade_power 1001
        fade_distance FadeDist
        fade_color rgb < pow(Color.red,3),
                         pow(Color.green,3)
                         pow(Color.blue,3) >
      }
    }
#end

Hopefully this time I've got it right ;)

And BTW the rgb (not srgb !!! because the power of 3 would give wrong 
results) values I did use for the picture are

Emerald:  rgb < 0.7276, 0.9320, 0.8543>
Sapphire: rgb <-0.0044, 0.3702, 0.7609>
Amethyst: rgb < 0.8981, 0.8441, 0.8972>

and are calculated from the absorption spectral data. And yes, the red 
components for the Sapphire is negative, it is an out-of-gamut value.

> Wow ... thanks for the macro and all the advise. I really appreciate it!

Glad to be of help and again, sorry for the errors in the macro.

-Ive


Post a reply to this message

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