|
|
TinCanMan wrote:
> You would probably be better to use an image_pattern texture than just an
> image_map. Image map only applies to pigment, whereas image_pattern lets
> you apply different textures for each part of the image, for example if you
> wanted the man to have a bumpy normal and the rest to be smooth.
> See 6.7.11.20 for information on how it works
>
> Here is a sample for you. The first thing you need to do though is to
> negative the image so the white part is black and the black part is white.
> This is because image_pattern uses the greyscale value, anything outside the
> image has a greyscale value of 0, so you want the area surrounding the man
> to be the same so you don't have a square where the image is.
>
> //start
> #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 texture1] //texture where image is black and outside image
> [1 texture2] //texture where image is white
> }
> rotate x*90
> translate <-1/2,0,-1/2>
> scale <1,1,1.3> //image originally mapped an x-y plane from <0,0> to
> <1,1>, rotate translate and scale to suit
> }
> }
> //end
>
> -tgq
>
>
Interesting, thank you for bringing this to my attention. The
suggestion given to me by hughes b has worked perfectly, so I do not
believe for this project I'll need to take the method you suggest.
Although, now that I am aware of it and it's potenial I'm sure I'll end
up using it sometime within this or another project. Thank you very
much for the feedback and the time you've spent helping me :-)
-Jon
Post a reply to this message
|
|