How to Change Color to All Mesh sections in a loaded Mesh Terrain

Hi, I hope someone knows some way to do this with relative ease

Basically I loaded an AutoCAD TIN Mesh, loads fine, looks fine, then I load a second one and i cant tell where one ends and the next begins because they are both gray color.

I have to compare both terrain meshes against each other so i can visually see the differences in distance between the meshes and where, having separate colors would greatly help this.

I tried selecting all meshes with the digitizer and right clicking then selecting edit features, but I get an error saying I cannot edit multiple meshes.

If I edit one triangular facet of the mesh at a time, it works just fine, color changes no problem, but each terrain is comprised of 5800+ individual triangles, manually changing the color of 11,000+ meshes is a nogo situation, there has to be a way to do this in an automated way.

Anyone have any ideas? maybe a way to combine the whole set of individual triangles into a single mesh? I'm stumped.

Any help would be appreciated.

Answers

  • Hi @XionicFire

    Any chance you could post your data sets or a small extract from both?

    Ta,

    /al

  • Sure Thing!

    I manually colored 9 pieces of every section of the road (45 total), that's what you see in this image, as you can see I can color them just fine, the problem starts when I try to do more than one at a time, and as I said just doing these 45 pieces took a little over 2 minutes, and the whole highway is over 20,000, so manual work is definitely out of the question.

    Since its ALL the pieces in the layer that need changing color I'm guessing maybe a script can do it? (define all objects, index, select object one, change color to X, next object, loop or something like that) there has to be a way, its odd Mike and the crew would not allow multiple mesh selection for something simple like colors or a way to merge all selected mesh pieces into one object, but I guess its rare enough no one had seen a problem with it until now.

    The problem really is AutoCAD (the root of all my headaches), instead of making one large mesh object it just makes thousands of individual triangles so changing them becomes a pain, when exporting terrain it does do one large object but apparently 3D objects it just spits out every piece of the model individually.

    I do have the original DWG cad file from where this came from but I'm not sure if there's any settings on AutoCAD I can change before doing the DXF export that would change this behavior.

    Ill add a GM package file with a piece of the road and colorized models so you can check it out.

    Umm apparently I cannot upload GMP files to the global mapper forum because its a dangerous file type? well that's interesting to know 🤣, here's in zip format.

    Ok apparently I cannot upload .zip files either, validation failed.. ill just upload a Dropbox link.

    https://www.dropbox.com/scl/fi/zyabee05jpg0uec8qtdnj/RoadModel-Sample.gmp?rlkey=0qcd6zi1pbta1gy2p3qjkkfo7&st=5kw5dqbw&dl=0

  • Seems Dropbox is being Dropbox again, if it doesn't work you can use this wetransfer link:

    https://we.tl/t-6QnejjZfcB

  • 946
    946 Global Mapper User Trusted User

    Hello,

    I would do like this:

    1. Transform each layer loaded in GM from mesh to 3D Area.
    2. Select colour for each resulted 3D Area Layer as you need.
    3. Select Areas from each Layer and transform back to mesh.

    Result:


    Or do this maybe it will help your your analysis:

    Create like 10cm resolution 3D Grid from each input dxf.

    Result:


  • Thanks for the help. converting it into a 3D Area seemed to do the trick, didn't know t hat option existed under the layer command

    Now another question, Its still a bunch of disconnected pieces, is there any way to merge them all into a single 3D model "piece"?

  • I tried the obvious, using COMBINE areas but it just.. did a mess haha

  • Ok so... I kind of got it to work... I don't think this is the optimal method but ill post it here in case anyone has the same problem. any suggestions on improving it are welcome:

    Step 1: grab your 3d tin mesh from AutoCAD and load it into global mapper

    Step 2: remove all the points and leave just the mesh (make an area around it, area selection, select all points/lines, delete)

    Step 3: right click the AutoCAD dwg file layer, select layer, create 3d areas from 3d models

    Step 4: export the model as a lidar vector file (you will see only little dots where the triangle intersections are)

    Step 5: select the lidar points and click on create 3D model from selected lidar

    Step 6: Select Alpha shape, put the alpha value as the farthest distance between your shape faces, for my terrain mesh was 5 meters, and hit OK

    Step 7: Enjoy, now you have a single piece 3D model with height, length and depth that you can now change the color to.

    I hope this helps others, that last create model from lidar was tricky, the first two options ended up in acid trip shapes, so took a couple of tries but it worked.

  • In case anyone wanted what the finished product looks like here's 3D image of how the assembled 3D parts look, its no 3DsMax but hey its GIS accurate, ill take it.