Re-apply texture to mesh?

Hi there,
I’m creating a large scene with downloaed topographic meshes. These are really messy and contain a lot of vertical faces for example. As there are more parts of this coastline and even in this are already some hundred meshes, I’m looking for an way to automate the process of deleting stuff. I have managed to create a defiinition to delete the vertical faces that are below the surface. But how do I reapply the texture or maintain it on the surface?
Still learning with Grashopper… And if someone can tell how to upload larger screenshots…
Thanks !!

No one here?

Well … if - per disjoined Mesh - vertical faces (or Faces where their Normal VS the Plane.WorldXY.ZAxis angle is within some user defined Interval [say +85 to +95 [in degrees]) exist this means that an Edge has 3 adjacent Faces (BTW: non manifold Mesh) … so removing them is an entry level EF Connectivity thingy (no matter if they are “above” or “below” the good Mesh Faces).

All that in theory (that has rarely any relation VS reality). This means that if your Mesh is bananas > bananas is what you’ll get.

For the texture matter … is also easy but all my things are carried over solely via C# code (i.e. not a single component on sight). If you think that such a solution has meaning to you … provide a “small” test case (or better: several) in R5 Format.

1 Like

Hello Peter,

that’s very kind. Thanks so much.
There are some holes in the ocean mainly which I noticed.
Please find attached two files in R5 format and my GH definition in case it helps a bit.
Test 1 Peter.3dm (4.5 MB)
Test 2 Peter.3dm (13.1 MB)
Clean (9.9 KB)

I’ll take a look as soon as possible.

BUT … if removing Faces yields holes … well … all my C# stuff related with “any rational/good looking healing” is strictly internal thus I can’t post anything related with that matter.

No problem. I can close the holes easily by hand.

BTW: the N2 (13mB) file is not in R5 Format … so let’s stick to N1: You mean that you want to “clean” the Mesh from … er … things in order to get only the Terrain ???

If yes … well … that requires SEVERAL lines of code (ideally a “learning machine” oriented solution).

Yes, only the terrain…
Is that possible or too much work?

Accidentally I saved the 2nd file as R8…
Test 2 Peter.3dm (19.2 MB)

Your profile sounds quite interesting…

Is possible … but requires rather too much work that may had a meaning if you had a vast N of Meshes day in day out (and Elon paying - perfect things have a certain price). For instance when a computer “sees” this:

he may thinlk that all are OK (and indeed the wall on the left may (or may not) be part of the terrain). But … there’s &#&#& cars (no proper Porsche on sight mind) mixed with car sized little rocks (and numerous other things):

Moral: I would stronly suggest the obvious

The cars and the other stuff is later almost invisble. Fine if they are only coloured spots. The walls and rocks should be there of course.

What do you mean by your suggestion?

You know it (but hope dies last) : do it the good old way: manual.

For instance imagine the amount of code (and the tests … and the other tests … blah, blah) in order to teach the idiot (the computer) about what is a tree (requires a Recursive “expansion” for a given “vertical” face following various freaky rules: for instance the top part of a tree … may look like a Terrain … but is a tree because has faces with slope > 90 plus has a %##$ trunk).

Oh sh… :smile:

Precision is not the goal. The terrain can be modified a lot, it’s just a background picture. Just the overall look should be maintained.
Just if it changes anything…

Since we share some common interests (for me: ultra fast powerboats [but I hate cats] for you: yachts) think the situation as follows:

You find an used - in so-so state - Cigarette TopGun in some very good price.

But the thing has engines … prior the Audi/Merc marriage (i.e. crap stuff). Plus it has old Arnesons (i.e. crap stuff). What to do? Attempt the stupid thing or go after some proper case? (at a price).

This means that in some cases … never take the long way home.

I like the Cigarettes or similar as well, personally I’d not have one but just for the technical aspect they are interesting to me. The cats really seam not to make a lot of sense for private offshore boating.
I like when boats can be used for something else than just to go fast. I want to get to nice places with some friends and not have a very rough ride with only a second person and no stuff to take with me.
But privately I’m more into sailing boats anyway. And then I like Cats.

I think I may try the simple way and test out the file size is without any editing.

Thanks Peter

Mama Mia! What’s next? A Toyota? A Scooter? Or a Harley Davidson?

Anyway … get the attached (existed C# that one). May (?) reduce your time for deleting Faces. First get the gist of what if does (notably with regard disjoined this, disjoined that) and then …

Using a demo Mesh from Planet FutureEarth (where houses look like trees [and there’s no trees]). (254.4 KB)

BTW: healing a Mesh hole is not a task for novices (nor R provides any Method worth the name - but as PlanZ you can try K2 if the bazooka/mosquito is your thing).