POV-Ray : Newsgroups : povray.general : Imagemap MapType Server Time
1 Nov 2024 03:16:52 EDT (-0400)
  Imagemap MapType (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: Sergio
Subject: Imagemap MapType
Date: 17 Nov 1999 18:27:02
Message: <383339c6@news.povray.org>
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?

Thanks
Sergio


Post a reply to this message

From: Alan Kong
Subject: Re: Imagemap MapType
Date: 17 Nov 1999 19:04:33
Message: <mUEzOF3mImSBF9jIKGp4hPfR34+N@4ax.com>
On Wed, 17 Nov 1999 23:20:06 -0000, "Sergio" <ine### [at] esotericapt> wrote:

>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.

  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. Check it
out for yourself at:

http://www.nathan.kopp.com/patched.htm

>How can I suggest to the PovTeam a new feature?

  This a fairly popular request. The problem is finding the person to
*write* the new feature :)

-- 
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: 17 Nov 1999 19:15:34
Message: <383344E6.AE6A62F5@pacbell.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?

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.

-- 
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: Ron Parker
Subject: Re: Imagemap MapType
Date: 17 Nov 1999 19:25:34
Message: <383346a0.1203823@news.povray.org>
On Wed, 17 Nov 1999 16:14:30 -0800, Ken <tyl### [at] pacbellnet> wrote:

>
>
>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?
>
>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.

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?


Post a reply to this message

From: Jerome M  BERGER
Subject: Re: Imagemap MapType
Date: 17 Nov 1999 19:46:48
Message: <38334C4E.2514557E@enst.fr>
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?
	You should be able to do it with a composition of to radial texture
maps...

		Jerome
-- 
*******************************

* they'll tell you what can't * mailto:ber### [at] inamecom
* be done and why...          * http://www.enst.fr/~jberger
* Then do it.                 *
*******************************


Post a reply to this message

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

Goto Latest 10 Messages Next 5 Messages >>>

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