POV-Ray : Newsgroups : povray.general : Blurred reflection: cheat mode? Server Time
2 Aug 2024 06:20:05 EDT (-0400)
  Blurred reflection: cheat mode? (Message 1 to 7 of 7)  
From: Loki
Subject: Blurred reflection: cheat mode?
Date: 10 Jan 2005 10:15:01
Message: <web.41e29b62a68c029de43666cf0@news.povray.org>
I haven't tried this yet, it just occurred to me, so I was wondering if
anyone else has.  To get blurred reflections, is it possible to cheat by
rendering the scene using a spherical projection from the location of an
object, then blurring the image in photoshop or whatever, then mapping the
image back onto the object as a kind of 'env ball' reflection? (as done in
some other renderers.)  I'm not sure if it would work purely from a
geometrical point of view, but in some cases, like if the object itself is
very simple like a sphere, it might look OK and save a lot of micronormal
fiddling?  I thought of this while looking at the copper balls pic recently
posted.  It might save render time and a lot of fiddling - if it worked.

L
-


Post a reply to this message

From: ABX
Subject: Re: Blurred reflection: cheat mode?
Date: 10 Jan 2005 10:32:30
Message: <gu75u01uaj3mp3mov3jvh67ss1qopo21r7@4ax.com>
On Mon, 10 Jan 2005 10:12:34 EST, "Loki" <nomail@nomail> wrote:
> To get blurred reflections, is it possible to cheat by
> rendering the scene using a spherical projection from the location of an
> object, then blurring the image in photoshop or whatever, then mapping the
> image back onto the object as a kind of 'env ball' reflection?

http://www.ignorancia.org/tech_page.php?image=6&db=tips

ABX


Post a reply to this message

From: Marc Jacquier
Subject: Re: Blurred reflection: cheat mode?
Date: 10 Jan 2005 10:44:52
Message: <41e2a2f4@news.povray.org>

news:web.41e29b62a68c029de43666cf0@news.povray.org...
> I haven't tried this yet, it just occurred to me, so I was wondering if
> anyone else has.  To get blurred reflections, is it possible to cheat by
> rendering the scene using a spherical projection from the location of an
> object, then blurring the image in photoshop or whatever, then mapping the
> image back onto the object as a kind of 'env ball' reflection? (as done in
> some other renderers.)  I'm not sure if it would work purely from a
> geometrical point of view, but in some cases, like if the object itself is
> very simple like a sphere, it might look OK and save a lot of micronormal
> fiddling?  I thought of this while looking at the copper balls pic
recently
> posted.  It might save render time and a lot of fiddling - if it worked.
>
> L
Not sure it'd be realistic as, in real life, the blur depends on the
distance of the environment from the reflecting object.
Maybe  for your spherical map you could use a focal blur with focal point at
roughly the size of your reflecting object but you'd lose most of your trick
render time benefit.

Marc


Post a reply to this message

From: Warp
Subject: Re: Blurred reflection: cheat mode?
Date: 10 Jan 2005 11:09:45
Message: <41e2a8c9@news.povray.org>
Loki <nomail@nomail> wrote:
> I haven't tried this yet, it just occurred to me, so I was wondering if
> anyone else has.  To get blurred reflections, is it possible to cheat by
> rendering the scene using a spherical projection from the location of an
> object, then blurring the image in photoshop or whatever, then mapping the
> image back onto the object as a kind of 'env ball' reflection? (as done in
> some other renderers.)

  No, that doesn't work.

  What you are doing there is projecting the scene onto the surface of
the object. That's not a reflection, not even close.

  Simple case: Assume the object is a reflecting plane, like a mirror:
If you look it at a steep angle, eg. 20 degrees, you will see the
scene in front of you reflected in this mirror (there are probably
parts of the scene which you can see directly and reflected).
  However, think what happens if you just project the scene on the plane
like you suggested. It clearly doesn't work.

  It doesn't work correctly even if your reflecting object is more or
less spherical: You will still be just projecting the scene onto the
surface of the object. You will not see any scene which is farther
away from you than the object reflected on the surface of the object
(while with a truely reflecting object you would).
  Simple example: Think about a reflecting sphere on a checkered plane,
and think what happens if the camera is looking at the sphere right
from above: With correct reflections you will see parts of the plane
reflected on the sphere. With your suggestion you won't.

  What scanline-renderers do is not to project the environment map
onto the surface directly, but they take into account the normal
vector of the surface at the current point being rendered plus the
location of the camera, and using basically the same formula for
calculating the direction of the reflected ray in a raytracer, they
get the correspondent pixel from the environment map.
  In POV-Ray you can simulate this by putting the environment map
on the sky_sphere and making the object reflective.

  However, while this give a far more believable reflection, it isn't
perfect either: It assumes that the rest of the scene is infinitely
far away from the reflecting object. If there's any part of the
scene very close to the object, the reflection will not be correct
(the checkers on the plane with the reflected sphere is a good
example).

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

From: Christopher James Huff
Subject: Re: Blurred reflection: cheat mode?
Date: 10 Jan 2005 11:13:08
Message: <cjameshuff-834AD1.11131110012005@news.povray.org>
In article <41e2a2f4@news.povray.org>,
 "Marc Jacquier" <jac### [at] wanadoofr> wrote:

> Not sure it'd be realistic as, in real life, the blur depends on the
> distance of the environment from the reflecting object.

Not just for that reason, the geometry is wrong as well. It's especially 
bad when an object can reflect itself and when a surrounding object 
comes close to the mirroring surface.

I'm not sure how much time it'd gain, if any. You'd have to render the 
environment map from the point of view of the object at a resolution 
similar to what you'd get from reflected rays, except you would end up 
tracing rays in directions there aren't actually any reflections of. I 
suspect tracing the environment map will take as long or longer than 
just tracing reflected rays.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Sascha Ledinsky
Subject: Re: Blurred reflection: cheat mode?
Date: 10 Jan 2005 14:13:09
Message: <41e2d3c5@news.povray.org>
Christopher James Huff wrote:
 > ...I
 > suspect tracing the environment map will take as long or longer than
 > just tracing reflected rays.

You're right for stills, but the speedup could be quite significant for 
animations (if the environment map can be re-used). Tracing several rays 
for _blurred_ reflections is quite expensive...

Warp wrote:
 > What you are doing there is projecting the scene onto the surface of
 > the object. That's not a reflection, not even close.

Sure, but you can project it onto a large, invisible (no_image, 
no_reflection) sphere. Here's a short scene that does the trick:
Set renderEnvMap to true and save the image as "envmap.png" (It uses a 
spherical camera).
Then set renderEnvMap to false and useEnvMap to true, be sure to correct 
the path to the previously rendered image, change the filename (to not 
overwrite the image-map) and render it to see the effect. Set useEnvMap 
to false to compare it with true reflections.

You could use focal blur (while rendering the environment map) or 
postprocessing to blur the image map. Alternatively you can use a 
photograpy as enveronment map (I'd use a cube with six pictures instead 
of the sphere then).

As Warp pointed out, this is just a fake, but if there are no other 
objects too close to the reflecting object no one will notice it ;-)

#declare renderEnvMap = true;
#declare useEnvMap = false;

#if (!renderEnvMap)
         camera {
                 location <0,15,-20>
                 look_at <0,3,0>
                 angle 50
         }
#else
         camera {
                 spherical
                 angle 360 180
                 location <0,3,0>
                 look_at <0,3,1>
         }
#end

plane {
         y, 0
         pigment { checker rgb 1 rgb 0}
         finish { ambient 0 diffuse 1 }
         #if (useEnvMap) no_reflection #end
}

cylinder {
         <-7,0,-2>,<-7,6,-2>,2
         pigment { color rgb <1,0,0> }
         finish { ambient 0 diffuse 1 specular 1 roughness 0.05 }
         #if (useEnvMap) no_reflection #end
}

cone {
         <7,0,-2>,2,<7,6,-2>,0
         pigment { color rgb <0,0,1> }
         finish { ambient 0 diffuse 1 specular 1 roughness 0.05 }
         #if (useEnvMap) no_reflection #end
}

light_source { <-100,100,-100> color rgb 0.6 }
light_source { <100,10,-100> color rgb 0.3 }
light_source { <0,100,100> color rgb 0.9 }

#if (!renderEnvMap)
         sphere {
                 <0,3,0>,3
                 finish { specular 5 roughness 0.002 reflection 1 }
         }
#end

#if (useEnvMap)
         sphere {
                 <0,0,0>,1
                 no_image
                 no_shadow
                 pigment { image_map { png "f:/envmap.png" map_type 1 } 
rotate <0,-90,0> }
                 finish { ambient 1 }
                 scale 100
                 translate <0,3,0>
         }
#end


Post a reply to this message

From: Warp
Subject: Re: Blurred reflection: cheat mode?
Date: 10 Jan 2005 16:29:00
Message: <41e2f39c@news.povray.org>
Sascha Ledinsky <sas### [at] userssourceforgenet> wrote:
> Sure, but you can project it onto a large, invisible (no_image, 
> no_reflection) sphere.

  As I explained, this has the problem that it doesn't work correctly
for objects which are very close to the reflecting surface. The environment
mapping technique assumes the rest of the scene is infinitely away from
the reflecting object.

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

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