cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Simplify surfaces using "quadratic decimation", like Open3D and other pt cloud to tin engines

Simplify surfaces using "quadratic decimation", like Open3D and other pt cloud to tin engines

This seems obscure, but actually is a huge deal.

Drone point clouds are common now, and I am still not seeing people do well with making TINs from them.

Every engine seems to want to decimate the pt cloud first, to lighten the load, then make the tin.

You lose the "important" points when decimating, which is the opposite of what we want.

Instead, use all the points, and simply the surface down to desired triangle count using the quadratic decimation method. The code is out there, its not something to be rewritten.

What you do is read in the pt cloud, sort pts to divide into smaller chunks, make a surface of each chunk and simplify, then add the chunks together in the end. At least that is how I did it in my c# prog to multithread and not lock things up. It works, I use it daily. Wish adesk would up its game on this.

Note that the resulting surface would cut all ties to past parameters. Like importing from an xml with just triangles. When starting with a .laz though, there is no history so that is a non-issue. Getting data lightweight is a huge issue and this method does that and maximizes detail from original data.

9 Comments
ramesh_sridharan
Autodesk

@JamesMaeding We are adding point cloud related functionalities in ReCap Pro including this intelligent decimation. The beta version of that should be out in few weeks.

JamesMaeding
Advisor

@ramesh_sridharan 

But that is not a point cloud thing, its a triangle thing. Do you mean Recap will do TIN's?

If you look into that decimation method, the ending verticies do not all lie on the original points, so you have to make the tin to get the fancy decimation.

The other thing is recap is not a good point cloud editor compared to trimble business center and possibly others, and civil3d people will want to use the simplifier on any surface, not just ones from point clouds. So your audience for a new tool in recap will be quite small, sorry to say. Shoot for a civil3d feature please.

thx

JamesMaeding
Advisor

BTW, to show the results from the implementation I did, I took a 300k tri drone surface, and copied it and simplified to 30k tris. That is a 10x reduction.

I then ran a volume between the two to see the average variation up and down, as well as average total deviation from original. Here is the results, with simplified one as "proposed" and orig as "base":

 

--------------- Volume Report ---------------
Surface: Grid Volume Surface Ground MD 5-9 Simp vs Ground MD 5-9
Cut: 3,976 cubic yards.
Cut Area was 818,313 sq. ft., 18.786 ac.
Cut Average Depth: 0.13 ft.
Fill: 4,155 cubic yards.
Fill Area was 874,904 sq. ft., 20.085 ac.
Fill Average Depth: 0.13 ft.
------
Net: 180 cubic yards fill.
Total Area was 1,693,217 sq. ft., 38.871 ac.
Average fill Depth: 0.00286588 ft.
Volume Change Per 0.1 ft: 6,271 cubic yards.
Cut to Fill Ratio: 0.96
---------------------------------------------

 

You can see how incredibly well the decimation worked, in terms of maintaining the shape of original.

In shaded mode, the two look like this, with super even intermingling of tris:

JamesMaeding_0-1687286198620.png

 

The management of heavy data has been the biggest struggle I have seen with surfaces.

I think all civil progs will adopt this method of simplification, its just a matter of who does first.

Carlson may have already. They use the PCL library so have their eyes open and are active.

Its a low hanging fruit adesk should grab for Civil3D.

 

TimYarris
Autodesk
Status changed to: Under Review
 
CivilFlow
Advisor

Adding this would be a game changer. @TimYarris please consider the above as it makes complete sense to me that an in Civil 3D app focus is what C3D design users need. Many thanks.

JamesMaeding
Advisor

BTW, I realized the guy who wrote the library I use, geometry3Sharp, at:

http://www.gradientspace.com/opensource 

also wrote meshmixer, yes, AUTODESK meshmixer, lol!

So they have the author of a major mesh manipulation engine in their pocket, and are "considering" implementing it.

Something tells me this is not a technical issue going on, but an administrative approval by a manager who is not so technical. Surely the civil3d team would be licking their lips with such surface manipulation at their fingertips. Hopefully they have not lost their appetite for non-incremental improvements.

 

hfcandrew
Advisor

Yes classic autodesk. Taking years to add tools/functions that they actually already have.

 

Ryan Schmidt has put soooo much power under the hood in his Meshmixer, which not being utilized/incorporated into Autodesk's paid programs: http://www.rms80.com/meshmixer-r2

 

Similarly I have had numerous emails and a meeting with the Fusion360 team over the last few years to get them to implement Meshmixer's 'smooth boundary'  + 'Soft Transform' tools. Since as per their website Meshmixer is now incorporated into Fusion360. Yet still on a daily basis I see forum posts about needing to modify an .stl and people not being able to do it in Fusion360 and these tools would solve it...

 

In the meantime though, for those reading who this workflow may apply to; Meshmixer has a very effective reducing tool for triangulated meshes: https://help.autodesk.com/view/MSHMXR/2019/ENU/?guid=GUID-54087649-E962-409E-8565-F646BDA80B33

JamesMaeding
Advisor

@hfcandrew 

Very interesting. I've known of meshmixer but never used it. Maybe once to watertight an stl I grabbed from somewhere.

The funny thing is, the hard part of adapting the library to point clouds is splitting the point cloud into chunks (rectangle areas of coverage) small enough to not overwhelm memory. Then you loop through them, make the surface, simplify, extract reduced tri verts, and discard the points in memory.

Then assemble all reduced points into one surface at the end and triangulate.

You don't have that problem with tin surfaces you already have, they won't have more than a few million tris typically. Oh wait, that is my world, I forgot. Everyone else is stuck with whatever they get, or run through c3d simplifier if you can get it to not lock up. Anyway, thx for your reply as I don't know fusion360 that well since I can model anything faster in acad and I don't need cnc gcode output, just stl.

hfcandrew
Advisor

Ya gotcha. Stuck between a rock and a hard place.

 

I use Meshmixer to directly modify scans of human anatomy to design custom orthopaedic bracing, insoles + devices. No other CAD software can do it this way; under the hood all other software resorts to wrapping an approximate surface of 'best fit', then designing parameters from there. This results in fit issues, so if you want accuracy, you need to use the scan itself.

Apparently this rectangular/square approach is kinda how Meshmixer functions for some of its tools:

I spent a lot of time thinking about how to combine multiresolution SubD quad meshes and dynamic triangle meshes. A big limitation was that the Meshmixer sculpting engine would get blogged down once the mesh had a few hundred thousand triangles. Not enough to hit Mudbox-like detail levels. However in December 2011 I released an update that was vastly faster, to the point where millions of triangles could be sculpted at a reasonable framerate. 

The big optimization: using display lists instead of drawing triangle-by-triangle each frame. (Modern OpenGL coders are screaming right now - display lists! in 2011!). But, a mesh with edge topology that is changing every frame has very different constraints than even an animated static mesh. Since you can't tumble during a sculpt stroke, I also clipped the repaint region to the square around the brush.

 

Meshlab has some good point cloud decimation/reduction too.

Instantmeshes too: https://www.youtube.com/watch?v=aMZKgzBpodI

 

Lots of 'inspiration' to choose from for Autodesk to implement some sort of workflow.

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea