Why does my animation sometimes get partly blacked out during simulation

Illustration
hana - 2021-08-14T14:31:08+00:00
Question: Why does my animation sometimes get partly blacked out during simulation

Why does my animation sometimes get partly blacked out during simulation in Simulink 3D Animation 5.1 (R2009b)? I find that my animation is blacked out during the simulation and I need to manually change the viewpoint in the browser to re-render the missing portions.   I would like to change the viewpoint in the animation during the simulation dynamically.

Expert Answer

Profile picture of John Michell John Michell answered . 2025-11-20

The reason for parts of a scene not being rendered could be because of near/far clipping that is automatically performed by the default Z-Buffer algorithm. In order to control clipping, you can explicitly define near/far clipping planes. This is done by including a 'NavigationInfo' node in the scene. Refer to 'vrterrain_sanfrancisco.wrl' in the sl3ddemos directory for an example. This is how the node features in the VRML file for the virtual world:
 
 
 NavigationInfo {

   visibilityLimit 100000

   speed 1000

   headlight FALSE

   avatarSize [10, 1.6, 0.75 ]

 }

In the above example, 'visibilityLimit' defines the far clipping plane. A large value assures that all objects that are closer are visible. The near clipping plane is set to 1/2 of the first component of the 'avatarSize' field. Hence by setting the 'avatarSize' value to 10m, we are setting the near clipping plane to 5 m. For more information on Binding nodes such as the 'NavigationInfo' node, see the VRML97 standard:

 <http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/nodesRef.html>

There is another resource with annotated VRML Documentation that is available in the URL below.

 <http://accad.osu.edu/~pgerstma/class/vnv/resources/info/AnnotatedVrmlRef/ch3-329.htm>




Animation is cached during model simulation. What you see when you run a simulation is the animation playback, unless the simulation is slower than the animation caching. In that case, the animation goes no faster than the simulation can produce the cache.

Once a partial or complete animation is cached from simulation, starting the animation again plays back the cache, without running the simulation a second time. You can move backward and forward to any time in the cached animation.

The animation cache is stored until you close Mechanics Explorer. When you simulate the model, the cache is updated with new animation data. To create a permanent record of a model animation, you must create an animation video


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!