Chapter 19 | Miscellaneous Topics
Chapter 19 Subject Index
Mesh Optimization
Polygon mesh objects, such as vehicle models or terrains, can be simplified (decimated) within the Virtual CRASH application. First, ensure that your mesh isn’t a terrain object or a rigid body object (if you are unsure, left-click on the object, and select Create > Physics > Remove Physics from Selection). With your mesh object selected, open the “optimize” menu in the left-side control panel. There you will see your object’s current polygon face count “source face count”. Next, set the “target face count” (the number of faces you would like to have remaining) and the “aggressiveness”, then press “apply”. Note, as aggressiveness is increased, the target face count is more likely to be achieved. It is recommended that users perform the optimization in multiple iterations, making it easier to see if too many polygons are being eliminated thereby causing undesired distortions.
Below we see the resulting decimated vehicle mesh on the left.
After the optimization is applied, it is useful to conduct a test render to look for abnormalities in the materials. In the example below, we notice the appearance of discrete polygon facets which are clearly visible from the specular highlights.
This is easily fixed by selecting all of the polygon faces for the mesh, reducing the smooth threshold to 15 degrees, and left-clicking on “auto smooth”. Note, the auto smooth feature does not modify the mesh geometry, but rather improves the interpolation used by the rendering engine in simulating light reflecting off neighboring polygon faces. In some cases, extremely rounded elements such as tubing, or cables, may need additional smoothing (lower threshold). The auto smooth feature can be applied to any collection of polygon faces.
The optimize tool is great for terrain meshes. Note, smaller polygons are kept where needed in regions of fine detail, whereas regions where the geometry is more uniform uses larger polygons.
The Smart HUD
The Smart Heads Up Display (HUD) is a great way to display vehicle data and time on your final animation file. This feature was shown in the video above. Each vehicle can have its own HUD object. To create a HUD object, simply go to Create > Helpers 2D > On-Screen Dynamics Info and left-click.
Once selected, hover over the vehicle for which you wish to enable the Smart HUD feature. Left-click on the vehicle when it turns light blue. You will then see the Smart HUD box display near your vehicle. The Smart HUD object has an entry in the project menu. In the “misc” menu, you will find the Smart HUD attributes which can be modified. You can customize the entries in the “text” field to display time (“{t}”), speed (“{v}”), and path length traveled (“{s}”). The brackets “{“ and “}” are necessary to display the numeric values.
All other text displayed in the text field can be modified as needed. In the example below, the path length data was deleted, and more descriptive text was added. The Smart HUD fill color and text attributes can also be modified as shown below. The Smart HUD box can either be stationary, or dynamic to follow its parent vehicle. The follow feature can be enabled by selecting the “follow target” box.
An animation time box can be created by simply creating a second Smart HUD object for any vehicle within your scene. Simply delete all of other data in the “text” field by the Time entry. Then just park the Smart HUD box where you would like it to remain in your animation.
Users can control the number of decimal places to display in the “Dynamics info” and “On-screen dynamics info” tools. To change the number of decimal places, use the “:N” after the variable name. For example, to show vehicle speed to 2 decimal places, use {v:2}. Note, you can change the displayed variable name before the numerical value as well. For example, the default “v” can be rewritten to “Speed”.
Create Tire Marks with Time in Draft View Mode
If you wish to prevent tire marks from appearing with the interpositions of the vehicles in draft view mode, simply select your vehicle, then left-click on the “tire marks” menu in the left side control panel, then left-click to enable “respect time."
Once this is done, you should only see the tire marks appear in agreement with the current time step of your simulation, rather than simultaneously with the interpositions.
Connecting Objects with a Chain/Rope/Bungie
If you wish to connect objects with the rope tool, first ensure that all objects are rigid bodies which can participate in the physics simulation. Left click on the “joints” menu in the left side control panel. Next, left-click on “create rope.”
Hover your mouse above the first object you wish to connect to the rope. You should see the object turn blue as conformation that it is currently selected. Left-click to connect the rope. Next, hover your mouse over the next object you wish to connect. Once it turns blue, you may left-click again to connect. Note, you can left click away from the second object to force the rope to into customized shapes. This is convenient if you need to thread your rope around various objects within your scene. When you are done with creating your rope, simply right click.
Take into consideration that your rope is actually an ensemble of coupled damped harmonic oscillators. Each link (sphere) is connected to its neighbor by a spherical joint, which has its own spring constant and damping term. Therefore, the longer your rope is, the more computational time it may take to simulate. Also, the amount by which the rope may lengthen during your simulation will depend upon a few factors, including the spring constant terms as well as your integration time step size, whereby you are likely to see greater lengthening of your rope for larger time step sizes and smaller spring constant values.
Increasing your spring constant values while decreasing your time-step size can help with simulating more rigid chain-like objects. You can access the rope properties by left-clicking on the corresponding “chain” objects in your left side control panel. Expanding the group folders allows you access the both the sphere object properties and the joint properties.
Disable Report Printout
Occasionally it is beneficial to prevent data associated with certain objects from being printed in the report. This is particularly useful for objects such as ropes, which can often have hundreds of connected sphere objects that can slow down performance. You disable the report output for a given object by first selecting your object, then left clicking on the “report” menu button in the left side control panel, and finally click on the box next to “disable.”
© 2024 Virtual CRASH, LLC. All Rights Reserved