POV-Ray : Newsgroups : povray.general : Bug or feature? : Bug or feature? Server Time
6 Aug 2024 14:24:37 EDT (-0400)
  Bug or feature?  
From: Timon Christl
Date: 7 Mar 2002 14:28:46
Message: <3c87bf6e$1@news.povray.org>
Many popular 3D games use skyboxes to simulate a sky. A skybox is simply
a very large box containing the entire world, textured with appropriate
bitmaps in such a way that the edges are (nearly) invisible.

When I tried this in POV-Ray I saw that the edges to not match seamlessly.
I investigated further and found that image_map interpolation behaves wrong.

Take the following scene:

camera {
  orthographic
  location <0.5,0.5,-1>
  right <1,0,0>
  up <0,1,0>
  look_at <0.5,0.5,0>
}

plane {
  -z,0
  texture {
    pigment {
      image_map {
        png "texture.png"
#if(clock>0)
        interpolate 2
#end
      }
    }
    finish {
      ambient 1
      diffuse 0
    }
  }
}

texture.png is a 8x8 pixel image with some colors in it, nothing special.
Use a simple black/white checker pattern and put a rectangle in red in
the middle to see it more clearly.

Render this with

+itest.pov +otest.png +fn +w256 +h256 +a0.1 +ki0 +kf1 +kfi0 +kff1

and see the difference between the two images. The interpolated version
shows a shifted texture image. I think it would be correct it the
interpolation would take the middle of each texel (texture bitmap pixel)
instead of a texel's corner.

Is this a bug or a feature?

-- 
Timon Christl <chr### [at] fmiuni-passaude>


Post a reply to this message

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