|
|
"Martijn van den Branden" <m.v### [at] studenttudelftnl> wrote in message
news:3e0ed4c5$1@news.povray.org...
Sent: Sunday 29 December 2002 11:49 AM
Subject: normal_vectors
Hi Martijn,
although I'm Dutch too, I will answer in English,
so everybody can follow it.
> Hi there,
>
> i'm a complete newbie to povray, hence this
> question: i don't understand the 'smooth' mesh2
> example in the pov-doc (included below).
> It says in order to create a 'smooth' mesh,
> you have to include vertex normals. i can only
> think of 1 normal, that is the one perpendicular
> to the whole plane (made up by the triangles).
> What do these vertex normals do?
As Thorsten explained, the normals at the vertices
(corners) are not perpendicular to the triangle plane.
They are perpendicular to an imaginary plane that
goes through the vertices. For reflections these normals
are interpolated for every point of the triangle. This
depends of the distances from all three vertices.
This way it gives the impression that the triangle is not
flat, but that it has a rounded surface. You can see this
in the mesh2 example. Two are without these normals and
two are with these normals. The ones without give a
flat impression and the ones with the normals a rounded
impression.
See also in the manual:
6.5.2.6 Triangle and Smooth Triangle
> when
> i render the scene below with some light_source
> , i get a plane 'warped' on the top side, which
> i think is my videocard (tnt-1) going bezerk.
>
I don't understand what you mean with 'warped'.
I think not that this is a failure of your videocard,
but that something is wrong with the mesh2 or you
are looking at it at a strange angle.
________________________________________
> mesh2 {
> vertex_vectors {
> 9,
> <0,0,0>, <0.5,0,0>, <0.5,0.5,0>,
> <1,0,0>, <1,0.5,0>, <1,1,0>,
> <0.5,1,0>, <0,1,0>, <0,0.5,0>
> }
> normal_vectors {
> 9,
> <-1,-1,0>,<0,-1,0>, <0,0,1>,
> /*as 1*/ <1,-1,0>, /*as 2*/
> /*as 3*/ <1,0,0>, /*as 2*/
> /*as 4*/ <1,1,0>, /*as 2*/
> /*as 5*/ <0,1,0>, /*as 2*/
> /*as 6*/ <-1,1,0>, /*as 2*/
> /*as 7*/ <-1,0,0>, /*as 2*/
> /*as 8*/ /*as 0*/ /*as 2*/
> }
> face_indices {
> 8,
> <0,1,2>, <1,3,2>,
> <3,4,2>, <4,5,2>,
> <5,6,2>, <6,7,2>,
> <7,8,2>, <8,0,2>
> }
> pigment {rgb 1}
> }
>
If you give an example, then give a working file, so
that one can paste it inside POV-Ray and test it.
It is not clear what you mean with
/*as 1*/
because it is not clear where you are referring to.
Success with mastering this wonderful program,
Jaap Frank
Post a reply to this message
|
|