POV-Ray : Newsgroups : povray.programming : Parsing mesh2 data : Re: Parsing mesh2 data Server Time
25 Sep 2021 04:23:22 EDT (-0400)
  Re: Parsing mesh2 data  
From: clipka
Date: 14 Sep 2016 07:06:08
Message: <57d92f20$1@news.povray.org>
Am 14.09.2016 um 11:45 schrieb Mr:

> So there is not a single feature in mesh2 that we'd lose when switching to OBJ?
> could we still use smoothing groups? no limit in the number of points/faces...?

mesh2 does not support smoothing groups; if the exporting program uses
them, it has to convert them to vertex normals (which are a much more
flexible mechanism) for mesh2 export; same deal for OBJ, so no loss there.

OBJ does not have an intrinsic limit to the number of vertices or faces;
exporters and imoporters may, and in fact there is /some/ upper limit
intrinsic in the new OBJ import code, but those limits are the same as
for the mesh2 parser, so no loss there either.

> Why did you choose it over some binary format like 3DS ? wouldn't this be even
> faster?  maybe the partial update that could one day be implemented for
> animations?

Compatibility and simplicity. OBJ is probably /the/ one and only
baseline mesh interchange format that /all/ mesh-based 3D tools support,
has a very straightforward structure, and besides is a text-based format
and thus can be read in an editor, which is an advantage in debugging.

3DS, on the other hand, has a rather complex nested structure, and also
has some other drawbacks; coincidently, those happen to include the very
topics you mentioned earlier:

- The format does not support explicit vertex normals, making it
necessary to fall back to smoothing groups instead; importing those into
POV-Ray would be a tremendous hassle, as POV-Ray internally operates
with vertex normals, which would have to be generated from the smoothing
groups, which in turn requires a costly look at neighboring triangles,
and may cost you more processing time than the binary import would save
you. Also, if the exporting program natively operates with vertex
normals as well, or uses a different algorithm to compute vertex normals
from smoothing groups for rendering, smoothing information will suffer
in the process.

- The format is limited to 65536 vertices and triangles per mesh.

Plus (though this would only be relevant when adding texture import):

- The format limits texture file names to 8.3 format (and without path
information I presume), requiring the exporter to copy the textures around.

Post a reply to this message

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