Search code examples
c#3dclipping

SceneNode changed positions get ignored while camera gets moved fine


I'm animating a model while moving around it with a camera. The animation is in a loop.

After a while (sometimes almost immediately, but mostly after a minute or two) the camera keeps moving just fine, while the model's scenenodes stop moving. Inspecting the scenenodes' properties show that their positions are updated, but they aren't rendered. To make things even stranger: toggling a scenenode's visibility workes fine still.

I have absolutely no idea why this is happening. Any advice is greatly appreciated.

-- Edit: I thought this was caused by me updating the camera's nearclipdistance. I set that to a static value and that didn't solve it.


Solution

  • I found the cause for this problem. The scenenodes were manipulated by multiple threads. When a scenenode was manipulated while a scene was rendered, an unreported error occurred, stopping rendering. Marshalling all manipulations to a single thread solved the problem.