I create a terrain model (fbx) by displacing a 256x256 mesh with a 512x512 heightmap image. When I create a bepu terrain entity using the same heightmap image, I can't get them to orient or scale properly.
Can you help with the relationships between the two items
GGB
FBX and BEPU
Re: FBX and BEPU
The position of the BEPUphysics terrain is at the -X, -Z corner. If the goal center of the terrain is (0,0,0) and your terrain is 256 units (not triangles) across, then your position would need to be -128, 0, -128.
When you call setData on the terrain, you pass it the separation distance between vertices along the X and Z axes. Higher separation values scale up the terrain.
You may also find that per-quad triangles in the terrain are organized differently between the physics and graphics. When calling terrain.setData, you provide a QuadFormats option; try choosing the other QuadFormats option and seeing if the triangles agree.
Finally, the terrain does not currently offer orientation support. If arbitrary orientation is desired, consider using the StaticTriangleGroup instead.
When you call setData on the terrain, you pass it the separation distance between vertices along the X and Z axes. Higher separation values scale up the terrain.
You may also find that per-quad triangles in the terrain are organized differently between the physics and graphics. When calling terrain.setData, you provide a QuadFormats option; try choosing the other QuadFormats option and seeing if the triangles agree.
Finally, the terrain does not currently offer orientation support. If arbitrary orientation is desired, consider using the StaticTriangleGroup instead.