POV-Ray : Newsgroups : povray.newusers : Strange behaviour with image map Server Time
31 Jul 2024 02:32:18 EDT (-0400)
  Strange behaviour with image map (Message 1 to 9 of 9)  
From: Steely
Subject: Strange behaviour with image map
Date: 19 May 2003 11:45:07
Message: <web.3ec8fb1051d9091d973298eb0@news.povray.org>
Hello to all!

I am experiencing a very strange behaviour placing an image map
on a sphere. This produces two questions in one: first, why the .gif for the
imape map behaves so strange? and second, why behaves the image map itself
so strange?

To better explain what the problem exactly looks like I have uploaded the
pictures and you can see them at

http://steeltown.piranho.com/robert.html

The first thing is that I have a gif-image with black background, set
to transparent with PicturePublisher. When I use the image as

take the same image with white background and set filter to white -
than it works.

The second thing is that i have set the image map "once", but it
appears two times on the surface. It *should* be only on the rear side (on
the neck) but as you can see it appears also on the left side.

The head itself is nothing special, a simple sphere with layered textures.
All the
other parts are #declare(d) or #include(d) objects and then put together in
a union.
// ---------------------------------------------
        sphere { 0.0, 0.2
                texture {
                        pigment {color SeaGreen}
                        finish{
                                diffuse 0.3
                                ambient 0.0
                                specular 0.6
                                reflection { 0.3 metallic }
                                conserve_energy
                                }
                        }
                texture { pigment{ image_map
                        {gif "triplerot.gif" once filter 0, 1.0 }}
                       scale 0.095 scale 1.5*x rotate 202.5*y rotate 50*x }
  rotate -120*y              }
// --------------------------------------------



am still a beginner I guess it is my code causing this. On the other
hand - I have done all exactly like described in the tutorial *and* it
is not my first image map, but the first time I get results like this.

Any comment or idea is welcome

Thanks

R.


Post a reply to this message

From: ABX
Subject: Re: Strange behaviour with image map
Date: 19 May 2003 11:53:02
Message: <i6vhcv0aa75bto1jhg9271q2n2f7sc1fs6@4ax.com>
On Mon, 19 May 2003 11:41:04 EDT, "Steely" <Rob### [at] hamburgde> wrote:

> The second thing is that i have set the image map "once", but it
> appears two times on the surface. It *should* be only on the rear side (on
> the neck) but as you can see it appears also on the left side.

For this problem - it appears once in xy surface. But it is contignous along z
axis. Other side of your sphere has the same xy coordinates but oposite z when
sphere is located at center of space.

ABX


Post a reply to this message

From: Steely
Subject: Re: Strange behaviour with image map
Date: 19 May 2003 18:50:06
Message: <web.3ec95ebb8d617b6c3563e3020@news.povray.org>
ABX wrote:
>
>For this problem - it appears once in xy surface. But it is contignous along z
>axis. Other side of your sphere has the same xy coordinates but oposite z when
>sphere is located at center of space.
>
>ABX

OK, I know that from placing an image map on a box, but - then (after


As the image goes through the object in +z-direction, the (x-z)-angle

degrees.

Am I right, or am I right ;-) ?

R.


Post a reply to this message

From: Hughes, B 
Subject: Re: Strange behaviour with image map
Date: 19 May 2003 22:13:53
Message: <3ec98f61$1@news.povray.org>
You never centered it. The image_map default, being planar, positions it
from <0,0,-~> to <1,1,+~> and I'm using tilde (~) here to say infinite. So I
guess what has happened there is that you are rotating it from the
lower-left corner which is also at the center of the sphere.

Bob Hughes


Post a reply to this message

From: Steely
Subject: Re: Strange behaviour with image map
Date: 20 May 2003 08:35:04
Message: <web.3eca1eb28d617b6c445663de0@news.povray.org>
Hughes, B. wrote:
>You never centered it. The image_map default, being planar, positions it
>from <0,0,-~> to <1,1,+~> and I'm using tilde (~) here to say infinite. So I
>guess what has happened there is that you are rotating it from the
>lower-left corner which is also at the center of the sphere.

Ok, have a bit patience with me, I try to understand that ...

I guess, you want me to do as following: translating the sphere +0.5, so
that not the sphere is centered, but the image will be centered over the
nose, it extends from the nose in both, -x and +x, directions. And really,

and rotating the image, I (seem to) have no control over the image,
especially when scaling it smaller than 0.5 it does not behave as expected.


have total control over the size and position of the image, but how ?

Thanks

R.


Post a reply to this message

From: ABX
Subject: Re: Strange behaviour with image map
Date: 20 May 2003 08:53:11
Message: <e29kcv02056246ka2kl74ann9oluanp5cp@4ax.com>
On Tue, 20 May 2003 08:30:24 EDT, "Steely" <Rob### [at] hamburgde> wrote:
> I think, although it´s not a box (planar) surface, there must be a way to
> have total control over the size and position of the image, but how ?

One of uv_mapping, map_type, warp{spherical ...} or all together.

ABX


Post a reply to this message

From: Steely
Subject: Re: Strange behaviour with image map
Date: 20 May 2003 20:20:02
Message: <web.3ecac3298d617b6caacd52b00@news.povray.org>
ABX wrote:
>On Tue, 20 May 2003 08:30:24 EDT, "Steely" <Rob### [at] hamburgde> wrote:
>> I think, although it´s not a box (planar) surface, there must be a way to
>> have total control over the size and position of the image, but how ?
>
>One of uv_mapping, map_type, warp{spherical ...} or all together.



1) when using uv_mapping, I got an error message saying "cannot layer over a
patterned texture" although the first texture is a simgle pigment ;-(

1a) when putting the image as first texture and the SeaGreen as second, i
get the SeaGreen and loose the image :-(

1b) as far I know I cannot change the layered texture and use a pigment map
instead, also, I cannot use a texture map because all this need float

so on, this means, I *have to* use a layered texture, right, too ?

2) map type will not work, because it wraps the image from "north pole to
south pole" as the documentation says, "regardless of any scaling"  - I
have tried it, the documentation is right :-(

3) warp will not work because it shows strange effects when scaling  - If I
were  able to explain that, maybe I would not need to ask in *newusers* ;-)

Would it be possible to be pointed to somebodys gallery who has done this
before with success or to get a single line of code that will show how it
works before I spend two more nights on this?

Thanks

R.


Post a reply to this message

From: ABX
Subject: Re: Strange behaviour with image map
Date: 22 May 2003 13:02:12
Message: <s90qcvsdvjrh1ame9ajvd2rvv21cvegilj@4ax.com>
On Tue, 20 May 2003 20:16:23 EDT, "Steely" <Rob### [at] hamburgde> wrote:
> 3) warp will not work because it shows strange effects when scaling  - If I
> were  able to explain that, maybe I would not need to ask in *newusers* ;-)

Perhaps you have applied transformations in wrong order. Open empty scene. Put
there Basic scene from scene templates. Replace last object (sphere) with:

sphere {
  0.0, 1
  texture {
    pigment {
      radial
      frequency 8
      color_map {
        [0.00 color rgb <1.0,0.4,0.2> ]
        [0.33 color rgb <0.2,0.4,1.0> ]
        [0.66 color rgb <0.4,1.0,0.2> ]
        [1.00 color rgb <1.0,0.4,0.2> ]
      }
    }
    finish{
      specular 0.6
    }
  }
  texture{
    pigment{
      image_map{png "povmap.png" once}
      translate -.5
      scale .1
      translate .5
      warp{spherical}
    }
    rotate y*270
  }
}

Do not worry about "povmap.png" image. It should be in 'include' search path.
This image appear only once and is done as layer with transparency, is
positioned in <0,0,0> <1,1,0> flat area and then mapped onto sphere with warp.
Helped ?

ABX


Post a reply to this message

From: Steely
Subject: Re: Strange behaviour with image map
Date: 22 May 2003 17:30:04
Message: <web.3ecd40128d617b6c7c0c4d510@news.povray.org>
ABX wrote:


>Helped ?

YES ! Fanstastic! This is it :-)

>Perhaps you have applied transformations in wrong order.

For sure I did. And still, I understand now *how* it works, but not exactly
*why* but anyway, you did the trick. Thanks. Aaand Thanks. Oh, and, ahm -
thank you ;-)

R.


Post a reply to this message

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