MeshModel needs a way to update if the bounding box updates


When making dynamic models you should specify the bounding box properly or you can get various artifacts like incorrect culling (in particular planes disappearing at odd camera angles) and shadow issues (weird rectangles cutting off shadows)

One issue is that the MeshModel node (Also used within DynamicMesh node) sets the bounding boxes of the model within a cache region, which is triggered by the mesh updating.

This will not trigger if you update the bounding box of the mesh.


The model should update its bounding boxes when any child mesh bounding boxes are updated.
I’m not sure of the best way to detect such changes…


Simple workaround is to add a force pin on the MeshModel cache region, and then the programmer making the dynamic model monitors upstream for changes that would affect the bounding box.

VL.Stride.ForceUpdateMeshModel.vl (25.1 KB)


1 Like

hey toby, thanks for bringing this up.

we made a few changes here:

  • DynamicMesh nodes now return a new mesh, when their BoundingBox input is changed. this should already fix your actual issue
  • DynamicMesh nodes got optional “Force Update” input (since they don’t check for a changed on their incoming data)
  • in addition we added optional “Force Update” inputs on all nodes that take meshes as input (MeshDescription, MeshModel, MeshesModel, MeshEntity, MeshesEntity) because there can still be cases where the incoming (mutable) mesh changes and those nodes cannot detect those changes automatically
  • the MeshSplit nodes now also react on a changed mesh and in turn have their “Force Update” inputs also false by default (was: true)