Clear Filters
Clear Filters

Simulink animation rendering: custom view point

2 views (last 30 days)
I have a simple building with a hallway and a custom viewpoint created. Currently when I try moving down the hallway in my simulation, the walls on either side of the viewpoint will disappear and I am able to see into the rooms through the walls. When I hit the straighten up button at the end of the simulation the walls reappear and I can no longer see into the the rooms.
How do I fix this graphical error so that when running the simulation the walls do not disappear?

Answers (2)

Sathish Kumar
Sathish Kumar on 1 May 2012
The rendering problem is due to the direction of the normals on the surface. Initially there was proper rendering of walls because the camera is on the side where the normals are pointing the wall is visible. But from the other side of the wall the normals are on the opposite side and the wall appears invisible. This problem can be solved by creating another wall close to the current wall with the surface normals in opposite direction. Now the wall is opaque from both sides. But when the camera is positioned between the walls, the walls will still be invisible.

Jan Danek
Jan Danek on 25 Jun 2012
Another reason for your behaviour can be near object clipping. If you want to assure that all objects 0.05m and farther are displayed at all times, include the NavigationInfo node in your scene, with the following values:
NavigationInfo { avatarSize [0.1, 1.6, 0.75] }
Near clipping pane will be fixed to 1/2 of the first AvatarSize element. See also:
Hope this helps,
Jan
  2 Comments
K E
K E on 26 Jun 2012
Just curious: What kind of Simulink applications would VMRL be useful for? A vehicle driving within a building?
K E
K E on 27 Jun 2012
To answer that question, a google search (VMRL Simulink site:www.youtube.com) pulls up animations like quadrotors navigating a room, a gantry crane, etc.

Sign in to comment.

Categories

Find more on Simulation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!