POV-Ray : Newsgroups : povray.general : mirrors nope, lenses nope, prisms yes? : Re: mirrors nope, lenses nope, prisms yes? Server Time
29 Apr 2024 11:48:36 EDT (-0400)
  Re: mirrors nope, lenses nope, prisms yes?  
From: Alain
Date: 25 Jul 2016 16:39:27
Message: <579678ff$1@news.povray.org>

> In the FAQ is the question "Why doesn't my mirror reflect light? Why won't my
> lens focus light?" and the answer has to do with backwards ray tracing versus
> forwards ray tracing. Here's a quote:
>
> "Because reflecting and refracting light (also called caustics) is not so
> important as getting the scene rendered (even wihtout them), backward raytracing
> is used. Then you just have to live with the fact that light does not reflect
> from the mirror."
>
> My OS is Linux Mint 18, which finally includes POVray in its repositories. Here
> is a quote from the blurb I read in my Software Manager:
>
> "POV-Ray is a full-featured ray tracer. Ray tracers simulate objects and light
> sources of the real world to calculate photorealistic, computer generated
> images. Because of the nature of ray tracing, this process is quite
> CPU-intensive, at the benefit of more realistic images compared to real time
> rendering techniques. For example, in POV-Ray, you can model a glass prism, and
> you will see a spectrum in the resulting image."
>
> Prisms. That would be refraction, yes? Which the FAQ says does not work. Is this
> blurb correct in what it says? How can prisms make a spectrum if mirrors don't
> reflect light from light sources?
>
>
>
>

Refraction and dispersion are correctly rendered when you see through 
the object as long as that object is transparent and have an interior 
statement that provide the ior and dispersion for that object.
Sample interior block for some glass like substance:
interior{ ior 1.5 dispersion 1.01 }

If you want to see accurate caustics, you need to enable photons mapping.
This is done by adding a photons{} block in the global_settings of your 
scene.
Minimal global_settings photons blocks:
photons{spacing 0.01} // shoot photons 0.01 unit apart.
photons{count 4e6} // attempt to shoot about 4 millions photons
You need to use spacing OR count, not both.

Next, you need to designate witch objects need to directly interact with 
those photons. This is done by a photons block added to the definition 
of the objects. It looks like this:

photons{
  target //tell to shoot photons at this object
  refraction on // set the object to refract transmitted photons
  reflection on // allow the object to reflect photons
}

When secondary photons encounter a reflective surface, they reflect, and 
get refracted when going through refractive objects. Those objects don't 
need any photons block.

It should be noted that there is a caustics options, but it's only a 
very crude attempt at rendering caustics. It only depend on the 
curvature of the surface and is totally independent from the ior and 
distance. It also can't account for reflected light or refracted light 
that falls outside the shadowed area under the object. It can gives 
acceptable results when you want to simulate the caustics on the bottom 
of a pool or something similar.


Alain


Post a reply to this message

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