POV-Ray : Newsgroups : povray.binaries.images : Re: fix single image on surface : Re: fix single image on surface Server Time
1 Oct 2024 13:17:12 EDT (-0400)
  Re: fix single image on surface  
From: Bob Hughes
Date: 13 Aug 2000 13:41:39
Message: <3996ddd3@news.povray.org>
"Christoph Hormann" <Chr### [at] schunteretctu-bsde> wrote in
message news:3996D0BA.8D6C3D2F@schunter.etc.tu-bs.de...
|
| Jens Strohmeyer wrote:
| >
| > i need to know how to fix a SINGLE image
| > to a surface, e.g. how to fix a bitmap on a special
| > position on a cylinder. can anyone help ?
|
| Don't know, what you exactly mean, but you can add "once" to an image_map
to
| avoid tiling.  Example:
|
|   image_map {
|     png "test.png"
|     once

    map_type 2 // for putting on cylindrical objects and such
    filter 255, 1 // palette entry 255 will be clear (use 256 color image
only though)

|   }
|
| Furthermore you can translate and scale it like every other texture.

The thing to keep in mind is to use a image which is ready to apply.  What I
mean by that is, if you want it only partially on the object like a bottle
label instead of a can label you will need to set the applicable part of the
image into another larger image and then set that images background color to
be clear.  That will then wrap fully around the cylinder and leave the
intended portion only on one area, otherwise it will get put 360 degrees
around (and 1 unit tall from 0 to 1 y without further scaling/translating).
If you can't use a paletted image then the next best thing would be planar,
or map_type 0 (default), instead and place it by scaling and translating.
It just won't wrap onto the object very well if so.

| BTW, povray.general or povray.newuser would be more appropriate for such
| questions.

Yep, certainly post a binary (image) when posting new to this group please
:-)

Bob


Post a reply to this message

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