samedi 4 septembre 2021

Design Pattern: Displace a surface with all the other elements on it

I'm trying to create a map (region of the world) that would have height displacement. Simple on its own. But I also wanted to have additional elements on top of it: lines or shapes (for borders), text, perhaps some other objects. My naive approach was to add every element to a plane mesh (planeMesh.add(stripMesh)) and then use a displacement material on that plane, hoping that everything else would follow, because it lies on said plane. Needless to say, it didn't quite work out.

At this point I'm not sure how to approach this problem. Surely there's a better way than applying the same displacement map to every other element (while also calculating necessary offsets time and again)?

Red strip added to plane does not follow plane's displacement

Aucun commentaire:

Enregistrer un commentaire