 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
image map and set filter to black - POVRay doesnīt do it. When I
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 }
// --------------------------------------------
I donīt understand neither the first nor the second effect, and as I
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Mon, 19 May 2003 11:41:04 EDT, "Steely" <Rob### [at] hamburg de> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
rotating it) the logo should appear on the headīs front side instead of the
left, shouldnīt it?
As the image goes through the object in +z-direction, the (x-z)-angle
between both logos should be 180 degrees, but itīs only about 90-100
degrees.
Am I right, or am I right ;-) ?
R.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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,
the logo on the headīs left side disappears then, but also, with scaling
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.
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 ?
Thanks
R.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 20 May 2003 08:30:24 EDT, "Steely" <Rob### [at] hamburg de> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
ABX wrote:
>On Tue, 20 May 2003 08:30:24 EDT, "Steely" <Rob### [at] hamburg de> 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.
..... doesnīt work for this reasons:
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
values I cannot use, right? Also, the SDL doesnīt know layered pigments and
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 20 May 2003 20:16:23 EDT, "Steely" <Rob### [at] hamburg de> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |