Collision from Displacement Material

Hi guys,

I’m trying o make a landscape from an Heightmap, the Landscape Tool is not in the Blueprint so I’m trying to do that using the WorldPositionOffset or the Tesselation. It works well to generate the landscape but the collision are still a “plane”, I’m walking throught my landscape. Is there a way to collide with my Offset Ground?

Thanks

Thank you for your answer but I want to generate the heightmap when the game begins, is it possible to move the vertices of a mesh depending on a texture (in Blueprint) ?

No. Tessellation and world position offset happens purely on the GPU. The game physics cannot interact with it. You will need to use the regular landscape tools in UE4 if you want collision to work.

You’ll need to generate (or modify) some kind of procedural mesh using the heightmap. I’m not too familiar with the terrain tools, so I don’t know if this can be done completely at runtime from Blueprint. I know it’s possible from C++, though. It’s probably not a good idea to try to do this completely from Blueprint on players’ computers, because it would probably be very slow.

That’s not entirely correct, landscapes have a “Bake Material Offset Into Collision” checkbox option that can be used to update collision based on the materials’ World Position Offset (z axis only). It won’t dynamically update collision but if it’s static it should work fine.

2 Likes