POV-Ray : Newsgroups : povray.newusers : Can't get this mapped properly. : Re: Can't get this mapped properly. Server Time
4 Sep 2024 22:16:51 EDT (-0400)
  Re: Can't get this mapped properly.  
From: TinCanMan
Date: 21 Jul 2002 23:41:07
Message: <3d3b7ed3@news.povray.org>
> I used PNG transparency to get it out correctly and scaled it to the
> right size so that that for the "Player 2" start button I can hopefully
> figure out a way to get a second one in there (Maybe do another image
> map but with another figure side by side).
Don't do something silly like that ;)
You can just reuse the image and duplicate it.  There are several ways to do
this. Here's one:

#declare button =
union{
  cylinder{<0,0,0> <0,.5,0>,1.1 }
  difference{
    sphere{<0,0,0>,1.2 }
    box{<-5,.2,-5> <5,5,5>}
    box{<-5,-5,-5> <5,0,5>}
    translate .5*y
  }
  difference{
    cylinder{<0,.5,0> <0,1,0>,.9}
    sphere{<0,2,0>,1.2 scale<1.1,1,1.1> }
  }
  difference{
    torus{.8,.1 }
    box{<-5,0,-5> <5,-5,5>}
    translate 1*y
  }
  texture{
    image_pattern{gif "help-1.gif" once}//once to avoid repeating texture
    texture_map{
      [0
        image_pattern{gif "help-1.gif" once}//once to avoid repeating
texture
        texture_map{
          [0 texture1] //texture where image is black and outside image
          [1 texture2] //texture where image is white
        }
        translate <1,0,0>
      ]
      [1 texture2]
    }
    rotate x*90
    translate <-1,0,-1/2>
    scale <.6,1,1>
  }
}


-tgq


Post a reply to this message

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