POV-Ray : Newsgroups : povray.general : mirrors nope, lenses nope, prisms yes? Server Time
25 Dec 2024 20:21:56 EST (-0500)
  mirrors nope, lenses nope, prisms yes? (Message 1 to 5 of 5)  
From: peyrol
Subject: mirrors nope, lenses nope, prisms yes?
Date: 24 Jul 2016 18:40:00
Message: <web.5795430a1512cf9f91c886080@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?


Post a reply to this message

From: Bald Eagle
Subject: Re: mirrors nope, lenses nope, prisms yes?
Date: 24 Jul 2016 19:05:00
Message: <web.57954955a2b08755e7df57c0@news.povray.org>
search for povray refraction - images, and you'll likely come up with plenty of
scenes people have done.

Some should even be in the "include" directory that comes with POV-Ray.

You can do reflection, refraction, filtering, transmission, absorption, emission
and any other number of very cool things.


https://www.youtube.com/watch?v=xjMjWtntm9k


Post a reply to this message

From: clipka
Subject: Re: mirrors nope, lenses nope, prisms yes?
Date: 24 Jul 2016 19:18:12
Message: <57954cb4$1@news.povray.org>
Am 25.07.2016 um 00:36 schrieb peyrol:
> 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:
...
> 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:
...
> 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?

There are two different things involved here:

(1) The scene as /viewed/ through a prism or in a mirror: Backwards
raytracing, as used by POV-Ray, does model this properly. As for prisms
and lenses, POV-Ray also models dispersion. This is what the Mint repo
is talking about.

(2) The /illumination/ of the scene by light refracted through a prism
or reflected in a mirror: Backwards raytracing does /not/ model this;
you need forward raytracing for this. This is what the FAQ is referring
to. POV-Ray does provide a mechanism called Photon Mapping, which embeds
a forward raytracing algorithm in an otherwise backward raytracing
engine, and therefore can model such effects; however, this mechanism is
not active by default, and needs some extra statements in the scene to
enable it.


Post a reply to this message

From: Alain
Subject: Re: mirrors nope, lenses nope, prisms yes?
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

From: peyrol
Subject: Re: mirrors nope, lenses nope, prisms yes?
Date: 30 Jul 2016 06:20:01
Message: <web.579c7ee6a2b087591c886080@news.povray.org>
I appreciate everyone's responses! I made a video of a board game, which has
nothing to do with this topic, but I hope you enjoy it. Maybe it will bore you.
I'm just trying to give back a little. Yes I posted this in binaries.animations

https://www.youtube.com/watch?v=ckj3rrtuf6I


Post a reply to this message

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