POV-Ray : Newsgroups : povray.unofficial.patches : Questions about mesh2 : Re: Questions about mesh2 Server Time
2 Nov 2024 13:18:47 EDT (-0400)
  Re: Questions about mesh2  
From: Nathan Kopp
Date: 5 Oct 1999 23:28:39
Message: <37fac1e7@news.povray.org>
How about this:

A current limitation (which I plan to keep) is that the face_indices section
must be specified before normal_indices or uv_indices.  Now, what you could
do is specify all of the smooth triangles first in the face_indices section,
and then all of the flat triangles.  Then, in the normal_indices section,
you just only specify enough sets of normal indices to put normals on the
smooth triangles.  Any faces remaining that don't have normals just get
turned into smooth triangles.  It would be easy to code, fast to parse, and
would keep file sizes small.

So, if you had a mesh with, say, 100 smooth triangles and 50 flat triangles,
you would specify all of the vertex, normal, and uv vectors.  Then have the
face_indices section where you specify all 150 triangles, with the 100
smooth triangles first, followed by the 50 flat triangles.  Then, in the
normal_indices section, you put only 100 entries - one for each smooth
triangles.  The remaining 50 triangles are then assumed to be flat.
Finally, you specify uv indices for each of the 150 triangles.

> : Anyway, if you show me some numbers of how it would save tons of space
to
> : put normals and vertices together, I'll look at it more closely.
>
>   Perhaps you are right.
>   Anyways you can use the mesh compressor to see how many normals really
can
> be put in the vertex vectors group.

I'll check it out.  (in version 2.0, of course).   :-)

-Nathan


Post a reply to this message

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