Mesh, T-splines, and Topography.

Mesh, T-splines, and Topography.

jason.parras
Enthusiast Enthusiast
2,030 Views
22 Replies
Message 1 of 23

Mesh, T-splines, and Topography.

jason.parras
Enthusiast
Enthusiast

A little while back, I invested in a hobbyist CNC machine and have been learning a bit of Fusion 360 for design and CAM. Well of course the YouTube algorithm picked up on this and inundated me with videos from people with far greater knowledge, experience, and hardware. None the less, I saddled up and thought I might give a project that interested me a try. Enter, topographical maps.

 

After watching about 20 different methods of getting height map data into usable three dimensional models, I settled on the Blender 'plane diffusion height map method' for that beginning phase of the workflow. This left me with beautifully detailed, truly astonishing models by my standard of literally having downloaded Blender only hours before. I exported those thick .stl files, confident that Fusion would throw me a curve ball or two, but nothing I couldn't handle. It was around this time I learned about triangles and Fusion's fairly strict under 10,000 faces policy.

 

Fast forward a year, hours of videos, forums, trial and error, even a brand my first child, and I still cannot get Fusion to give me a T-spline for CAM that I am satisfied with. I've done other projects to keep me fulfilled but I keep returning to this. Recently, I've used @TrippyLighting's method through InstantMesh to provide pure quad models and they either come out looking like ice cream at various stages in a microwave or Fusion out right folds it's arms and locks up during some point. Even when I get to the incredibly close moment of the convert mesh to t-spline stage, I am met with daunting "repair" requirement; a task by the way that is by far the most consistent and fastest way to freeze Fusion for literally hours. In the few times I've gotten a model small enough, and consequently one with too little detail for me to use - but I pressed on to see if I could at least get something to work, Fusion kindly reminds you that meshes are not in fact t-splines and therefor the "repair" option in utilities is useless because the mesh object before you is unselectable and therefore unrepairable. Either that or I'm missing something and it's a task that takes about 20 minutes to attempt each time.

 

At some point I went back to Blender, as a reminder, a program I know even less about. I tried different methods for generating topography including a GIS plugin that apparently pulls in height maps and terrain like magic. As a small aside, I even had to edit some... python? through... notepad++? to increase the size of the height map attainable by this plugin. I include that last bit to punctuate the point, if I hadn't made it clear by now, that I have no clue what I am doing. And alas, no luck there either. The models either lose their stark detail and rigid terrain features making everything soft rolling hills, or the model complexity is just over the threshold of what Fusion is willing to entertain and again crashes or otherwise fails at some point.

 

I understand that my problem is equal parts a lack of knowledge and too high of expectations for a project but I thought I'd reach out to this community of experts to see if their is a better workflow for this sort of project by now before I spin my wheels any further. The models I am working with have face counts well over 50,000. I'm fine with trying to reduce the face count but I have so much information in such a large grab of terrain data that I can't seem to make a model with a happy medium between detailed and realistically usable. I don't want to CNC a coaster sized 64x64 quarter inch high map. I want to carve a decent sized piece, maybe like a 12" radius to start of say... Hawaii or some other little coastal paradise. Is that too much to ask? Do I need to pony up $500 for something like MeshCam? Do I need to enroll in night classes for Fusion? Do I need a coffee? 

 

The answers to these questions may never be known but I had to reach out. The Autodesk community has always been helpful and enlightening and I greatly appreciate anyone that took the time to make it though to the end of this post.  

 

TL;DR: Fusion hates Mesh, my STL models are too large, the other workarounds either crash or lose too much detail.

 

As a token of my appreciation, look at this completely unusable pipe dream of model of Hawaii that despite being simple to make in Blender, I am quite fond of it nonetheless:

 

I'll never give up on you...I'll never give up on you...

 

0 Likes
2,031 Views
22 Replies
Replies (22)
Message 2 of 23

TrippyLighting
Consultant
Consultant

Can you zip the Blender file and attach it here?

 

I have successfully converted quad meshes from Blender with well over 200k faces!


EESignature

0 Likes
Message 3 of 23

jason.parras
Enthusiast
Enthusiast

You certainly know a great deal more than I. I did my best to follow your tutorial to the T, more than a handful of times, and I keep hitting a wall once I get to Fusion. I appreciate you taking an interest. Should you be successful in getting this model to play nice, I'd love to be able to replicate it so I can try this with other locations. Attached is a, let's call it Medium quality .obj and .stl of the same model exported from Blender. 

0 Likes
Message 4 of 23

TrippyLighting
Consultant
Consultant

For whatever reason repairing a mesh consistently crashes Fuoisn. I've tried this with 2 totally different examples from the forum and each time I try to repair a mesh FUiosn 360 crashes.

 

@Phil.E @jeff_strater I can probably provide more data/models if needed. This totally breaks the InstnantMeshes workflow except for the very simplest meshes.


EESignature

0 Likes
Message 5 of 23

jason.parras
Enthusiast
Enthusiast

While that certainly isn't good news, I take some solace in knowing I'm not entirely inept! I'm currently watching YouTube videos while Fusion is on its third attempt at a mesh repair just in case I stumbled upon it working. I'm glad you've replicated one of the failure points I kept hitting.

0 Likes
Message 6 of 23

TrippyLighting
Consultant
Consultant

In a divide and conquer approach the first battle has been fought and won with some losses ... in detail, just to save my nerves when experimenting.

 

To be continued tomorrow!

 

TEST.png


EESignature

0 Likes
Message 7 of 23

jeff_strater
Community Manager
Community Manager

yes, please, some sample models/screencasts would be good.  I'm not sure what "repairing a mesh" refers to here...  What mesh operations will cause the crash?


Jeff Strater
Engineering Director
0 Likes
Message 8 of 23

TrippyLighting
Consultant
Consultant

.stl and .obj files are unitless. What size do you want for the end result to have ?


EESignature

0 Likes
Message 9 of 23

jason.parras
Enthusiast
Enthusiast

Perhaps somewhere in the neighborhood of 150-300mm?

0 Likes
Message 10 of 23

jason.parras
Enthusiast
Enthusiast

When importing .stl files with the intent of converting them to t-splines, Fusion360 will often run into an error and recommend repairing the mesh. The repair command is located with capture design history activated through Create Form -> Utilities - Repair Body. Running this command will bring up a prompt to select your half complete T-spline and then ultimately crash.

0 Likes
Message 11 of 23

TrippyLighting
Consultant
Consultant

The "thing" is though that once exported out of Blender this should not have to be repaired.

What I did ni Blender is to use "Merge vertices -> by distance" to remove any possible duplicates.

The more important issue to recognize is that the conversion into a T-spline works best with somewhat regular-shaped quad polygons.

This particular object, however, the "corners" contains very long, thin polygons. Thus I removed those.

I also reduced the mesh resolution just so I don't run out of patience when Fusion 360 converts this into a T-spline and then Surface. Even at that reduced resolution, this results in a mesh with 189k polygons. It takes a couple of minutes to convert, but it does that just fine, without having to repair the T-spline (mesh) in FUiosn 360.

 

I have yet to test this with the original resolution at 771k polygons.

But then I question the need for such a high resolution. If you use a high-end resin 3D printer you might be able to pull that level of detail of, but definitely not with a CNC machine. What is the size of your smallest ball end mill?

 

@300mm x 300 mm and 1024 x 1024 original resolution that makes every face 0.149mm in size.

The image below is reduced resolution by factor 2. Would that work for you ?

 

Landscape.png

 

Here's the public link to the design.

 

 

 


EESignature

0 Likes
Message 12 of 23

jason.parras
Enthusiast
Enthusiast

I attempted the Merge Vertices command which I learned had replaced the remove duplicates command but it created divots in the model in certain sharp areas. I presume playing with the distance at which it should be merging would alleviate that but the more I changed that value, the more divots appeared so I aborted that. I don't require anything with such a high resolution for my production needs in so much that I just happen to have created a high resolution model and I'm unable to trim it down due to lack of knowledge. My finest end mill is a tapered R 0.5mm  bit but it is more for engraving and not something I need to use for this. I feel like a great deal of the face count could be reduced in Blender by removing the flat areas which I am working on at some point today. Honestly, the face count is inconsequential to me, it's just that through all the reduction methods I tried, I kept getting overall incredibly smoothed out terrain rather than that sharp and dramatic appearance that is truer to the characteristics of that actual landscape. I hope that makes sense. Your model currently looks amazing and if it works for Fusion, I'd be more than happy with it. Your help even thus far is greatly appreciated.

 

As an aside, I grabbed the Alpha build of Blender 2.9 which has a multi-resolution modifier. I am going to attempt using that after posting this but I thought I'd mention it to you given your greater experience. Perhaps it will be a new solution for these and other mesh to Fusion issues?

0 Likes
Message 13 of 23

jeff_strater
Community Manager
Community Manager

OK, now I'm even more confused...  STL is a triangle mesh format.  You cannot convert a triangle mesh to T-Splines.  So, there has to be an OBJ quad mesh in there somewhere.  I do understand, now, that the failure is in the T-Splines repair  command is useful to know (I thought this was a problem in the mesh environment).  Do you have a sample OBJ quad mesh that causes this failure?

 


Jeff Strater
Engineering Director
0 Likes
Message 14 of 23

Phil.E
Autodesk
Autodesk

Hi @jason.parras , neat model and interesting post.

 

I noticed you mentioned crashing and searched for your CER reports. Unfortunately I found none related to this. Do you get a CER dialog when you've been crashing with this project?  





Phil Eichmiller
Software Engineer
Quality Assurance
Autodesk, Inc.


0 Likes
Message 15 of 23

jason.parras
Enthusiast
Enthusiast

Typically, Fusion will actually just hang for about 30 minutes to an hour and I'll force quit. The one time I got a crash report I must admit I did not submit it because I am a bad user 😞 I actually was just eager to try again and rushed through the error screen. Should I have it crash again, I will certainly fill out the report and submit it.

Message 16 of 23

TrippyLighting
Consultant
Consultant

@Phil.E @jeff_strater sorry for the dealy!

Attached is a .obj file, which exhibits the crashing issue.

This is a quad mesh generated by some form of utility such as this one.

I reduced the polygon count substantially in Blender by using the decimate/un-subdivide modifier (level 4).

 

1. Insert mesh, as usual.

2. Create new form

3. Covert quad-mesh into T-Spline. It converts into a smooth T-spline which usually means it's OK. 

4. Click on finish form and it will complain about possible coincident vertices.

5. Click Return

6. Pick Utilities-Repair Body

7. Select mesh and then select Auto repair. It'll take a while for the labels to appear.

8 Click OK leads to crash after a little calculation time.

 

If the problem areas are removed from the t-spline it'll convert just fine into a surface body.


EESignature

0 Likes
Message 17 of 23

jeff_strater
Community Manager
Community Manager

I downloaded the file "Hawaii_all_ocean_med_res.obj" from this thread.  It is a quad mesh,  but it is massive.  85MB on disk.  See the screencast below as I zoom into this mesh.  I'm not sure exactly how many quads are in this mesh, but Meshmixer reports it as 1.4 million faces (not sure if that is 2x high, because MM only deals with triangles, and may have triangulated this mesh).  Whether it is 1.4 million or 700,000, the point is this is an extremely large mesh.  Converting that to a T-Spline will most likely succeed, but 30 minutes may be just a fraction of the time needed for the conversion.  And the resulting T-Spline will be very challenging to deal with, TBH.  We'd certainly need a much simpler version to successfully work with the results in T-SPlines.

 

@TrippyLighting - you mention crashing in this workflow.  Do you have other, smaller OBJ meshes that actually show a crash (as opposed to a force quit)?  @Phil.E and I are just trying to figure out whether there is a crash here to investigate.


Jeff Strater
Engineering Director
0 Likes
Message 18 of 23

jeff_strater
Community Manager
Community Manager

OK, I guess we crossed paths there...  Yeah, that humongo mesh is never going to complete.  We'll look at the smaller mesh.


Jeff Strater
Engineering Director
0 Likes
Message 19 of 23

jason.parras
Enthusiast
Enthusiast

Don't you give up on that mesh!

0 Likes
Message 20 of 23

TrippyLighting
Consultant
Consultant

@jason.parras in that circular form/shape in any resolution, this mesh is unlikely going to convert.

For future projects, I'd recommend resorting to a rectangular mesh. If you need a circular or other shape, then first convert the rectancular mesh into a T-Spline and then surface body and then maybe solid. Then cut it to a circular shape.

 

I provided this reduced mesh so the 2 of Fusion 360's finest who participate here can track down the crashing issue.

That does not mean there's nothing wrong with the mesh.

The reason I got it to convert is to trim off the problematic "corners".

 

You can see in Blender, or in Fusion 360 that in these red circled areas the rectangles become increasingly stretched and that is not only where the conversion fails for purely mathematical reasons, but also where the reason for the crash is somewhere.

 

Screen Shot 2020-05-19 at 8.01.26 PM.png


EESignature

0 Likes