POV-Ray : Newsgroups : povray.binaries.images : POV-Tree 1.1 Examples : Re: POV-Tree 1.1 Examples Server Time
13 Aug 2024 01:20:47 EDT (-0400)
  Re: POV-Tree 1.1 Examples  
From: fitchn
Date: 15 Jul 2003 11:50:01
Message: <web.3f1421b345c67e6a397cf110@news.povray.org>
Gena wrote:
>What's the advantage of mesh2? I cannot get it from the doc.
>Does it have more compact syntax?
>
>Gena.

Short Answer: Yes, the mesh2 has a signifigantly more compact syntax.

Long Answer:

The basic advantage of the mesh2 syntax is that the properties (including
location, pigiment, normal, finish, etc.) of any common vertices of several
triangles need only be specified once, instead of being re-specified for
each triangle. For example, if you had six triangles intersecting at the
same point, all properties of that point (again, location, pigment, normal,
finish, etc.) would only need to be specified once, instead of six times.
As a result, the file size would be (in this example) one sixth of the
size, and parse six times faster, all while taking up less system memory! A
signifigant increase! The file space, parsing time, and memory saved using
the mesh2 increases dramatically when even more triangles share common
points, and tend to work even better on closed objects as every triangle
has all vertices in common with several other triangles.

The parse time of the mesh2 syntax is also slightly faster than that of the
standard mesh, due to the fact that the mesh2 syntax resembles very closely
the internal 'mechanics' that POV-Ray uses for meshes; as such, less time
is required to convert the format.

A couple of other advantages of the mesh2 syntax are the ability to easily
implement u-v mapping, as well as creating triangles with a different color
at each vertex. Additionally, the mesh2 syntax allows for textures to be
specified within the mesh2 structure, rather than requiring them to be
pre-defined as in the original mesh syntax. These last advantages may not
be very helpful to you since, as far as I can tell, they aren't currently
used in your meshes now anyway. Who knows--maybe you'll find a way to use
them in future releases!



This was probably a little bit more of a response than you had bargained
for, but I figured I may as well put it all out there! Again, keep up the
great work!

 - Nick


Post a reply to this message

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