Vehicle Dynamics Visualization with Live Rear Mirror Image

This example extends the vr_octavia example to show the capability of the VR Sink block to process video stream on input.

In the virtual world, a VRML97 PixelTexture texture map is defined at the place of the vehicle left rear mirror. 2D image from a viewpoint placed at the same position (looking backwards) is mirrored and looped back into the same virtual world and projected on the rear mirror glass - creating an impression of live reflection.

Texture image can have different formats (corresponding to the available SFImage definitions according to the VRML97 standard), in this case we use an RGB image that has the same format as the output from the VR to Video block. Note that in the VRML file associated with the scene, it is possible to define only a trivial texture (in our case, a 4x4 pixel checkerboard) that will get resized during simulation according to the current size of the signal on the input.

Was this topic helpful?