POV-Ray : Newsgroups : povray.newusers : texture positioning problem : texture positioning problem Server Time
29 Jul 2024 14:11:52 EDT (-0400)
  texture positioning problem  
From: Xayvion
Date: 22 Sep 2005 07:40:01
Message: <web.4332975e3364fc7fe1ee334e0@news.povray.org>
Hi all

I have a problem with pov-ray.  I'm trying to make a keyboard button with a
letter in the upper left corner, but I can't find a way how to position the
texture on the correct place on the button.  The image file "D.png" is
simply a transparent png with the letter "D" in it. I'm using Pov-ray
3.6.1a for Windows.

This is the script i'm using.  Can someone please help me?

Thanks

Xayvion

#include "colors.inc"    // The include files contain
#include "stones.inc"    // pre-defined scene elements

#declare btnColor = pigment {color Yellow}
#declare mapD = pigment { image_map {png "D.png" once} }
#declare tex = texture {btnColor} texture {mapD}

background { color Cyan }
  camera {
    location <0, 3, -4>
    look_at  <0, 0,  0>
    up <0,1,0>
  }


 prism {
    //linear_sweep
    conic_sweep
    cubic_spline
    0.75, // sweep the following shape from here ...
    1, // ... up through here
    7, // the number of points making up the shape ...
    <1,-1>,<-1,-1>,<-1,1>,<1,1>,<1,-1>,<-1,-1>,<-1,1>
    texture { tex }
    rotate <180, 0, 0>
    translate <0, 1, 0>
    scale <1,3,1>

  }

  light_source { <0, 10, 0> color White}


Post a reply to this message

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