Let's say I have a terrain mesh of some triangles, and several smaller meshes which I want to add to that terrain mesh (think ground and some small mounds or berms for example). What would I look for to find algorithms to let me do this? I know it's like some kind of computational geometry but I wonder if anyone might know search terms or even better urls to look at. Ideally I would like to do this on the fly to simplify drawing of a terrain where the basic ground and the detailed "interesting" bits are stored separately. Right now we draw the ground and the other parts separately which is less than ideal.

When you say overlaps what do you mean? Like visual problems? It shouldn't look any different than just drawing thing separately. I wouldn't recommend taking a heightmap-style terrain and physically cutting it up to insert details. You'd get a lot more triangles out of the end result when you could just doing a naive batch and eat the overdraw.
–
Tetrad♦Jul 20 '11 at 20:22

I think he's looking to 'merge' terrain features into the terrain mesh, so there's no 'visible' separation. Which would be very difficult, high processing cost and you'd have a tricky time with texturing.
–
dcousensJul 21 '11 at 3:22

This is why we place doodads right? That's how most games does it at least.
–
NailerJul 21 '11 at 13:25

1 Answer
1

I think the term you are look for is CSG, or constructive solid geometry. There are basically three different operations: boolean union, boolean intersection, and boolean difference. You need the boolean union to merge two overlapping meshes into one. I'm sure you'll be able find some useful information with those terms.

I'll take a look, thanks. I also thought later than one could do a delauney triangulation on all the points, then re-add the height values. I think this might work since this is terrain type things I am merging.
–
ahwulfJul 21 '11 at 16:22