|
![](/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) |