|
![](/i/fill.gif) |
Alain nous apporta ses lumieres en ce 2007/10/16 11:57:
> inhahe nous apporta ses lumieres en ce 2007/10/16 05:18:
>> I'm not an advanced user of POVRay, but I thought only advanced users
>> would
>> be knowledgeable enough to answer my question.
>>
>> i want to do refraction where colors are separated, like in the prism
>> effect. afaik the feature that does this is photon mapping. but from a
>> little bit of reading I get the impression that photon mapping would only
>> project colors onto surfaces, not onto the camera. so, e.g. if i
>> created a
>> diamond i wouldn't see it shine with various colors.
>>
>> but i had an idea. let's say I create a white surface, with a
>> lens-shaped
>> refracting object in front of it, and put a black box around it except
>> for
>> the lens, like a camera. then i point this contraption toward the
>> diamond
>> or whatever, and put the povray camera inside the contraption pointing
>> toward the white surface. then of course when the image is rendered I
>> flip
>> it horizontally and vertically.
> Overkill.
>>
>> will this work?
> Maybe.
>> is it necessary?
> NO!
>>
>>
> Whenever you add dispersion you get coloured difraction. If the camera
> see, directly or not, the dispersing object, you'll see the colours. You
> don't need photons for that. Photons will make the caustics that hit
> some surface coloured also.
> To see the colours, you need an interior block like:
>
> interior{ior 2.5 dispersion 1.2}
>
> Here,the default dispersion_samples of 7 is unualy enough.
> Diamond's ior is about 2.5 and it have a relatively strong dispersion,
> over done here.
> If the diamond is "free floating", that's all you need.
> If the diamond is resting on something, and you want to see the effect
> on that surface, THEN you need photons:
>
> object{Diamond interior{ior 2.5 dispersion 1.1 dispersion_samples
> 15}photons{target refraction on difraction on collect off}}
>
> A larger number of dispersion samples is needed to get smooth coloured
> caustics unless very close to the diamond.
> You don't need to add a photons block to the light_source, nor to the
> surface.
>
I forgot, you should add:
finish{specular 0.8 roughness 0.0001} or the light won't cause any highlight.
Very small roughness value due to the diamond's very hard and smooth surface.
--
Alain
-------------------------------------------------
Why do psychics have to ask you for your name?
Post a reply to this message
|
![](/i/fill.gif) |