POV-Ray : Newsgroups : povray.general : image mapping Server Time
13 Aug 2024 03:15:23 EDT (-0400)
  image mapping (Message 1 to 3 of 3)  
From: Dov Plawsky
Subject: image mapping
Date: 28 Oct 1998 15:03:10
Message: <363779A8.326@voyager.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.

		Thanks,

			Dov


Post a reply to this message

From: Spock
Subject: Re: image mapping
Date: 28 Oct 1998 19:37:54
Message: <3637b8e2.0@news.povray.org>
I stole this from somebody else and deleted his name... sorry.

Dov Plawsky wrote in message <363### [at] voyagernet>...
>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.
>
> Thanks,
>
> Dov


Post a reply to this message


Attachments:
Download 'Bottle.inc.txt' (4 KB) Download 'Bottle.pov.txt' (1 KB) Download 'Label.gif' (28 KB)

Preview of image 'Label.gif'
Label.gif


 

From: Dan Connelly
Subject: Re: image mapping
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.