Custom exporter reduce polymesh complexity

Custom exporter reduce polymesh complexity

Anonymous
Not applicable
1,142 Views
2 Replies
Message 1 of 3

Custom exporter reduce polymesh complexity

Anonymous
Not applicable

Hi

Is there a way to reduce polymesh complexity given by the custom exporter? Because even if I give a low LOD at the view node, some elements still give a crazy amout of triangles.

Example :
Here, you can mostyl see 2 walls, one at the left, the other one at the right. But the left one produce way more triangles than the other one...

 open3mod_2017-09-22_17-17-52.png

Any ideas?

Thanks.

0 Likes
1,143 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk

Dear Romain,

 

Thank you for your query.

 

Maybe you can make use of the Face.Triangulate method taking a levelOfDetail argument:

 

http://www.revitapidocs.com/2017/b571177c-1268-35cd-0be1-e19db29fcb20.htm

 

You could possibly use it like this: on receiving the polymesh from the custom exporter context, retrieve the generating element, query it for its geometry and replace the polymesh information by the simplified triangulation, which may require additional transformation to get it into the right location.

 

Here is one of several blog posts discussing related questions that may help understand the situation in more depth and possibly provide ideas for alternative approaches:

 

http://thebuildingcoder.typepad.com/blog/2017/05/wall-and-opening-tessellation.html

 

I hope this helps.

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 3

Anonymous
Not applicable

Surprisingly, this gives awsome results.

Instead of skipping faces with IncludeGeometricObjects = false, it gives much better to set it to true, and process the OnFaceBegin, node.GetFace().Triangulate(lod), and skip the OnPolymesh. Now, some complex elements that made my collada file reach 5Mo+, are so simplified that it weight only 142Ko.

Do you know why the given polymesh during custom export doesn't match at all the polymesh given by face triangulation?

0 Likes