POV-Ray : Newsgroups : povray.newusers : mesh2: vertex_vectors and normal_vectors : Re: mesh2: vertex_vectors and normal_vectors Server Time
26 Jun 2024 12:38:31 EDT (-0400)
  Re: mesh2: vertex_vectors and normal_vectors  
From: Le Forgeron
Date: 16 Jul 2012 07:22:39
Message: <5003f97f$1@news.povray.org>
Le 16/07/2012 10:12, Ansgar a écrit :
> Hi there.
> 
> I have several mesh2 objects (generated from 3ds files with Rheingold3D) which
> work just fine when I use them in Povray scenes.
> However, I'd also like to import them into a realtime 3D engine (Irrlicht) to do
> a kind of preview.
> I'm currently writing a parser to do just that.
> 
> Now the problem: I noticed that several of the meshes have fewer normal_vectors
> than vertex_vectors. How is the assignment done in these cases, meaning, how do
> I know which normal vectors belong to which vertex vectors?

Greetings,

Mesh2 is a syntax which delights in using indexes.

vertex_vectors are/is the raw set of vertex's/vertices' position.

normal_vectors are/is the raw set of normal's vector.

Usually, there is no duplicate entry in a set: let's take a mesh2 of a
torus. Every vertex is different. Yet, some vertices have exactly the
same normal (e.g. on the top circle, every point has a normal pointing up).

*answer to question*:
The real description of the association between vertices (to form
triangle or smooth_triangle) themselves and between vertices and
normales happens in face_indices{} and normal_indices{}

face_indices can become more complex with textures (including the
capability that each vertex of a triangle get its own texture, and that
the texture associated with a vertex might change along with each
triangle it is part of).

See >
http://wiki.povray.org/content/Documentation:Tutorial_Section_3.1#Mesh2_Object


Post a reply to this message

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