Help with curve, ray, resample & copy to points workflow

   463   3   0
User Avatar
Member
10 posts
Joined: 12月 2024
オフライン
Hello,

Hoping for a little help with this one.

I have a google maps satellite image that I've brought into Houdini using EarthMesh (https://github.com/xjorma/EarthMeshHoudini) which is an amazing tool.

I've now started the process of attempting to 'fill out' the map by masking off areas and procedurally generating geometry to match what I see in the satellite imagery.

However, am running into a bit of an issue placing my roads down. I am attempting to get the road to follow the elevation of the map mesh so I used this:

- Draw a curve over the road
- ray the curve onto the map mesh
- resample the curve to the correct measurements for my proxy road geometry
- orient along curve to make sure the road pieces intersect properly.
- copy to points
- remerge onto original map mesh.

However, am getting some difficulty in making the road geometry actually 'meld' to the surface of the map mesh. It's elevated in points and intersecting at other points.

Any help or guidance would be awesome thank you



Attachments:
Screenshot 2025-10-13 201102.jpg (694.7 KB)
Screenshot 2025-10-13 201030.jpg (75.9 KB)
Screenshot 2025-10-13 201009.jpg (531.9 KB)

User Avatar
Member
393 posts
Joined: 8月 2018
オフライン
Projecting one mesh directly on to another like this is likely to have problems. If I understand your situation correctly, if you looked at a cross section of your landscape and road projections you're probably ending up with situations like this:

Two points of the two meshes don't match so when you project one on the other you'll get these bad intersections. Even if you could get one mesh perfectly projected on the other you'd then have co-planar polys that would be an issue.

You might know the old joke about the tourist who asks a local for directions. The local replies: ‘Well, if I were you, I wouldn’t start from here’. Ultimately probably a better solution would be to use Houdini's heightfield system and Copernicus for this sort of work - but that is a completely different approach.

With the mesh based situation, a couple of thoughts - and all this depends on the relative density and complexity of the mesh you're dealing with...

1. If you've got a relatively simple scene and it doesn't need to be 100% procedural, some direct editing with the edit tool in soft selection is probably easiest.

2. A little extrusion of your road mesh to give it some thickness and height above the landscape.

3. Rather than project the road onto the landscape, extrude it down as a solid and boolean subtract it from the landscape. You can then build a new road from those new edges.

I'm sure there are other approaches as well.
Edited by Mike_A - 2025年10月14日 09:36:31

Attachments:
mapRoadIntersect.jpg (27.6 KB)

User Avatar
Member
10 posts
Joined: 12月 2024
オフライン
Thank you Mike!

I'm glad to know that at least the approach I was taking wasn't flawed from an application point of view. I will only ever be dealing with smaller pieces of terrain, as this is kind of just something I'm trying to figure out, so your suggestions are really helpful.

I'll give the booleans a try - that might be the right way to go, or some basic editing of points will probably be able to get me what I'm looking for.

Appreciated.
User Avatar
Member
393 posts
Joined: 8月 2018
オフライン
Thinking about it, you'd probably be better off doing the boolean, but raying the original road down rather than rebuilding it. I've attached a very simple example.
Image Not Found

Attachments:
booleanRoad.hiplc (267.4 KB)

  • Quick Links