| |
 |
|
|
Science Forum Index » Optics Forum » backward ray tracing
Page 1 of 2 Goto page 1, 2 Next
|
| Author |
Message |
| surface2air |
Posted: Thu Feb 21, 2008 6:32 am |
|
|
|
Guest
|
can any on explain what this phenomenon actually is and why its better
than forward ray tracing. |
|
|
| Back to top |
|
| Helpful person |
Posted: Thu Feb 21, 2008 6:53 am |
|
|
|
Joined: 22 Jun 2004
Posts: 692
|
On Feb 21, 11:32 am, surface2air <johnnas...@gmail.com> wrote:
Quote: can any on explain what this phenomenon actually is and why its better
than forward ray tracing.
In analyzing and designing an optical system one should always (if
possible) trace rays towards the short conjugate. This gives better
accuracy in the calculations. (This is easily seen in Zemax which
seems very prone to giving inaccurate answers.) |
|
|
| Back to top |
|
| Helpful person |
Posted: Thu Feb 21, 2008 8:10 am |
|
|
|
Joined: 22 Jun 2004
Posts: 692
|
On Feb 21, 12:04 pm, Phil Hobbs
Quote: Interesting. For a straight calculation, with no backward error
propagation, I can see that...the incidence angles are smaller and the
propagation distance from the first surface is shorter when you're going
towards the short conjugate, both of which will tend to reduce the
error. Actual ray tracing is so small a task compared with running a
GUI, though, that I'm amazed that every code doesn't have some sort of
forward-backward algorithm to fix this problem. Matrix solvers use
'iterative improvement' to do much the same thing.
Cheers,
Phil Hobbs
There was definately an accuracy problem in the old days of double
precision ForTran programs. However, although this should not still
be the case I have found it to be so. |
|
|
| Back to top |
|
| Boxman |
Posted: Thu Feb 21, 2008 8:43 am |
|
|
|
Guest
|
On Feb 21, 10:32 am, surface2air <johnnas...@gmail.com> wrote:
Quote: can any on explain what this phenomenon actually is and why its better
than forward ray tracing.
If you are referring to it from a computer graphics perspective,
backward ray tracing is a technique where rays are launched from the
viewer into the scene and the intersections with objects and light
sources is tracked to determine what the eye can see. This way only
rays that are known to enter the eye will be traced.
When you use forward ray tracing, you initiate rays from the light
source and then trace it through the scene. Not every ray from the
light source will make it into a view camera, in fact very few will
actually make it into the view camera so you will need to trace
hundreds of millions of rays to get enough information into the camera
using this technique.
Forward ray tracing has the advantage of theoretically being able to
accurately capture any optical phenomenon like scattering, color
shifting, and caustics. Backward ray tracing can't necessarily handle
these things well if at all. Backward ray tracings advantage is it's
speed and efficiency. You get a good enough image very quickly. |
|
|
| Back to top |
|
| Boxman |
Posted: Thu Feb 21, 2008 9:24 am |
|
|
|
Guest
|
On Feb 21, 12:52 pm, Phil Hobbs <p...@SpamMeSenseless.pergamos.net>
wrote:
Quote: Boxman wrote:
On Feb 21, 10:32 am, surface2air <johnnas...@gmail.com> wrote:
can any on explain what this phenomenon actually is and why its better
than forward ray tracing.
If you are referring to it from a computer graphics perspective,
backward ray tracing is a technique where rays are launched from the
viewer into the scene and the intersections with objects and light
sources is tracked to determine what the eye can see. This way only
rays that are known to enter the eye will be traced.
When you use forward ray tracing, you initiate rays from the light
source and then trace it through the scene. Not every ray from the
light source will make it into a view camera, in fact very few will
actually make it into the view camera so you will need to trace
hundreds of millions of rays to get enough information into the camera
using this technique.
Forward ray tracing has the advantage of theoretically being able to
accurately capture any optical phenomenon like scattering, color
shifting, and caustics. Backward ray tracing can't necessarily handle
these things well if at all. Backward ray tracings advantage is it's
speed and efficiency. You get a good enough image very quickly.
Okay, since we've done the OP's homework for him: Since ray tracing is
time reversal invariant, including scattering and thin film effects, why
doesn't backward ray tracing accurately render the visual image of a
caustic or a colour shift?
Cheers,
Phil Hobbs- Hide quoted text -
- Show quoted text -
The problem becomes more of how much sampling do you want to do.
Backward ray tracing is supposed to limit this by making some
assumptions.
If you picture a scenario where a ray is traced from the view camera,
through a pixel into a scene and it first encounters a scattering
surface that has some non lambertian BRDF. Then you must decide how
to continue that ray in a way that models the physical reality. If
you ignore the BRDF (not physical, but computationally efficient) you
don't get the scatter effect, If you use a satistical method to pick a
ray direction based on the BRDF you might get some idea of the actual
scatter, or if you want to be realistic, then you must propogate a
very large number of rays from there to model the BRDF in reverse to
make sure I can know which light sources may have scattered rays from
that surface into my pixel. But that defeats the efficiency of a
backward ray trace. The same would be true of surfaces that have
spectral BRDF's that cause color shifting.
The other problem that comes to mind, but I'm not sure is relevant
here, is that a scattering surface doesn't necessarily have helmholtz
reciprocity (I think that's the right term), so bringing a ray in from
one direction (backwards) could result in different scattering profile
than from the other direction. So a backward ray launched through a
pixel onto the scatter surface that is then observed to hit a light
source may not result from a similar ray impinging on the surface in
the forward direction. In other words if I send in a collimated beam
to a diffuse surface and get an f 2.0 diverging cone of light from
that surface, I usually don't get a collimated beam out if I send in
an f2.0 converging cone to that same point on the surface. (or maybe
I'm thinking wrong here). |
|
|
| Back to top |
|
| Helpful person |
Posted: Thu Feb 21, 2008 10:45 am |
|
|
|
Joined: 22 Jun 2004
Posts: 692
|
On Feb 21, 1:52 pm, Phil Hobbs
Quote:
Okay, since we've done the OP's homework for him: Since ray tracing is
time reversal invariant, including scattering and thin film effects, why
doesn't backward ray tracing accurately render the visual image of a
caustic or a colour shift?
Cheers,
Phil Hobbs- Hide quoted text -
I believe that thin films with absorbing (metal) layers are not the
same if reversed. |
|
|
| Back to top |
|
| Helpful person |
Posted: Thu Feb 21, 2008 10:49 am |
|
|
|
Joined: 22 Jun 2004
Posts: 692
|
On Feb 21, 2:24 pm, Boxman <box...@voyager.net> wrote:
Quote: On Feb 21, 12:52 pm, Phil Hobbs <p...@SpamMeSenseless.pergamos.net
wrote:
Boxman wrote:
On Feb 21, 10:32 am, surface2air <johnnas...@gmail.com> wrote:
can any on explain what this phenomenon actually is and why its better
than forward ray tracing.
If you are referring to it from a computer graphics perspective,
backward ray tracing is a technique where rays are launched from the
viewer into the scene and the intersections with objects and light
sources is tracked to determine what the eye can see. This way only
rays that are known to enter the eye will be traced.
When you use forward ray tracing, you initiate rays from the light
source and then trace it through the scene. Not every ray from the
light source will make it into a view camera, in fact very few will
actually make it into the view camera so you will need to trace
hundreds of millions of rays to get enough information into the camera
using this technique.
Forward ray tracing has the advantage of theoretically being able to
accurately capture any optical phenomenon like scattering, color
shifting, and caustics. Backward ray tracing can't necessarily handle
these things well if at all. Backward ray tracings advantage is it's
speed and efficiency. You get a good enough image very quickly.
Okay, since we've done the OP's homework for him: Since ray tracing is
time reversal invariant, including scattering and thin film effects, why
doesn't backward ray tracing accurately render the visual image of a
caustic or a colour shift?
Cheers,
Phil Hobbs- Hide quoted text -
- Show quoted text -
The problem becomes more of how much sampling do you want to do.
Backward ray tracing is supposed to limit this by making some
assumptions.
If you picture a scenario where a ray is traced from the view camera,
through a pixel into a scene and it first encounters a scattering
surface that has some non lambertian BRDF. Then you must decide how
to continue that ray in a way that models the physical reality. If
you ignore the BRDF (not physical, but computationally efficient) you
don't get the scatter effect, If you use a satistical method to pick a
ray direction based on the BRDF you might get some idea of the actual
scatter, or if you want to be realistic, then you must propogate a
very large number of rays from there to model the BRDF in reverse to
make sure I can know which light sources may have scattered rays from
that surface into my pixel. But that defeats the efficiency of a
backward ray trace. The same would be true of surfaces that have
spectral BRDF's that cause color shifting.
The other problem that comes to mind, but I'm not sure is relevant
here, is that a scattering surface doesn't necessarily have helmholtz
reciprocity (I think that's the right term), so bringing a ray in from
one direction (backwards) could result in different scattering profile
than from the other direction. So a backward ray launched through a
pixel onto the scatter surface that is then observed to hit a light
source may not result from a similar ray impinging on the surface in
the forward direction. In other words if I send in a collimated beam
to a diffuse surface and get an f 2.0 diverging cone of light from
that surface, I usually don't get a collimated beam out if I send in
an f2.0 converging cone to that same point on the surface. (or maybe
I'm thinking wrong here).- Hide quoted text -
- Show quoted text -
You are describing the specialized analysis determining stray light.
However, if the modeling is correct, I believe that there is still no
difference in the result if you trace from object to image or image to
object. In each case the rays you are tracing start at the object and
finish at the image (or vice versa). |
|
|
| Back to top |
|
| Phil Hobbs |
Posted: Thu Feb 21, 2008 12:56 pm |
|
|
|
Guest
|
surface2air wrote:
Quote: can any on explain what this phenomenon actually is and why its better
than forward ray tracing.
It's just what it sounds like. Ray propagation is an abstraction of
Maxwell's equations in the short-wavelength limit, and Maxwell's
equations are symmetrical with respect to time reversal.
As to when and if it's better, you need to re-read your textbook.
Cheers,
Phil Hobbs |
|
|
| Back to top |
|
| Phil Hobbs |
Posted: Thu Feb 21, 2008 1:04 pm |
|
|
|
Guest
|
Helpful person wrote:
Quote: On Feb 21, 11:32 am, surface2air <johnnas...@gmail.com> wrote:
can any on explain what this phenomenon actually is and why its better
than forward ray tracing.
In analyzing and designing an optical system one should always (if
possible) trace rays towards the short conjugate. This gives better
accuracy in the calculations. (This is easily seen in Zemax which
seems very prone to giving inaccurate answers.)
Interesting. For a straight calculation, with no backward error
propagation, I can see that...the incidence angles are smaller and the
propagation distance from the first surface is shorter when you're going
towards the short conjugate, both of which will tend to reduce the
error. Actual ray tracing is so small a task compared with running a
GUI, though, that I'm amazed that every code doesn't have some sort of
forward-backward algorithm to fix this problem. Matrix solvers use
'iterative improvement' to do much the same thing.
Cheers,
Phil Hobbs |
|
|
| Back to top |
|
| Phil Hobbs |
Posted: Thu Feb 21, 2008 2:52 pm |
|
|
|
Guest
|
Boxman wrote:
Quote: On Feb 21, 10:32 am, surface2air <johnnas...@gmail.com> wrote:
can any on explain what this phenomenon actually is and why its better
than forward ray tracing.
If you are referring to it from a computer graphics perspective,
backward ray tracing is a technique where rays are launched from the
viewer into the scene and the intersections with objects and light
sources is tracked to determine what the eye can see. This way only
rays that are known to enter the eye will be traced.
When you use forward ray tracing, you initiate rays from the light
source and then trace it through the scene. Not every ray from the
light source will make it into a view camera, in fact very few will
actually make it into the view camera so you will need to trace
hundreds of millions of rays to get enough information into the camera
using this technique.
Forward ray tracing has the advantage of theoretically being able to
accurately capture any optical phenomenon like scattering, color
shifting, and caustics. Backward ray tracing can't necessarily handle
these things well if at all. Backward ray tracings advantage is it's
speed and efficiency. You get a good enough image very quickly.
Okay, since we've done the OP's homework for him: Since ray tracing is
time reversal invariant, including scattering and thin film effects, why
doesn't backward ray tracing accurately render the visual image of a
caustic or a colour shift?
Cheers,
Phil Hobbs |
|
|
| Back to top |
|
| AES |
Posted: Thu Feb 21, 2008 4:37 pm |
|
|
|
Guest
|
In article <47BDAD4D.3060800@SpamMeSenseless.pergamos.net>,
Phil Hobbs <pcdh@SpamMeSenseless.pergamos.net> wrote:
Quote:
It's just what it sounds like. Ray propagation is an abstraction of
Maxwell's equations in the short-wavelength limit, and Maxwell's
equations are symmetrical with respect to time reversal.
Except that linear gain (e.g., laser gain) has to be turned into linear
loss, and v.v., on time reversal -- which can make for some interesting
and even controversial discussions when one or both are present. |
|
|
| Back to top |
|
| Phil Hobbs |
Posted: Thu Feb 21, 2008 8:31 pm |
|
|
|
Guest
|
Helpful person wrote:
Quote: On Feb 21, 1:52 pm, Phil Hobbs
Okay, since we've done the OP's homework for him: Since ray tracing is
time reversal invariant, including scattering and thin film effects, why
doesn't backward ray tracing accurately render the visual image of a
caustic or a colour shift?
Cheers,
Phil Hobbs- Hide quoted text -
I believe that thin films with absorbing (metal) layers are not the
same if reversed.
As Prof. S. pointed out, you have to replace loss with gain when you do
the time reversal.
Cheers,
Phil Hobbs |
|
|
| Back to top |
|
| Skywise |
Posted: Fri Feb 22, 2008 1:18 am |
|
|
|
Guest
|
Phil Hobbs <pcdh@SpamMeSenseless.pergamos.net> wrote in
news:47BDC86B.4050502@SpamMeSenseless.pergamos.net:
Quote: Okay, since we've done the OP's homework for him: Since ray tracing is
time reversal invariant, including scattering and thin film effects, why
doesn't backward ray tracing accurately render the visual image of a
caustic or a colour shift?
I am a rank amateur at ray-traced graphics, but I can answer this
with a simple example.
Imagine a simple scene of a camera looking at a flat surface with
two glass objects on it. Obviously, in reality, we know that both
objects would cast caustics on the surface.
The problem in backwards ray-tracing (from camera to scene) is that
when you trace a ray from the camera to the table and want to
compute the effect of the caustic, how do you know where it came
from?
In POVRay, the software I've been playing with for years, caustics
used to be simulated and were confined to being within the shadow
of the object.
Now, real caustics can be computed. The software first does a
relatively low resolution forward trace from the light source,
through the object casting the caustic, and onto any surfaces it
then encounters. This information is stored and used to modify the
results of the backward rays later on. Now, when we trace the above
example ray to the surface, there is information about the result
of the caustics. Due to the resolution of the forward ray image,
the result may be interpolated.
This technique can be utilized to simulate quite realistic scenery.
I myself once made a rotating diamond animation that was just
stunning. All the sparkles, reflections, color refraction, caustics,
etc... were calculated with amazing reality.
The price you pay is that the more realistic you want the caustics
there's an exponential cost in CPU time.
Brian
--
http://www.skywise711.com - Lasers, Seismology, Astronomy, Skepticism
Seismic FAQ: http://www.skywise711.com/SeismicFAQ/SeismicFAQ.html
Quake "predictions": http://www.skywise711.com/quakes/EQDB/index.html
Sed quis custodiet ipsos Custodes? |
|
|
| Back to top |
|
| Skywise |
Posted: Fri Feb 22, 2008 1:18 am |
|
|
|
Guest
|
|
| Back to top |
|
| Skywise |
Posted: Fri Feb 22, 2008 1:18 am |
|
|
|
Guest
|
AES <siegman@stanford.edu> wrote in news:siegman-3D4262.12372321022008
@nntp.stanford.edu:
Quote: In article <47BDAD4D.3060800@SpamMeSenseless.pergamos.net>,
Phil Hobbs <pcdh@SpamMeSenseless.pergamos.net> wrote:
It's just what it sounds like. Ray propagation is an abstraction of
Maxwell's equations in the short-wavelength limit, and Maxwell's
equations are symmetrical with respect to time reversal.
Except that linear gain (e.g., laser gain) has to be turned into linear
loss, and v.v., on time reversal -- which can make for some interesting
and even controversial discussions when one or both are present.
Entropy?
Brian
--
http://www.skywise711.com - Lasers, Seismology, Astronomy, Skepticism
Seismic FAQ: http://www.skywise711.com/SeismicFAQ/SeismicFAQ.html
Quake "predictions": http://www.skywise711.com/quakes/EQDB/index.html
Sed quis custodiet ipsos Custodes? |
|
|
| Back to top |
|
| |
Page 1 of 2 Goto page 1, 2 Next
All times are GMT - 5 Hours
The time now is Sun Sep 07, 2008 3:25 am
|
|