POV-Ray : Newsgroups : povray.beta-test : image_map sky spheres flaky : Re: image_map sky spheres flaky Server Time
30 Jul 2024 20:30:11 EDT (-0400)
  Re: image_map sky spheres flaky  
From: Batronyx
Date: 2 Oct 2001 23:35:55
Message: <3bba879b@news.povray.org>
"David Wallace" <dar### [at] earthlinknet> wrote in message
news:3BB9E6B5.83191D53@earthlink.net...
> This may well be a very old issue, but it bears repeating...
>
> I can't get good quality sky_spheres using image_maps.  If I scale them
> so that they repeat, I get a mirror effect if I look at certain angles
> (camera { location < -945,287.0 ,  184> look_at <  400, 58.6 ,  0.0>
> }).  I tried several translations to fix this; all proved futile.
>
> If I use map_type 1, the effect is very blotchy.  I even made a 4x4 tile
> of the original image in another program and combined that with
> interpolate 2 in the image_map:
>
> sky_sphere {
>  pigment {
>   #if (IsTest)
>    rgb <0.1, 0.3, 0.8>
>   #else
>    image_map { png "sky6a.png" map_type 1 interpolate 2 }
>    translate <0, -1, -1>
>    scale .2
>   #end
>  }
> }
>
> The result was still unsatisfactory.  Try it with a 960x960 png (smaller
> images show the problem even more) at 1280x1024.  Lowering the render
> resolution actually improves the sky_sphere, but at an obvious cost.
>
> The map_type 1 option in image_map ignores all other transformations.
> The problems I have had with it have led me to openly question this
> decision.  Simply allowing the frequency keyword here would save a lot
> of trouble.  'interpolate 2' can only do so much, usually around the
> edges of the pixel blocks.
>
> There are some who would call this a feature limitation and therefore
> beyond the scope of beta-test issues.  But if a limit on a feature makes
> that feature unsuitable for its intended purpose, the 'limit' becomes a
> 'bug', IMHO.
>

This is neither a bug nor a feature limitation. This is simple math. With a
960x960 image, and a default camera angle of 60 degrees, you are only ever
viewing
1/6 of the map or 160 pixels (horizontally) when they are stretched across
1280 pixels they will look blotchy. And yes, smaller image maps will look worse
because the stretching effect will be more pronounced. For exactly the same
reasons, smaller renders will produce less stretching.

There are however, a number of ways around the problem. For example, while image
maps don't support the frequency keyword, they can be mapped into a radial
pattern
that does. Another option: declare the image map as a planar map and pass the
appropriate parameters to a spherical_warp statement. This is the same as your
tiling solution without the overhead of an image tiled in a paint program.

You might also care to peruse the IRTC as I know there are at least two images
that recently used imaged mapped skies with fairly stunning results. Perhaps
comparing notes with their creators could lead to more satisfactory results for
you.


--
--
Batronyx ^"^
bat### [at] cadronhsacom //old & going away
bat### [at] alliancecablenet new & active now.
http://www.batronyx.com


Post a reply to this message

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