POV-Ray : Newsgroups : povray.general : Imagemap MapType Server Time
10 Aug 2024 23:18:39 EDT (-0400)
  Imagemap MapType (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
From: Ken
Subject: Re: Imagemap MapType
Date: 17 Nov 1999 19:54:29
Message: <38334E06.921E3DA4@pacbell.net>
Ron Parker wrote:

> Chris Colefax posted a gargantuan texture to do this to CGRR sometime
> in the past year.  Someone has it archived on a website somewhere, or
> I might have copied it to this server somewhere.  I wish I remembered
> better.  Peter?

I just sent him an email asking him if he still has the source for that.

Wait............

-- 
Ken Tyler -  1200+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Chris Colefax
Subject: Re: Imagemap MapType
Date: 17 Nov 1999 22:02:58
Message: <38336c62@news.povray.org>
Ron Parker wrote:
> Chris Colefax posted a gargantuan texture to do this to CGRR sometime
> in the past year.  Someone has it archived on a website somewhere, or
> I might have copied it to this server somewhere.  I wish I remembered
> better.  Peter?

Ken <tyl### [at] pacbellnet> wrote
> I just sent him an email asking him if he still has the source for
that.
>
> Wait............

But not for too long (despite appearances I generally check all the
relevant news servers on a daily basis).  A direct quote from the
message posted to c.g.g.r:

Solution 1, as previously recommended:

   #declare Face = plane {-z, .5
      pigment {image_map {tga "Image"} translate -.5}}

   #declare Box = intersection {
      object {Face} object {Face rotate y * 90}
      object {Face rotate y * 180} object {Face rotate y * 270}
      object {Face rotate x * 90} object {Face rotate x * -90}}

The box is created from <-.5, -.5, -.5> to <.5, .5, .5>, which you can
transform as you like.  You can also use the Box object in CSG
operations, but the texture itself is not actually solid, which brings
us to solution 2:

#macro cube_map (base_pigment)
   #local I = pigment {base_pigment translate <-.5, -.5, -.5>}

   #local I2 = pigment {radial pigment_map {
      [.125 I rotate <90, 0, -90>]
      [.125 I rotate <0, 0, -90>] [.375 I rotate <0, 0, -90>]
      [.375 I rotate <-90, 0, -90>] [.625 I rotate <-90, 0, -90>]
      [.625 I rotate <0, 180, -90>] [.875 I rotate <0, 180, -90>]
      [.875 I rotate <90, 0, -90>]}
      rotate z * 90}

   #local I3 = pigment {radial pigment_map {
      [.125 I rotate <-90, 0, 90>] [.125 I] [.375 I]
      [.375 I rotate <-90, 0, 270>] [.625 I rotate <-90, 0, 270>]
      [.625 I rotate <180, 0, 0>] [.875 I rotate <180, 0, 0>]
      [.875 I rotate <-90, 0, 90>]}
      rotate x * 90}

   radial pigment_map {
      [.125 I3] [.125 I2] [.375 I2] [.375 I3]
      [.625 I3] [.625 I2] [.875 I2] [.875 I3]}
#end

Save this macro to a file, and then include that file into your scene.
Now you can create a genuinely solid texture with the image arranged in
a cube, eg:

   box {-.5, .5
      pigment {cube_map (pigment {image_map {tga "Image"}} ) }
      scale <1, 2, 3> rotate <15, -35, 0> translate <-5, 10, 3>}

The advantage of this method is that you're not restricted to boxes -
you can apply the pigment to any object (including CSG differences and
intersections), and you can actually use *any* pigment in place of the
image_map.  The pigment is basically like six pyramids with their apexes
(or apices, if you prefer) stuck together to form the cube.

The image covers the base of each pyramid, but note that the joins
between the diagonal sides of each pyramid will be visible if you apply
the pigment to a non-cube surface - so we turn to Carl Perkins'
suggestion, ie. to use a warped image with spherical mapping.  Start by
creating a scene containing only a cube created using either of the
above methods, and given a finish {ambient 1} (eg. add the finish to the
Face plane above, and create a scene with object {Box}).  Now, add this
camera to the scene:

   camera {panoramic angle 180 right x up y rotate y * clock * 180}

and render a two frame animation at a square resolution (eg.
Final_Frame=2 Width=300 Height=300).  Join the resulting two frames
together, side by side (using DTA, or another image manipulation
program), and you will have a suitable, spherically-warped image, eg:

   box {-1, 1
      pigment {image_map {tga "Joined" map_type 1 interpolate 2}}
      rotate <45, -45, 0>}


Post a reply to this message

From: Alan Kong
Subject: Re: Imagemap MapType
Date: 17 Nov 1999 22:08:06
Message: <FGwzOPgm66ziikQc1K1+3BAnQjk7@4ax.com>
On Wed, 17 Nov 1999 16:14:30 -0800, Ken <tyl### [at] pacbellnet> wrote:

>Easy :) Make a box out of 6 flat boxes or an intersection of 6 planes.
>This will allow you to map an image to each face individualy. It is the
>only method that I know of.

  Yeah, that's how I've done it in the past, Ken. Works well. I mapped
different image maps of a girl who worked as a model for a photographer in
Hawaii (he granted permission, as long as it was uploaded to CompuServe,
only). Rotated the box and placed a reflective sphere in the background so
one could see the backside of the box. Fun to look at but it's all gone when
my Pentium 200 died :(

-- 
Alan - ako### [at] povrayorg - a k o n g <at> p o v r a y <dot> o r g
http://www.povray.org - Home of the Persistence of Vision Ray Tracer


Post a reply to this message

From: Ken
Subject: Re: Imagemap MapType
Date: 18 Nov 1999 00:52:58
Message: <383393FA.E0109DEC@pacbell.net>
Alan Kong wrote:

>   Yeah, that's how I've done it in the past, Ken. Works well. I mapped
> different image maps of a girl who worked as a model for a photographer in
> Hawaii (he granted permission, as long as it was uploaded to CompuServe,
> only). Rotated the box and placed a reflective sphere in the background so
> one could see the backside of the box. Fun to look at but it's all gone when
> my Pentium 200 died :(

  One of my favorite Christmas gifts to family and friends is a rotating
picture cube of family members and pets. It's a big hit and very personal.

-- 
Ken Tyler -  1200+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Ken
Subject: Re: Imagemap MapType
Date: 18 Nov 1999 04:17:32
Message: <3833C3EC.6670945D@pacbell.net>
Chris Colefax wrote:

> > Wait............
> 
> But not for too long (despite appearances I generally check all the
> relevant news servers on a daily basis).

...and we appreciate your continued support.

Thanks Chris,

-- 
Ken Tyler -  1200+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Nieminen Juha
Subject: Re: Imagemap MapType
Date: 18 Nov 1999 08:03:23
Message: <3833f91b@news.povray.org>
Alan Kong <ako### [at] povrayno-spamorg> wrote:
:   Probably some form of uv_mapping is what you are looking for. Nathan
: Kopp's UVPov v6.1 (unofficial POV-Ray for Windows, source provided) has such
: mapping for some objects but I don't think the box was among them.

  Unfortunately it is.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Alan Kong
Subject: Re: Imagemap MapType
Date: 18 Nov 1999 19:47:09
Message: <eZ00OAR8ANLMmY5U0B2mEwIKZ8wE@4ax.com>
On 18 Nov 1999 08:03:23 -0500, Nieminen Juha <war### [at] punarastascstutfi>
wrote:

>  Unfortunately it is.

  Warp, you're right. I forgot the box was included among the uv mapped
objects.

-- 
Alan - ako### [at] povrayorg - a k o n g <at> p o v r a y <dot> o r g
http://www.povray.org - Home of the Persistence of Vision Ray Tracer


Post a reply to this message

From: Ron Parker
Subject: Re: Imagemap MapType
Date: 18 Nov 1999 19:48:22
Message: <38359e4f.87704964@news.povray.org>
On 18 Nov 1999 08:03:23 -0500, Nieminen Juha
<war### [at] punarastascstutfi> wrote:

>Alan Kong <ako### [at] povrayno-spamorg> wrote:
>:   Probably some form of uv_mapping is what you are looking for. Nathan
>: Kopp's UVPov v6.1 (unofficial POV-Ray for Windows, source provided) has such
>: mapping for some objects but I don't think the box was among them.
>
>  Unfortunately it is.

Why is that unfortunate, other than that the mapping is a little
weird?


Post a reply to this message

From: Charles
Subject: Re: Imagemap MapType
Date: 18 Nov 1999 22:08:04
Message: <3834BE50.59226F95@enter.net>
Sergio wrote:
> 
> Hello,
> 
> I'm trying to apply an imagemap to a box but there isn't an box maptype
> avaible.
> If I use planar maptype the other faces aren't mapped correctly.
> 
> How can I do this?
> How can I suggest to the PovTeam a new feature?

While you are waiting for the new feature<g> here is a technique
I've used for such an effect. It has been suggested you make a box
out of intersected planes, or polygons, but this technique is
more automated, and also works to apply box-like mapping (or any
texturing) on more complex shapes.

The general explanation can be found at...
http://www.enter.net/~cfusner/tutorial/ch08.html

If this technique sounds like it would work for you, there's an 
INC file available from the link at the bottom of the page which
helps apply the technique in general form.


Post a reply to this message

From: Nieminen Juha
Subject: Re: Imagemap MapType
Date: 19 Nov 1999 04:05:12
Message: <383512c8@news.povray.org>
Ron Parker <par### [at] fwicom> wrote:
:>  Unfortunately it is.

: Why is that unfortunate, other than that the mapping is a little
: weird?

  Sorry, my wording was pretty confusing. What I tried to say was something
like: "Unfortunately you are wrong, the box is uv-mapped" :)

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

<<< Previous 5 Messages Goto Initial 10 Messages

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