POV-Ray : Newsgroups : povray.newusers : Help understanding Image Maps Server Time
1 Nov 2024 13:20:32 EDT (-0400)
  Help understanding Image Maps (Message 1 to 4 of 4)  
From: David
Subject: Help understanding Image Maps
Date: 25 Jul 2005 17:05:01
Message: <web.42e5538dc1284b04556e34270@news.povray.org>
I'm trying to create a cylinder with a logo design upon its surface.

I've created the logo in GIMP and its in PNG format.  At this point I have
two problems:

1) For the life of me, I can't get a PNG into POV that has a transparent
background.  I want the logo to be over the top of a (POV) textured
cylinder.  What settings should i use to get a Transparent PNG (or GIF, or
?).

2) The image that is mapped to the cylinder "reflects" onto the far side of
the cylinder. This creates problems when i try to scale the image to the
approprate size, as the two images (primary and reflection) smear each
other.  How do I make it not reflect?

You can see what I'm talking about here:

http://www.zigaero.com/images/cylinderFlag.jpg
http://www.zigaero.com/images/cylinderFlag2.jpg

Here is the code for the flag object:

#declare motorLabel = cylinder {
        <0,0,0> <(2*3),0,0>, (2*(bodyRadius+0.0001))
        pigment {
                image_map {
                        png "flagTestTrans.png"
                        map_type 0
                        once
                        }
                scale 0.5
        }
        rotate <-80,0,0>
        translate <1.25,0,0>
}


Post a reply to this message

From: Kyle
Subject: Re: Help understanding Image Maps
Date: 25 Jul 2005 19:02:13
Message: <a3rae1hlbsr9nfjcsq7ia9ibbass8iq5j1@4ax.com>
On Mon, 25 Jul 2005 17:03:09 EDT, "David" <nomail@nomail> wrote:

>1) For the life of me, I can't get a PNG into POV that has a transparent
>background.  I want the logo to be over the top of a (POV) textured
>cylinder.  What settings should i use to get a Transparent PNG (or GIF, or
>?).

In GIMP, select Layer -> Transparency -> Add Alpha Channel to add an
alpha channel to your png image.  Then select the background area and
hit Ctrl + K.  This will erase the area and you should see a
checkerboard pattern where the transparent area will be.  POV-Ray will
recognize this and make the area transparent as well.  See section
3.5.1.5.3 in POV-Ray help.

>
>2) The image that is mapped to the cylinder "reflects" onto the far side of
>the cylinder. This creates problems when i try to scale the image to the
>approprate size, as the two images (primary and reflection) smear each
>other.  How do I make it not reflect?
>

You need to use a cylindrical warp to wrap the pattern around the
cylinder.  See section 3.5.12.6.5 in POV-Ray help.  I have attached a
zip file that should help demonstrate all of this.

Hope this helps!


Kyle


Post a reply to this message


Attachments:
Download 'ImageWrap.zip' (170 KB)

From: David
Subject: Re: Help understanding Image Maps
Date: 28 Jul 2005 15:15:00
Message: <web.42e92e2178bd9318f0f498a30@news.povray.org>
Thanks for the tips kyle.

The transparency work perfectly.   I ended up not doing the wrapping but was
still able to get the results I was after.  The "final" product is
available for all to see here:  www.zigaero.com

I still don't understand why the image is reflected on the "back side" of
the cylinder.  But thanks for the help!

-David

Kyle <hob### [at] gatenet> wrote:
> On Mon, 25 Jul 2005 17:03:09 EDT, "David" <nomail@nomail> wrote:
>
> >1) For the life of me, I can't get a PNG into POV that has a transparent
> >background.  I want the logo to be over the top of a (POV) textured
> >cylinder.  What settings should i use to get a Transparent PNG (or GIF, or
> >?).
>
> In GIMP, select Layer -> Transparency -> Add Alpha Channel to add an
> alpha channel to your png image.  Then select the background area and
> hit Ctrl + K.  This will erase the area and you should see a
> checkerboard pattern where the transparent area will be.  POV-Ray will
> recognize this and make the area transparent as well.  See section
> 3.5.1.5.3 in POV-Ray help.
>
> >
> >2) The image that is mapped to the cylinder "reflects" onto the far side of
> >the cylinder. This creates problems when i try to scale the image to the
> >approprate size, as the two images (primary and reflection) smear each
> >other.  How do I make it not reflect?
> >
>
> You need to use a cylindrical warp to wrap the pattern around the
> cylinder.  See section 3.5.12.6.5 in POV-Ray help.  I have attached a
> zip file that should help demonstrate all of this.
>
> Hope this helps!
>
>
> Kyle


Post a reply to this message

From: Kyle
Subject: Re: Help understanding Image Maps
Date: 28 Jul 2005 20:49:20
Message: <84uie1lgo26h2ivmgibbsnib2uc2tfclff@4ax.com>
On Thu, 28 Jul 2005 15:12:33 EDT, "David" <nomail@nomail> wrote:

>The "final" product is available for all to see here:  www.zigaero.com

Looks good!

>I still don't understand why the image is reflected on the "back side" of
>the cylinder.  

Section 3.5.1.5.1 of the help file explains it pretty well.  Unlike
pigments based on color mapped patterns, which vary in the direction
of all three axis, image mapped pigments vary in the x and y direction
only and are "projected" along the z axis.  

If you can imaging a movie screen with an image projected on it, when
you walk around to the back side of the screen, the image is reversed.
This is the same effect you will see in POV-Ray if you use an
image-mapped pigment on an object.  Turn the object around and the
image is reversed on the back side.

I hope this explains it well enough for you to understand.


Kyle


Post a reply to this message

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