Physics mesh for terrain

Hello All

I have had a test of the platform and looks ready good, however I need to have an “outdoor” environment, so will need terrain, as a height map, or even a 3d mesh.

I have done searches on the forum and google, but nothing , seems strange that the platform has support for so many things and no 3d mesh, for a “ground”.

I must be missing something if anyone and point me in the right direction Would be very helpful thank you .

Xenko doesn’t really provide to many assets out the box as far as terrain mesh one would have to be created in a 3D editor if not scripted depending on how your going about creating your environment.

1 Like

Hello M0TH thanks for your reply ,

I can create a terrain model in a 3d editor, I guess the question then is how to apply physics to it, can’t really use a convex hull, due to the “shape” of the model and I can’t see a mesh option for in the physics, only the primitives and convex hull.

I understand Xenko uses Bullet , are we able to use btBvhTriangleMeshShape and access our model to pass the Bullet Physics, or is this disabled ?

Thanks All

If it’s not there, it would be a nice open source contribution. Do you have c# coding skills to add it to the engine?

Thank Tonfilm, for your reply.

I do have some c# skills, but they would be insufficient to correctly implement, something in to the engine, and ensure that implementation is done correctly and optimized correctly.

When I have some more spare time, I may be able to revisit import of a model and create a static TriangleMeshShape as a “ground”.

Not looking for a full blown Terrain system like Unity, just a mesh ground.

Thanks Again.

Here is where I am at with this project (special stage) pretty much my overall goal is to make it to where current blocks are highlighted as a different color set (character walks into the color set) then enemies spawn.

After enemies are defeated character has 5 seconds to leave the color set before a color set is deleted and so forth.

Also removing any height terrains (ideally Ill be able to mix and match to spawn at different height levels.

What I want to do also is get the blocks to generate on a predefined track using some type of drawn image to project. ex: jpg doc will have a line draw on it so the game will project only that line with voxels.

1 Like

Hi, M0TH

Looks like fun idea and well done with your work so, far.

Looking to do a more natural / real life terrain for a sim outdoors.

Hopefully will be able to review the height map , Mesh options, late next week.

Thanks Astro

Cool beans can’t wait to check it out.

Hi! So, has anyone successfully setup physics mesh for terrain? Now my attempts on generation convex hull shape and setup fails. Anyway would be great to get some tips what to research for creating collider with custom shape in code :slight_smile: Thanks!


I also have this desirement, in the projects I’ve worked and to get around this with Xenko (I don’t have elaborate map requirements) I’ve built the maps modular using prefabs so that I could piece them together with hull colliders and then “assemble” the map with static physics/hull colliders. My style though is isometric and are trivial enough that ramps, hills, mountains work. The real work of it was ensuring the map was modeled this way originally (not a single mesh).

Hopefully in the future this capability becomes a reality for Xenko.

The mesh should be used as collision, it’s a feature most 3D physic engine has.