POV-Ray : Newsgroups : povray.general : How to define the normal on a single triangle? (new pov-ray user) : How to define the normal on a single triangle? (new pov-ray user) Server Time
2 Aug 2024 20:18:27 EDT (-0400)
  How to define the normal on a single triangle? (new pov-ray user)  
From: Impress
Date: 22 Jul 2004 13:15:00
Message: <web.40fff583897c4c6f1e9c3cfd0@news.povray.org>
I have define a single triangle with two textures, one for the backface and
frontface. However, I would like to have a bit more control over it. Here
it's my povray basic source...

// ------------------------------------------------------------
camera { location  <0.0, 4.0,  0.0> look_at <0.0, 0.0,  0.0> }
global_settings { ambient_light color rgb <10,10,10> }

triangle {
  <-1,  0, -1>,  // <Vertex1>
  < 1,  0, -1>,  // <Vertex2>
  < 0,  0,  1>   // <Vertex3>
  texture { pigment {color rgb <1,1,0>}}
  interior_texture { pigment {color rgb <0,0,1>}}
}
// ------------------------------------------------------------

I wonder how POV-RAY define the back and front of my triangle!? I try with
inside_vector into a mesh statement, but as it's say in the doc... they
give unpredicted results for open-shape!

I would like to have full control by specifying a vector (normal!?). This
way, no matter what are my three vertex, I would be sure that the front
face is the one I want! I am happy with the flat-shade surface (which is
the type of shading I look for), so that's why I prefer not using
smooth_triangle.

Thank you very much in advance!
Impress


Post a reply to this message

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