|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello,
I've been raytracing about 3 months and have been polishing my skills
with CSG construction.
What I'm trying to do is to place a label on my povray beer bottle...the
main body of the bottle is a cylinder so I tried using the image_map
command with map_type set to 2 (for cylinder mapping) and the once
option. I got the image to map onto the cylinder, but it stretched the
label all the way around ...so then i tried scaling the x-coordinate of
the image with no luck....so now I'm looking into creating my cylinder
with a lathe object to see if handles this situation differently..
If anyone has any suggestions as how I might get label to map properly
please let me know.
Best Regards,
Ron Hicks
www.geocities.com/SoHo/1006
sig### [at] hotmailcom
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
ron hicks wrote:
>
> Hello,
>
> I've been raytracing about 3 months and have been polishing my skills
> with CSG construction.
> What I'm trying to do is to place a label on my povray beer bottle...the
> main body of the bottle is a cylinder so I tried using the image_map
> command with map_type set to 2 (for cylinder mapping) and the once
> option. I got the image to map onto the cylinder, but it stretched the
> label all the way around ...so then i tried scaling the x-coordinate of
> the image with no luck....so now I'm looking into creating my cylinder
> with a lathe object to see if handles this situation differently..
> If anyone has any suggestions as how I might get label to map properly
> please let me know.
The trick is transparency. Create your beer label as a .png with an
alpha channel. Center the label in the image and create enough
transparent material around it to cover the back part of the bottle. If
you can't do .png, make a .gif with, say, black for the excess area and
tell POV that that color is transparent. The 3.02 docs will provide an
example. The .png with an alpha channel needs no special command. If
you use .gif, you must find the index of your background color. Suppose
it is index 0. Then say:
pigment { image_map { gif "image.gif" filter 0 1.0 } } or say:
pigment { image_map { gif "image.gif" transmit 0 1.0 } } depending on
the kind of transparency you want. The docs have more detail.
Jerry Anning
cle### [at] dholcom
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
There are several options. The one I use is to
place borders at the sides of the label so when
it stretches around, the letters will remain on one
side. You can then assign transparency to that
part of the image so the underlying bottle appears.
You'll need to think about how to scale the image
to maintain proper aspect ratio. I like using
labels of aspect ratio x:y :: 2 pi:1 to make
this easy.
Also you probably want to use "once" in the texture
specification to prevent it from tiling the
label along the y-axis. Also don't forget
"interpolate 2" to save yourself from aliasing.
Dan
ron hicks wrote:
>
> Hello,
>
> I've been raytracing about 3 months and have been polishing my skills
> with CSG construction.
> What I'm trying to do is to place a label on my povray beer bottle...the
> main body of the bottle is a cylinder so I tried using the image_map
> command with map_type set to 2 (for cylinder mapping) and the once
> option. I got the image to map onto the cylinder, but it stretched the
> label all the way around ...so then i tried scaling the x-coordinate of
> the image with no luck....so now I'm looking into creating my cylinder
> with a lathe object to see if handles this situation differently..
> If anyone has any suggestions as how I might get label to map properly
> please let me know.
>
> Best Regards,
>
> Ron Hicks
> www.geocities.com/SoHo/1006
> sig### [at] hotmailcom
--
http://www.flash.net/~djconnel/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Here's what you might do.
If your bottle body is a cylider, just use the map_type 2 (as you did).
Since POV stretches it all the way along a full revolution, you will need to
provide extra space in your image_map file outside the label. Experiment
with sizes, but keep aspect in mind. Also, use either PNG or GIF (or TGA?)
so that you use transparency (refer to the docs.)
In the more complex case (like the one I did) the bottle is a CSG
difference. It looks more realistic. However the image maps on the outside
*as well as* on the inside. So you'll need to have a separate label object
just a tiny bit larger in radius than the bottle and also infiinetely thin
(remember clipped_by?)
Hope this helps.
Regards,
--Peter
ron hicks wrote in message <35B909CC.4BA4F43D@hotmail.com>...
>Hello,
>
>I've been raytracing about 3 months and have been polishing my skills
>with CSG construction.
>What I'm trying to do is to place a label on my povray beer bottle...the
>main body of the bottle is a cylinder so I tried using the image_map
>command with map_type set to 2 (for cylinder mapping) and the once
>option. I got the image to map onto the cylinder, but it stretched the
>label all the way around ...so then i tried scaling the x-coordinate of
>the image with no luck....so now I'm looking into creating my cylinder
>with a lathe object to see if handles this situation differently..
>If anyone has any suggestions as how I might get label to map properly
>please let me know.
>
>Best Regards,
>
>Ron Hicks
>www.geocities.com/SoHo/1006
>sig### [at] hotmailcom
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Dan Connelly wrote:
> There are several options. The one I use is to
> place borders at the sides of the label so when
> it stretches around, the letters will remain on one
> side. You can then assign transparency to that
> part of the image so the underlying bottle appears.
>
> You'll need to think about how to scale the image
> to maintain proper aspect ratio. I like using
> labels of aspect ratio x:y :: 2 pi:1 to make
> this easy.
>
> Also you probably want to use "once" in the texture
> specification to prevent it from tiling the
> label along the y-axis. Also don't forget
> "interpolate 2" to save yourself from aliasing.
>
> Dan
>
> ron hicks wrote:
> >
> > Hello,
> >
> > I've been raytracing about 3 months and have been polishing my skills
> > with CSG construction.
> > What I'm trying to do is to place a label on my povray beer bottle...the
> > main body of the bottle is a cylinder so I tried using the image_map
> > command with map_type set to 2 (for cylinder mapping) and the once
> > option. I got the image to map onto the cylinder, but it stretched the
> > label all the way around ...so then i tried scaling the x-coordinate of
> > the image with no luck....so now I'm looking into creating my cylinder
> > with a lathe object to see if handles this situation differently..
> > If anyone has any suggestions as how I might get label to map properly
> > please let me know.
> >
> > Best Regards,
> >
> > Ron Hicks
> > www.geocities.com/SoHo/1006
> > sig### [at] hotmailcom
>
> --
> http://www.flash.net/~djconnel/
Dan-
I tried the tips you suggested including the regarding aspect ratio. I also
looked into the docs regarding transparency for the border. Now my problem is
setting the 'palette'
entry in the filter or transmit option. I created the label in PSP 5.0 and rgb
components are assigned a number from 0 to 255, which does'nt correspond to
the way povray assigns color components ( as far as I know ) so there are
really two things I don't understand.
1) How do I correlate PSP colors with povray colors?
2) What is required in povray's 'pallete' entry for the filter/transmit
statement regarding image maps?
One other thing I would like to note regarding the aspect ratio of the image;
it seems to me that an aspect ration of pi : 1 would make the label only
stretch 'halfway' round rather than 2pi or am I going off the deep end with
this presumption%}
Best regards,
Ron Hicks
sig### [at] hotmailcom
www.geocities.com/SoHo/1006
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
ron hicks wrote:
> Dan-
>
> I tried the tips you suggested including the regarding aspect ratio. I also
> looked into the docs regarding transparency for the border. Now my problem is
> setting the 'palette'
> entry in the filter or transmit option. I created the label in PSP 5.0 and rgb
> components are assigned a number from 0 to 255, which does'nt correspond to
> the way povray assigns color components ( as far as I know ) so there are
> really two things I don't understand.
> 1) How do I correlate PSP colors with povray colors?
> 2) What is required in povray's 'pallete' entry for the filter/transmit
> statement regarding image maps?
>
> One other thing I would like to note regarding the aspect ratio of the image;
> it seems to me that an aspect ration of pi : 1 would make the label only
> stretch 'halfway' round rather than 2pi or am I going off the deep end with
> this presumption%}
>
> Best regards,
>
> Ron Hicks
> sig### [at] hotmailcom
> www.geocities.com/SoHo/1006
Take a look at the tread over on c.c.g.r. about cylindrical mapping.
Vercurse mentions using 'transmit 255,1' when the default background
is white.
Regaurds
K.Tyler
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Sorry for the delay in replying...
The key in PSP 5.0 is to "colors->decrease color depth" to 256 colors.
Then "colors->edit palette" to see which color index corresponds
to the color which is the background -- colors are numbered
starting with 0 and going to 255. Or, if your label
is simpler, you can reduce the colors to 16. Just make sure
your background color is unique (to avoid confusion).
Then use the "transmit" option in the image_map statement to
set the transmission of the background color to 1.
>> labels of aspect ratio x:y :: 2 pi:1 to make
> One other thing I would like to note regarding the aspect ratio of the image;
> it seems to me that an aspect ration of pi : 1 would make the label only
> stretch 'halfway' round rather than 2pi or am I going off the deep end with
> this presumption%}
Correct -- I think you missed the "2" in my note.
Dan
--
http://www.flash.net/~djconnel/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |