POV-Ray : Newsgroups : povray.bugreports : Interpolation on map_type 1 Server Time
28 Mar 2024 15:53:29 EDT (-0400)
  Interpolation on map_type 1 (Message 1 to 8 of 8)  
From: IGM
Subject: Interpolation on map_type 1
Date: 14 Sep 2015 09:00:01
Message: <web.55f6c3a73a8beda3a04efe9d0@news.povray.org>
Hi all,
I noticed that when I use interpolation (both 2 or 4) with map_type 1, the
interpolation algorithm mixes the values of the top and bottom edges of the
image (that should be two completely different points). In the following script,
the "test.bmp" is a simple bitmap with top half white and bottom half black. If
you deactivate the interpolation option, the spheres are rendered correctly,
while if you activate interpolation the white half sphere shows a small black
spot in the center, and the black half sphere shows a small white spot in the
center. In the script I render two spheres to see the effect on top and bottom
simultaneously.

In my opinion, the algorithm should avoid the mixing between top and bottom
edges of the image.

Thanks,
igmar

------------------------

// Camera ########################
camera {
    location <1, .8, -7>
    look_at 0
    angle 50
}

// Ambient ########################
plane { y, -1.5 pigment { rgb 0.5*<.5,1,.8> } }

background {  .7*<1,1,1> }

light_source { <0, 2, 0>, color rgb 1*<1, 1, 1> shadowless }

// image_map texture ########################
#declare texmap = texture {
        pigment {
             image_map {
                bmp "test.bmp"
                map_type 1
                //interpolate 2
                filter all .2
        }
    }
}


// Objects ########################
sphere {
    <0,0,0>, 1
    texture {texmap}
    rotate -x*210
    hollow
    translate -x*1
}

sphere {
    <0,0,0>, 1
    texture {texmap}
    rotate -x*50
    hollow
    translate x*1
}


Post a reply to this message

From: Cousin Ricky
Subject: Re: Interpolation on map_type 1
Date: 14 Sep 2015 17:30:01
Message: <web.55f73b2e8fefd3b117f16dc30@news.povray.org>
"IGM" <iar### [at] gmailcom> wrote:
>                 bmp "test.bmp"

This is new!  The bmp keyword does not work in POV-Ray 3.6.  It works in 3.7,
but doesn't seem to be documented anywhere.  Does it work on all platforms?  My
3.7 installation is POV-Ray for Unix, self-compiled on a GNU/Linux box, and bmp
works there.  IIRC, my 3.6 installation was pre-compiled.  (I haven't used .BMP
since I ditched Windblows nearly 4 years ago, but I used the sys keyword back
then.)


Post a reply to this message

From: clipka
Subject: Re: Interpolation on map_type 1
Date: 15 Sep 2015 01:47:12
Message: <55f7b0e0@news.povray.org>
Am 14.09.2015 um 14:58 schrieb IGM:
> Hi all,
> I noticed that when I use interpolation (both 2 or 4) with map_type 1, the
> interpolation algorithm mixes the values of the top and bottom edges of the
> image (that should be two completely different points). In the following script,
> the "test.bmp" is a simple bitmap with top half white and bottom half black. If
> you deactivate the interpolation option, the spheres are rendered correctly,
> while if you activate interpolation the white half sphere shows a small black
> spot in the center, and the black half sphere shows a small white spot in the
> center. In the script I render two spheres to see the effect on top and bottom
> simultaneously.
> 
> In my opinion, the algorithm should avoid the mixing between top and bottom
> edges of the image.

Did you try with the "once" keyword?

Otherwise POV-Ray presumes that the image is tileable, and interpolates
accordingly.

In POV-Ray, interpolation and mapping are entirely independent of each
other.


Post a reply to this message

From: IGM
Subject: Re: Interpolation on map_type 1
Date: 15 Sep 2015 03:20:00
Message: <web.55f7c5be8fefd3b1776fc67d0@news.povray.org>
Oh, the once keywords works!!
I didn't try it before as the Documentation (2.5.12.7.2 The map_type Option)
states "A map_type 1 [...] The once keyword has no meaning for this mapping
type."

Thank you!
igmar


Post a reply to this message

From: Cousin Ricky
Subject: Re: Interpolation on map_type 1
Date: 15 Sep 2015 08:40:01
Message: <web.55f811308fefd3b117f16dc30@news.povray.org>
"IGM" <iar### [at] gmailcom> wrote:
> Oh, the once keywords works!!
> I didn't try it before as the Documentation (2.5.12.7.2 The map_type Option)
> states "A map_type 1 [...] The once keyword has no meaning for this mapping
> type."

The documentation is evidently wrong.

Incidentally, the section number you cite is from the POV-Ray 3.6 documentation.
 On my system, the bmp keyword does not work in 3.6.  This would imply that, at
least for 3.6, there is a difference between platforms.


Post a reply to this message

From: Le Forgeron
Subject: Re: Interpolation on map_type 1
Date: 15 Sep 2015 11:49:54
Message: <55f83e22@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Le 15/09/2015 14:38, Cousin Ricky a écrit :
> "IGM" <iar### [at] gmailcom> wrote:
>> Oh, the once keywords works!! I didn't try it before as the
>> Documentation (2.5.12.7.2 The map_type Option) states "A map_type
>> 1 [...] The once keyword has no meaning for this mapping type."
> 
> The documentation is evidently wrong.
> 
> Incidentally, the section number you cite is from the POV-Ray 3.6
> documentation. On my system, the bmp keyword does not work in 3.6.
> This would imply that, at least for 3.6, there is a difference
> between platforms.
> 

yes, bmp was the system image for the windows port. (and png was the
one for unix). a nightmare for portability of settings.

And for reading, only a small subset of the bmp is supported (not all
of the compressions, not all the depths, and only rgb (no cmyk))

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iJwEAQEIAAYFAlX4PiEACgkQhKAm8mTpkW3fkAP+O0VfLQPY1iuLK/DzLoVDmDQq
kQx7PTHXyHhhEpTpNbPmrDqKDxYK9GBrV5E9E5w6HKIJbJKnqaA6HIYUaAequeCu
lcjDQwJgPhCoiHI08PP0PjbXFxno7Re9XyIWYNVeo0JPlE5UJQayrZaCanpXgxxK
Bc9/uR4Skphtg37NgkU=
=z44q
-----END PGP SIGNATURE-----


Post a reply to this message

From: Cousin Ricky
Subject: Re: Interpolation on map_type 1
Date: 15 Sep 2015 17:55:00
Message: <web.55f892898fefd3b1db6413070@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> yes, bmp was the system image for the windows port. (and png was the
> one for unix). a nightmare for portability of settings.

Having a bmp keyword across all platforms doesn't sound like a bad idea.  Not
that I've had any use for them since I started using 3.7 beta four years ago.
(Prior to 3.7, the easiest way for me to create a JPEG was to render to .BMP and
convert from there.)  But .BMP images are all over (even occasionally in p.b.i,
although the POVer who posts it promptly gets a tongue lashing), regardless of
which computer you use.


Post a reply to this message

From: Le Forgeron
Subject: Re: Interpolation on map_type 1
Date: 16 Sep 2015 01:01:40
Message: <55f8f7b4$1@news.povray.org>
Le 15/09/2015 23:50, Cousin Ricky a écrit :
> Le_Forgeron <jgr### [at] freefr> wrote:
>> yes, bmp was the system image for the windows port. (and png was the
>> one for unix). a nightmare for portability of settings.
>
> Having a bmp keyword across all platforms doesn't sound like a bad idea.  Not
> that I've had any use for them since I started using 3.7 beta four years ago.
> (Prior to 3.7, the easiest way for me to create a JPEG was to render to .BMP and
> convert from there.)  But .BMP images are all over (even occasionally in p.b.i,
> although the POVer who posts it promptly gets a tongue lashing), regardless of
> which computer you use.

bmp keyword is ok, it was the "sys" keyword that was problematic.


Post a reply to this message

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