POV-Ray : Newsgroups : povray.binaries.images : mesh2 : Re: mesh2 Server Time
1 Aug 2024 04:14:40 EDT (-0400)
  Re: mesh2  
From: Chris B
Date: 2 Jan 2009 12:58:49
Message: <495e55d9@news.povray.org>
"Wijnand Nijs" <w.n### [at] alf4alldemonnl> wrote in message 
news:495e155e@news.povray.org...
>A test with a mesh2 object for different outside (texture) and inside
> (interior_texture) textures. The test to use the interrior_texture in
> combination with a texture_list fails. Any idee?

For interior_texture to be used POV-Ray requires a conventional texture 
statement to be added to the mesh2 object. This exterior texture is layered 
over the texture defined within the texture_list, so you can define a 
completely transparent texture and it'll use the texture from the texture 
list for the outside and the texture from the 'interior_texture' object 
modifier for the inside.

Here's a simple testbed so you can play around with it:

camera {location <0,0,-4> look_at 0}
light_source {<-10,20,-10>, rgb 1}

#declare MyMesh = mesh2 {
  vertex_vectors {
    4,
    <-1,0,0>, <0,-1,0>, <1,0,0>, <0,1,0>
  }
  texture_list {
    6,
    texture { pigment {rgb <1,1,0>} },
    texture { pigment {rgb <0,1,1>} },
    texture { pigment {rgb <1,0,1>} },
    texture { pigment {rgb <0,1,0>} },
    texture { pigment {rgb <1,0,0>} },
    texture { pigment {rgb <0,0,1>} }
  }
  face_indices {
    2,
    // vertex and texture_list indices
    <0, 1, 2> ,0 , 1, 2,
    <2, 3, 0> ,3 , 4, 5
  }
 // Add a transparent exterior texture
  texture {pigment {rgbt 1}}
 // Add a semi transparent grey interior texture
  interior_texture {pigment {rgbt 0.5}}
}
// Draw a copy of the front and back side-by-side
object {MyMesh translate -x}
object {MyMesh rotate y*180 translate x}


Post a reply to this message

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