POV-Ray : Newsgroups : povray.general : image mapping : Re: image mapping Server Time
13 Aug 2024 05:48:53 EDT (-0400)
  Re: image mapping  
From: Dan Connelly
Date: 28 Oct 1998 20:00:56
Message: <3637BE46.66E3D1D3@flash.net>
> Hi all,
> 
>         I am trying to create a bottle with a label on it, using an image map
> for the label.  But I don't know how to create the label. Any
> suggestions would be greatly appreciated.

Here's a rough summary -- it isn't a polished tutorial,
nor is it the unique solution.....

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

For a bottle with a label of height H and radius R and resolution r,
make an image of width 2 pi r R H and height r H .  Use "8-bit color".

Fill it with a "transparent" color -- color index 0 is a good choice.

Paint the bottle label using your paint program of choice.... the
image will wrap all the way around the bottle, so you'll want
to only use a fraction of the area, if you don't want the label
to wrap all the way around as well.

example : L = label; blank = transparent index; |_ = image border
 __________________________
|LLLLLLLL                  |
|LLLLLLLL                  |
|LLLLLLLL                  |
|LLLLLLLL__________________|

Don't use the transparent index in the label -- for example, if color index
0 is your transparent color and is set to white, and you want white, 
use white in a different color index.

Define the object at the origin, aligned with the y axis.

Apply it as an image map : use cylindrical mapping and set the
transparency of the transparent color index. Use the "once" keyword
and don't forget "interpolate 2". 

Scale the texture as desired.

Rotate the texture as desired.

Translate the texture along the y axis.

Rotate the object about x, y, and z axes to the desired orientation.

Translate the object as desired.

-- 
http://www.flash.net/~djconnel/


Post a reply to this message

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