POV-Ray : Newsgroups : povray.windows : interior texture for triangles : Re: interior texture for triangles Server Time
26 Jun 2024 01:15:09 EDT (-0400)
  Re: interior texture for triangles  
From: Mike Williams
Date: 24 Feb 2006 13:37:13
Message: <LCOB$KA7I1$DFwf1@econym.demon.co.uk>
Wasn't it tune who wrote:
>
>I did not tell you all about my .pov file (that you can find below in this
>post). Actually, all triangles where eclosed in a mesh. Texture does not
>work, both inside "triangle" and outside it, inside "mesh".
>What do you mean when you say "or individually in a special way"? Maybe 2D
>objects can be filled in with colours otherwise than by "textures"? This
>wuold be the crucial point.

Putting the texture statement in either of those positions works. Here's
a version with the camera and light source moved around a bit so that
you can see the colours better.

I've applied Material_0002 to the whole mesh, so any triangle that
doesn't have its own texture becomes red, and I've applied Material_0001
to the first triangle, so it is white.

#include "colors.inc"

global_settings { assumed_gamma 2.2 }

camera {
  location <50, 22, 0>
  look_at  <0, 22, 0>
  angle    20
}

background { color rgb < 0,0.5,0.7 > }

#declare Material_0001 = texture {
  pigment { color White  }
}

#declare Material_0002 = texture {
  pigment { color Red  }
}


mesh {
 triangle {
 <  0.,  23.0799999,  0.>, <  0.,  1.,  1.>, <  1.,  22.7399998,  1.>
 texture { Material_0001 }
 }
 triangle {
 <  0.,  26.6399994,  1.>, <  0.,  2.,  2.>, <  1.,  22.9400005,  2.>
 }

 texture { Material_0002 }
}


light_source {<50, 23, 0> color rgb 2}


Post a reply to this message

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