POV-Ray : Newsgroups : povray.general : Label on a Jar Server Time
6 Nov 2024 10:26:02 EST (-0500)
  Label on a Jar (Message 1 to 8 of 8)  
From: Andrew Wilcox
Subject: Label on a Jar
Date: 2 Sep 2002 17:25:00
Message: <3d73d72c$1@news.povray.org>
I'm adding an image map to a glass cylinder as a label on a jar.  The label
however does not wrap around the entire jar.  It's very small.  If I use
cylindrical mapping, it warps the small label around the entire jar, and I'm
not sure how to unwarp it back to proper size.  If I use planar mapping, I
get a label on both sides of the jar, since the planer extends in the z
direction infinitely.

What are my options here?  Am I missing something?

Andrew Wilcox


Post a reply to this message

From: Warp
Subject: Re: Label on a Jar
Date: 2 Sep 2002 18:06:15
Message: <3d73e0d6@news.povray.org>
Try something like this:

  pigment
  { image_map { jpeg "label.jpg" once interpolate 2 }
    scale <.2,1,1>
    warp { cylindrical }
  }


-- 
#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: Ib Rasmussen
Subject: Re: Label on a Jar
Date: 2 Sep 2002 18:12:21
Message: <3D73E22B.9030603@ibras.dk>
> If I use planar mapping, I
> get a label on both sides of the jar, since the planer extends in the z
> direction infinitely.
> 
> What are my options here?  Am I missing something?


Make the label as a separate object, eg as a difference of two cylinders 
intersected with a box, and put that on the jar.

/Ib


Post a reply to this message

From: MIKA
Subject: Re: Label on a Jar
Date: 2 Sep 2002 18:35:48
Message: <Xns927DBC99CACCMIKAJustMeInc@204.213.191.226>
"Andrew Wilcox" <pov### [at] unpuzzledcom> wrote in
news:3d73d72c$1@news.povray.org: 

> I'm adding an image map to a glass cylinder as a label on a jar.  The
> label however does not wrap around the entire jar.  It's very small. 
> If I use cylindrical mapping, it warps the small label around the
> entire jar, and I'm not sure how to unwarp it back to proper size.  If
> I use planar mapping, I get a label on both sides of the jar, since
> the planer extends in the z direction infinitely.
> 
> What are my options here?  Am I missing something?
> 
> Andrew Wilcox
> 
> 
> 

Just imagine that your jar label is part of a bigger transparent label.

when designing your jar label, design it on a larger image of which is
completely filled with the color (lets say index 0 of your bit-mapped
image palette) and use the following in your image_map declaration
(filter 0,1) 

Marc


Post a reply to this message

From: Warp
Subject: Re: Label on a Jar
Date: 2 Sep 2002 19:06:12
Message: <3d73eee4@news.povray.org>
Ib Rasmussen <ib### [at] ibrasdk> wrote:
> Make the label as a separate object, eg as a difference of two cylinders 
> intersected with a box, and put that on the jar.

  That is probably a lot slower to render than my suggestion.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Warp
Subject: Re: Label on a Jar
Date: 2 Sep 2002 19:07:02
Message: <3d73ef15@news.povray.org>
MIKA <nos### [at] pleasecom> wrote:
> when designing your jar label, design it on a larger image of which is
> completely filled with the color (lets say index 0 of your bit-mapped
> image palette) and use the following in your image_map declaration
> (filter 0,1) 

  Why waste memory needlessly, when you can get the same effect with a
simple scale and cylindrical warp?

-- 
#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: Andrew Wilcox
Subject: Re: Label on a Jar
Date: 3 Sep 2002 00:27:21
Message: <3d743a29@news.povray.org>
Yes, this worked great.

texture {
    pigment {
        image_map {
            png "AlienLabel2.png"
            once
            interpolate 2
        }
         scale <1/(2*pi*jarRad),1/2,1> // My image happens to be half as
tall as wide thus the 1/2
         scale 1/3
          warp { cylindrical }
          rotate -y*40
    }
}

Thanks Warp!


"Warp" <war### [at] tagpovrayorg> wrote in message
news:3d73e0d6@news.povray.org...
>   Try something like this:
>
>   pigment
>   { image_map { jpeg "label.jpg" once interpolate 2 }
>     scale <.2,1,1>
>     warp { cylindrical }
>   }
>
>
> --
> #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: JRG
Subject: Re: Label on a Jar
Date: 5 Sep 2002 16:42:42
Message: <3d77c1c2$1@news.povray.org>
"Warp" wrote:
>   Try something like this:
>
>   pigment
>   { image_map { jpeg "label.jpg" once interpolate 2 }
>     scale <.2,1,1>
>     warp { cylindrical }
>   }

Hey! Smart... never thought about it... I've always used very large image maps...

--
Jonathan.


Post a reply to this message

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