POV-Ray : Newsgroups : povray.binaries.images : Another Photon Bug? : Re: Another Photon Bug? Server Time
30 Jul 2024 06:20:55 EDT (-0400)
  Re: Another Photon Bug?  
From: James Holsenback
Date: 23 Sep 2012 20:24:02
Message: <505fa822$1@news.povray.org>
On 09/23/2012 06:59 PM, Ive wrote:
> Am 23.09.2012 19:18, schrieb James Holsenback:
>>
>> LOL ... never mind I found a way to do it (still some tweaking left) . I
>> made the pigment in the material srgbf 0.85 and put some colored
>> emission media in the interior ... not exactly intuitive (to me anyways)
>
> This is not a good idea. A gemstone does absorb light and not emit it.

Yes this was a fail ... and after I thought about it for a bit I thought 
the same thing.

> I've found this page with some spectral data for gemstones:
>
> http://www.octonus.com/oct/projects/adsorbtion_spectra.phtml
>
> and used this data to play a bit around with your stone. And after
> getting some strange effects I noticed that you have a coincident
> surface problem within the merge.

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

> This is exactly your gem shape but without coincident surface and it
> renders even a bit faster.
>
> #declare Gem = intersection {
>    #local ndx = 0;
>    #while ( ndx < 360 )
>      plane {-x, 0 rotate z*-55 translate x*-2.75 rotate y*ndx }
>      plane {-x, 0 rotate z*35  translate x*-2.75 rotate y*ndx }
>      #local ndx = ndx + 45;
>    #end
>    plane {y, 0 translate y*1}
> }

way more elegant ... thanks

> And I would use something like this for gems:
>
> #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
>
>
> Note that I do usually use 1cm = 1 POV-Unit and in this case
> fade_distance 1 works pretty well. You have scaled your gem much
> bigger so you have to adjust fade_distance to fit your scale.
>
>
> Attached is a quick lo-quality (90 seconds) preview render - not a
> spectral one - featuring your stone: from left to right emerald,
> sapphire and amethyst.
>
> -Ive

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


Post a reply to this message

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