![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Warp
Subject: Re: A different approach to blurred reflection (PNG, 80kbu)
Date: 19 Oct 2001 15:23:19
Message: <3bd07da7@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
JRG <jrg### [at] hotmail com> wrote:
: The objects have no_reflection and the sphere is reflecting a bigger version
: of the scene with focal_blur? (does it make any sense?)
You are very, very close, but still not the correct answer.
Note that using focal blur would have smoothed at least some of the jagged
lines, no matter how long the area of sharpness is.
However your idea could work quite well. You could test that.
I'll post the answer to the problem to this thread as a separate article.
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Warp
Subject: The answer (Was: A different approach to blurred reflection (PNG, 80kbu))
Date: 19 Oct 2001 15:42:53
Message: <3bd0823b@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I used a technique pretty common in scanline-rendering for "faking" fast
reflections: Environment mapping.
In environment mapping a spherical view of the scene from the point of view
of the object is first created and then, when the object is rendered, its
surface color is blended with the environment map with an algorithm pretty
similar to raytracing (the environment map acts like a sky_sphere and "rays"
are reflected from the surface of the object to this sky sphere; of course
no real "rays" need to be shot, but just calculate the point where the
"reflected ray" would hit the sky sphere and take the proper color from the
environment map).
Environment mapping works well only if the other objects in the scene are
far enough from the object. If there are objects too close, they will be
distorted in unnatural ways in the "reflection" (as can be seen for example
in the reflected checkered floor in my image).
Also environment mapping in scanline rendering doesn't work well with
self-reflecting objects nor mutually reflecting objects (but it *does* work
in raytracing!).
(A variant of this is to use cube mapping, which is basically the same thing,
but the "sky sphere" is a cube instead. The advantage of this is that the
environment map is much easier to calculate by scanline rendering.)
What I did was to make a 2-frames animation: The first frame creates the
environment map using the spherical camera and focal blur (as many guessed).
(Of course focal blur doesn't work with the spherical camera in the current
POV-Ray, as I have reported in p.b-t, so I had to fix it before I could make
this image.) The camera was located in the center of the sphere and the
sphere just had a no_image specified to it (it had to be there for the
shadow).
The second frame of this "animation" loads the first frame and puts it
as a sky_sphere (I could do this because the sky is not seen directly in the
image). All the other objects now get the no_reflection tag so that the sphere
will reflect the sky_sphere instead.
And that's it.
(If you wonder if this environment map trick would work with other objects
than just a sphere, the answer is yes. As I said before, this is a pretty
common technique used in scanline-rendering to add "reflections" to any
object. It's just that all the other objects have to be far enough for it
to look good.)
And here is the first frame of the animation, ie. the environment map:
Post a reply to this message
Attachments:
Download 'envmap.png' (114 KB)
Preview of image 'envmap.png'
![envmap.png](/povray.binaries.images/attachment/%3C3bd0823b%40news.povray.org%3E/envmap.png?preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Slime
Subject: Re: The answer (Was: A different approach to blurred reflection (PNG, 80kbu))
Date: 19 Oct 2001 16:31:00
Message: <3bd08d84$1@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Interesting idea. The major flaw being, it seems, that the reflection isn't
coming from the point where the ray from the camera intersected the sphere;
rather, it's always coming from the center of the sphere. Which is a good
enough approximation, I assume, if the reflected objects are far enough away
from the sphere that the diference isn't noticeable.
But does focal blur blur objects the same amount at the same distance that
regular reflection blur would do?
- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]
"Warp" <war### [at] tag povray org> wrote in message
news:3bd0823b@news.povray.org...
> I used a technique pretty common in scanline-rendering for "faking" fast
> reflections: Environment mapping.
> In environment mapping a spherical view of the scene from the point of
view
> of the object is first created and then, when the object is rendered, its
> surface color is blended with the environment map with an algorithm pretty
> similar to raytracing (the environment map acts like a sky_sphere and
"rays"
> are reflected from the surface of the object to this sky sphere; of course
> no real "rays" need to be shot, but just calculate the point where the
> "reflected ray" would hit the sky sphere and take the proper color from
the
> environment map).
> Environment mapping works well only if the other objects in the scene
are
> far enough from the object. If there are objects too close, they will be
> distorted in unnatural ways in the "reflection" (as can be seen for
example
> in the reflected checkered floor in my image).
> Also environment mapping in scanline rendering doesn't work well with
> self-reflecting objects nor mutually reflecting objects (but it *does*
work
> in raytracing!).
> (A variant of this is to use cube mapping, which is basically the same
thing,
> but the "sky sphere" is a cube instead. The advantage of this is that the
> environment map is much easier to calculate by scanline rendering.)
>
> What I did was to make a 2-frames animation: The first frame creates the
> environment map using the spherical camera and focal blur (as many
guessed).
> (Of course focal blur doesn't work with the spherical camera in the
current
> POV-Ray, as I have reported in p.b-t, so I had to fix it before I could
make
> this image.) The camera was located in the center of the sphere and the
> sphere just had a no_image specified to it (it had to be there for the
> shadow).
> The second frame of this "animation" loads the first frame and puts it
> as a sky_sphere (I could do this because the sky is not seen directly in
the
> image). All the other objects now get the no_reflection tag so that the
sphere
> will reflect the sky_sphere instead.
> And that's it.
> (If you wonder if this environment map trick would work with other
objects
> than just a sphere, the answer is yes. As I said before, this is a pretty
> common technique used in scanline-rendering to add "reflections" to any
> object. It's just that all the other objects have to be far enough for it
> to look good.)
>
> And here is the first frame of the animation, ie. the environment map:
>
>
----------------------------------------------------------------------------
----
>
>
> --
> #macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
> rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
> ],13),8)-3,10>#end blob{N(array[6]{11117333955,
> 7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Trevor Quayle
Subject: Re: The answer (Was: A different approach to blurred reflection (PNG, 80kbu))
Date: 19 Oct 2001 16:45:11
Message: <3bd090d7$1@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I thought maybe something like that, until you said it wasn't an image map.
-tgq
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Christoph Hormann
Subject: Re: The answer (Was: A different approach to blurred reflection (PNG, 80kbu))
Date: 19 Oct 2001 17:00:57
Message: <3BD094A1.A042397A@gmx.de>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
>
> I used a technique pretty common in scanline-rendering for "faking" fast
> reflections: Environment mapping.
> [...]
About what i said, just somehow the other way round... ;-)
Christoph
--
Christoph Hormann <chr### [at] gmx de>
IsoWood include, radiosity tutorial, TransSkin and other
things on: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: David Fontaine
Subject: Re: The answer (Was: A different approach to blurred reflection (PNG, 80kbu))
Date: 20 Oct 2001 00:14:33
Message: <3BD0FAE6.8CD16B09@faricy.net>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
>
> What I did was to make a 2-frames animation: The first frame creates the
> environment map using the spherical camera and focal blur (as many guessed).
But, in a way, doesn't focal blur include aa?
--
David Fontaine <dav### [at] faricy net> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Ron Parker
Subject: Re: The answer (Was: A different approach to blurred reflection (PNG, 80kbu))
Date: 20 Oct 2001 00:34:51
Message: <slrn9t1veu.ipl.ron.parker@fwi.com>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 19 Oct 2001 15:42:53 -0400, Warp wrote:
> The second frame of this "animation" loads the first frame and puts it
>as a sky_sphere (I could do this because the sky is not seen directly in the
>image). All the other objects now get the no_reflection tag so that the sphere
>will reflect the sky_sphere instead.
Couldn't you just use the first frame as a pigment for the sphere?
--
#local R=rgb 99;#local P=R-R;#local F=pigment{gradient x}box{0,1pigment{gradient
y pigment_map{[.5F pigment_map{[.3R][.3F color_map{[.15red 99][.15P]}rotate z*45
translate x]}]#local H=pigment{gradient y color_map{[.5P][.5R]}scale 1/3}[.5F
pigment_map{[.3R][.3H][.7H][.7R]}]}}}camera{location.5-3*z}//only my opinions
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Trevor Quayle <Tin### [at] hotmail com> wrote:
: I thought maybe something like that, until you said it wasn't an image map.
I said that it wasn't an image map applied to the sphere and the sphere
is truely reflective and has just a pigment { rgb <1,.8,.6> }.
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Christoph Hormann <chr### [at] gmx de> wrote:
: About what i said, just somehow the other way round... ;-)
Yes, but the image map is not applied to the sphere (if you apply the image
map to the sphere, it doesn't look nothing like a reflection anymore).
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Ron Parker <ron### [at] povray org> wrote:
: Couldn't you just use the first frame as a pigment for the sphere?
Nope. If I did, then it wouldn't "reflect" its surroundings, but the
surroundings would be projected on the surface of the sphere, which is a
completely different thing (and looks like that).
Also it would not work with any other object than the sphere. As I said,
the environment mapping technique works with other shapes as well.
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |