POV-Ray : Newsgroups : povray.newusers : image map Server Time
4 Sep 2024 22:19:55 EDT (-0400)
  image map (Message 1 to 10 of 17)  
Goto Latest 10 Messages Next 7 Messages >>>
From: ulli
Subject: image map
Date: 12 Jun 2002 20:13:02
Message: <3D07E392.6060702@gmx.de>
hi,
iv got another problem with my beer bottle. the labels are should only 
be once on the bottle, but they are each twice (horizontal)

texture {
       pigment {rgbf <0.3, 0.13, 0.075, 1.35>    }       }

      texture { pigment {
    image_map { png "beer2.png"
                        once
                        interpolate 2

          }}

             translate <-0.5+a,0.1+b,c>
             scale <4/10,6.2/10,4/10> }
      interior { ior 1.5 }
      texture {beero}
       translate < a, b , c >
       finish {
         ambient 0.5
         diffuse 0.35
         brilliance 0.5
         specular 0.1
         roughness 0.000009
         reflection { 0.48  fresnel}
         conserve_energy}


Post a reply to this message

From: bob h
Subject: Re: image map
Date: 13 Jun 2002 00:23:58
Message: <3d081e5e@news.povray.org>
"ulli" <ull### [at] gmxde> wrote in message news:3D0### [at] gmxde...
> iv got another problem with my beer bottle. the labels are should only
> be once on the bottle, but they are each twice (horizontal)

Yes, because the default (planar type) mapping is infinitely thick. You
would need to either use map_type 2 (cylindrical) instead or slice the
bottle in half vertically then apply the image map texture to one half and
leave other half without it (for example, but whatever way you want to go
about that). Obviously cylindrical mapping is easiest, you just need to
compensate for it in the image used to wrap it, leaving plenty of blank
space.  pi * height, for the dimensions.

bob h


Post a reply to this message

From: ulli
Subject: Re: image map
Date: 15 Jun 2002 07:25:37
Message: <3D0B2438.50104@gmx.de>
Obviously cylindrical mapping is easiest, you just need to
> compensate for it in the image used to wrap it, leaving plenty of blank
> space.  pi * height, for the dimensions.
> 
> bob h
> 
> 
> 

pi*height for dimensions???
could you explain this? *g*
i know what pi is, but which height for which dimension?


Post a reply to this message

From: Simon Adameit
Subject: Re: image map
Date: 15 Jun 2002 07:32:56
Message: <3d0b25e8@news.povray.org>
bob h wrote:
> Obviously cylindrical mapping is easiest, you just need to
> compensate for it in the image used to wrap it, leaving plenty of blank
> space.  pi * height, for the dimensions.
>
Why should he compensate in the image and not scale it in POV?


Post a reply to this message

From: ulli
Subject: Re: image map
Date: 15 Jun 2002 08:05:05
Message: <3D0B2D7B.1010402@gmx.de>
Simon Adameit wrote:
> bob h wrote:
> 
   pi * height, for the dimensions.
>>
> 
> Why should he compensate in the image and not scale it in POV?
> 

would i have to try it out, or can i calculate it??


Post a reply to this message

From: ulli
Subject: Re: image map
Date: 15 Jun 2002 11:11:30
Message: <3D0B592D.4070107@gmx.de>
http://www.winter-privat.de/bottle.jpg
this is how it looks with cylindrical map type and wider label (the 
bottom label)
"jagdherren pils" is written on the label


Post a reply to this message

From: TinCanMan
Subject: Re: image map
Date: 15 Jun 2002 14:11:25
Message: <3d0b834d$1@news.povray.org>
"Simon Adameit" <gom### [at] gmxde> wrote in message
news:3d0b25e8@news.povray.org...
>
> bob h wrote:
> > Obviously cylindrical mapping is easiest, you just need to
> > compensate for it in the image used to wrap it, leaving plenty of blank
> > space.  pi * height, for the dimensions.
> >
> Why should he compensate in the image and not scale it in POV?

Cylidrical image_maps take the entire image and fits the height to 1 POV
unit in the y axis and wraps the texture once around the y axis.  You can
then scale it in the y direction but (without using a different method) the
image can't be scaled around the y-axis.  In order to get the label to wrap
partially around the bottle (unless you want it fully wrapped) you have to
compensate in the image_map image itself.

-tgq


Post a reply to this message

From: Warp
Subject: Re: image map
Date: 15 Jun 2002 16:24:24
Message: <3d0ba278@news.povray.org>
TinCanMan <Tin### [at] hotmailcom> wrote:
> In order to get the label to wrap
> partially around the bottle (unless you want it fully wrapped) you have to
> compensate in the image_map image itself.

  This is quite an ugly method because you either need to make an extra-large
image, which will consume unneeded memory, or you'll have to use a lower
resolution. Not nice.
  Instead of this, make a pigment with your image_map (using the 'once'
option), scale it down to the desired size and then apply the cylindrical
warp to it.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: ulli
Subject: Re: image map
Date: 15 Jun 2002 17:26:39
Message: <3D0BB11A.70100@gmx.de>
i really dont know what im doing wrong, but the labe always get 
strectched on the left/rigth edge (http://www.winter-privat.de/bottle2.jpg)
this one is with pigment map for the lower label


Post a reply to this message

From: bob h
Subject: Re: image map (cylindrical warping?)
Date: 15 Jun 2002 21:42:57
Message: <3d0bed21@news.povray.org>
"ulli" <ull### [at] gmxde> wrote in message news:3D0### [at] gmxde...
> i really dont know what im doing wrong, but the labe always get
> strectched on the left/rigth edge
(http://www.winter-privat.de/bottle2.jpg)
> this one is with pigment map for the lower label

Coming back late on this. I am not much on using 'warp', expecially the new
types, so all I could do is:


camera {
  location  <1,3,-5>
  right     x*image_width/image_height
  look_at   <0,2,0>
}

light_source {
  <-30, 30, -30>,
  color rgb 1
}

plane {
  y, -0.001
  texture {
    pigment { checker color rgb <1,1,0> color rgb <0,1,0> }
  }
}

cylinder {
  0, 2*y, 1
  texture {
    pigment {
      image_map {
        png "testlabel.png" // I used 300 by 300 res. for this
        interpolate 2
        once
        filter 255, 2/3 // set a pallete index to filtered value
      }
      warp {
        cylindrical
        orientation z
        dist_exp 0
        }
      rotate -90*y
      scale <1,2,1>
    }
  }
 scale <1,2,1>
}

This wraps around like map_type 2 in image_map but I couldn't get the effect
Warp mentioned. I scaled and changed dist_exp only to get a distorted label,
apparently similar to your outcome, ulli.
Either I misunderstood or I didn't hit upon the correct transformation.

bob h


Post a reply to this message

Goto Latest 10 Messages Next 7 Messages >>>

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