Article Number: 15 | Post Date: September 27, 2016 | Last Updated: June 5, 2018
Can I place a camera inside of a vehicle to show the driver's point of view? I would also like to study lines-of-sight. Is that possible in Virtual CRASH?
Yes. In Virtual CRASH you can place a camera anywhere in a scene. You can attach the camera to a moving reference frame, such as a car, and you can attach the target to a moving reference frame. You can also simply place the camera at a stationary location while attaching the target to a moving frame, or keep the target stationary while the camera is moving. In any of these situations, the process is straight-forward. Note, this process is reviewed toward the end of the Chapter 17 of the User's Guide. The ad video below shows an example of camera placement. The process for attaching a camera and target within this scene is explained below.
Note: Before starting, make sure the object to which you wish to attach a camera is not frozen or hidden in the project menu.
Attaching the Target to Vehicle A and Camera to Vehicle B
Let's suppose in the scene below, we want to show the view with respect to the blue car's driver, keeping the camera target fixed on the red vehicle. Here we may want to study line-of-sight obstruction, and try to get an estimate of how much time elapses from the moment the line-of-sight becomes completely unobstructed.
To create a camera, go to Create > Extended Primitives 3D > Camera.
Next, hover your mouse over the camera's target. This could just be a position in the scene's global space. Since we want to fix the target onto the red truck, we'll hover the mouse over the truck. The truck will turn light blue, indicating that this object will be selected for the target. If you want to fix the target in global space rather than in an object's space, simply hover your mouse over the desired position.
Next, left-click and hold your mouse button. Drag the mouse to the position to which the camera is to be fixed. Again, this could simply be a random location in the scene. In this case, we want to fix the camera to the blue car's reference frame. So, while still pressing the left mouse button, hover the mouse cursor over the blue vehicle. It will turn light blue. Once the vehicle turns light blue, release the left mouse button. The camera will then be attached to the vehicle object. If you wanted to fix the camera to a static position in global space, you simply release the left mouse button as your mouse cursor hovered over the desired location. You will also see a preview window appear.
Select the camera object in the left side control panel. Next, press the "assign to view" button in the misc menu. This will switch your view screen to the selected camera's view. Be aware, if you want to render an animation from this perspective, you'll need to be in this view mode. So, first switch to the camera's view using "assign to view", then create your animation.
Both the camera positioning and the target positioning can be refined using the position-local inputs in the left control panel. If the camera or target are attached to the local frame of another object (such as a vehicle), the position-local coordinates will be with respect to the object's local frame; otherwise, the data corresponds to the global frame.
You can also interactively adjust the camera and target positions within the scene. First make sure you're in "Select, Move and Manipulate" mode. Then simply left-click and hold the camera or target icon and drag to the desired position and release.
You can exit from your custom camera's view by simply left-clicking on one of the view setting selection options such as Perspective.
Now we may wish to study the line-of-sight for this case. Virtual CRASH 3 automatically draws a line connecting the camera and target. You can watch as this line sweeps across the scene as you scroll through time. This is particularly useful in studying sight line issues. In this case, we may wish to study how much time elapsed from when the line-of-sight first became completely unobstructed, until the moment of impact.
Here we simply use our time slider and look for the moment when the line connecting the camera and target no longer pass through the trees on the shoulder. This occurs at time = 1.245 seconds.
In our simulation, impact occurs just about 0.8 seconds after the line-of-sight is unobstructed.
Note, as of Virtual CRASH 3 release 2016-09-24, the line-of-sight will only appear for "render method: current" settings, but not for "skylight" or "direct light" settings.
Attach Both Camera and Target to Same Vehicle
You can also attach a camera to a vehicle with a static orientation. To do this, simply left-click on your vehicle and hold the left-mouse button. Drag the mouse cursor away from your vehicle, then bring the cursor back over the vehicle and release. You will see the vehicle change to light blue on the first left-click and on the release. This procedure will attach the camera and target onto the same vehicle. Next you simply need to adjust the position and orientation of the camera. This is illustrated in the video below.
Remember, you can exit from your custom camera's view by simply left-clicking on one of the view setting selection options such as Perspective.
The final video is shown below.
Tags: Camera, target, camera position, target position, creating a camera, making a camera, putting a camera in vehicle, view from cabin, view inside of car, line of sight, line-of-sight, sight lines.
© 2016 vCRASH, Americas, Inc. All Rights Reserved