1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
<html>
<head>
<title>NVIDIA(R) Blast(R) SDK 1.1 API Reference: SampleAssetViewer</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK HREF="NVIDIA.css" REL="stylesheet" TYPE="text/css">
</head>
<body bgcolor="#FFFFFF">
<div id="header">
<hr class="first">
<img alt="" src="blast_logo.png">
<br>
<center>
<a class="qindex" href="main.html">Main Page</a>
<!-- <a class="qindex" href="hierarchy.html">Class Hierarchy</a> //-->
<a class="qindex" href="annotated.html">Class List</a>
<a class="qindex" href="functions.html">Class Members</a>
</center>
<hr class="second">
</div>
<!-- Generated by Doxygen 1.5.8 -->
<div class="contents">
<h1><a class="anchor" name="pagesampleassetviewer">SampleAssetViewer </a></h1>The windows-specific <b>bin</b> subfolders contain the application SampleAssetViewer.exe.<p>
This application can load model file sets that are generated by the <a class="el" href="pageimporter.html">ApexImporter</a> or <a class="el" href="pageauthoring.html">AuthoringTool</a> tools. A valid file set for this sample is one of the following:<p>
<ol type=1>
<li>An ExtPxAsset file and a graphics file:<ul>
<li>.blast file: contains the <a class="el" href="class_nv_1_1_blast_1_1_ext_px_asset.html">Nv::Blast::ExtPxAsset</a> which stores collision hulls in addition to Blast data. Here you must use the --px option in when exporting from <a class="el" href="pageimporter.html">ApexImporter</a> or <a class="el" href="pageauthoring.html">AuthoringTool</a>.</li><li>.obj or .fbx file: stores the graphics data.</li></ul>
</li><li>An <a class="el" href="struct_nv_blast_asset.html">NvBlastAsset</a> or TkAsset file, and a graphics + collision file:<ul>
<li>.blast file: contains an <a class="el" href="struct_nv_blast_asset.html">NvBlastAsset</a> or <a class="el" href="class_nv_1_1_blast_1_1_tk_asset.html">Nv::Blast::TkAsset</a> (use the --ll or --tk option, respectively, when exporting from <a class="el" href="pageimporter.html">ApexImporter</a> or <a class="el" href="pageauthoring.html">AuthoringTool</a>).</li><li>.fbx file: stores the graphics data along with embedded collision data. Here you must use the --fbxcollision option when exporting from <a class="el" href="pageimporter.html">ApexImporter</a> or <a class="el" href="pageauthoring.html">AuthoringTool</a> to embed collision information.</li></ul>
</li></ol>
<h2><a class="anchor" name="assetviewer_file_load">
Loading a Destructible Model</a></h2>
To load a specific file set, make sure the all files in the file set (described above) have the same name (except for extension). Then use the commandline options<p>
<div class="fragment"><pre class="fragment">
-t PATHNAME -n ASSETNAME -p "X Y Z" -r "AX AY AZ ANGLE"
</pre></div><p>
Here, PATHNAME is the path to the directory containing the {.blast, .obj} or {.blast, .fbx} file set (described above). ASSETNAME is the common name of those files. (X, Y, Z) is the translation to give to the actor that is created. (AX, AY, AZ, ANGLE) is the rotation axis and angle (in degrees) to apply to the actor.<h2><a class="anchor" name="assetviewer_multifile_load">
Loading Multiple Destructible Models</a></h2>
To load multiple destructible models, use a config file. The viewer reads .xml config files, which you can select using the command line argument<p>
<div class="fragment"><pre class="fragment">
-x FILENAME
</pre></div><p>
Running the application with no commandline arguments, the viewer will load <b>samples/resources/configs/assets.xml</b> by default. This file references the models in the subdirectories of <b>samples/resources/models</b>.<h2><a class="anchor" name="using_assetviewer">
Using SampleAssetViewer</a></h2>
Upon startup, the viewer will instance its first asset in its assets list. Using the default assets.xml, this is a brick wall.<p>
The menu is displayed using an overlay on the left side of the screen. It is divided into many submenus, which are described below.<p>
In any scene, you may press <b>'F'</b> to fire a box into the scene in the direction the camera is pointing.<p>
You may also press <b>SPACE</b> to toggle between damage and drag mode. (The mode is shown at the top of the screen.) In drag mode, dynamic objects can be manipulated by placing the mouse cursor over them, and using <b>Left Mouse / Drag</b> to pull on the object. In damage mode, <b>left-clicking</b> a destructible actor will apply damage to it.<p>
You may select between three different damage tools using the <b>1, 2, and 3</b> keys. Each will color the damage sphere (shown at the mouse hit location) a different color:<p>
<ul>
<li>(1) White - falloff damage. Damage is applied everywhere within the sphere.</li><li>(2) Blue - cutter damage. Damage is applied only near the surface of the sphere.</li><li>(3) Green - hierarchical damage. Damage is passed down the chunk hierarchy with every damage application, sometimes leading to smaller chunks from an initial damage application.</li></ul>
<p>
You may change the size of the damage sphere using the center mouse wheel, or the <a class="el" href="pagesampleassetviewer.html#viewer_damage_tool">Damage Tool</a> menu (see below).<p>
Right mouse button-drag to rotate the camera, and move using W, S, A, and D for forward, back, left, and right, respectively. Q and E move the camera down and up, relative to the current orientation.<p>
Pressing 'R' will reset the scene. Pressing 'P' toggles physical simulation.<h2><a class="anchor" name="viewermenuitems">
Menu Items</a></h2>
<h3><a class="anchor" name="viewer_scene">
Scene</a></h3>
Here you can select which assets to add to the scene, set the material damage properties, and enable a stress solver.<p>
In Replace mode (the default, set by radio button), selecting assets in the Assets list will remove all destructible actors from the scene and insert the selected one. In Append mode (the other radio button), selecting a new asset will insert its actor into the scene while keeping the others as well.<p>
You may also select actors in the Scene Actors list, and remove (or reload) the actor using the buttons below the list. Reloading an actor will restore it to its unfractured state.<p>
Note, in addition to destructible actors, the Scene Actors list shows the boxes that were fired into the scene using the 'F' key. Holding down the 'F' key "charges" the throw, increasing the cube's speed the longer you hold down the key. You may remove the cubes using the scene controls. All cubes will be removed when the scene is reset.<p>
The Blast Material properties are used by the various damage tools available.<p>
<ul>
<li>Health = the value which damage must exceed to break a bond or chunk</li><li>Min Damage Threshold = a fraction of Health, below which damage has no effect</li><li>Max Damage Threshold = a fraction of Health, equal to the maximum damage that can be applied per damage event</li></ul>
<p>
A stress solver may be enabled by selcting the Stress Solver Enabled checkbox. When enabled, you will be presented with several options. NOTE: you must then select the Stress Damage Enabled checkbox in order to allow stress to do damage to the actors in the scene.<br>
Bond Iterations Per Frame - is max amount of bonds allowed to be processed in one frame. The higher this value, the better quality of stress solver, but the time taken by it is increased linearly. 9You can check this timing in <em>Stats</em> submenu.) Using this value stress solver takes a fixed amount of CPU time on assets of any size. So the more complex an asset is (the more bonds it has) the less total iterations (on all bonds) are made.<br>
Use graph reduction level param to simplify stress graph for large assets. You can look at stress graph by using the <em>Debug</em> Render submenu. Stress linear and angular factors are corresponded to the amount of damage to be applied on bonds from linear and angular momentum of stress on every bond.<p>
Replay control section allows to control recording and replaying Blast™ events. It demonstrates the usage of <a class="el" href="pageextphysx.html#ExtSync">ExtSync</a> extension. You may start/stop recording of Blast™ events (damage, split). If you toggle to sync initial actors, once recording starts, the full Blast™ state is saved.<h3><a class="anchor" name="viewer_blast">
Blast</a></h3>
Here you may disable or enable impact damage, using the Impact Damage checkbox (on by default).<p>
The Fragility setting is a multiplier that turns impact forces into damage amounts.<p>
You can toggle to pass impact damage to stress solver instead of just applying it with simple damage shader. Impact impulse will be passed to stress graph and damage will be applied according to stress solver settings mentioned above.<p>
When dragging static actors (with mouse dragging tool) stress impulse is also applied on stress graph. Use Dragging To Stress Factor to tune the amount.<p>
You can limit rigid body count with next setting, all the actors created above this count will be ignored.<h3><a class="anchor" name="viewer_damage_tool">
Damage Tool</a></h3>
Here you may set the effect of the damage caused by the damage tool (left mouse click)<p>
<ul>
<li>Compressive Damage = the amount of damage that will be applied to bonds using the normal component</li><li>Explosive Impulse = the radial impulse given to the fractured pieces</li><li>Damage Radius = the size of the damage tool (also settable using the mouse wheel)</li><li>Damage Profile = the damage function to use (equivalent to pressing the '1', '2', or '3' keys, see the section <a class="el" href="pagesampleassetviewer.html#using_assetviewer">Using SampleAssetViewer</a>)</li></ul>
<h3><a class="anchor" name="viewer_stats">
Stats</a></h3>
Here you will find various timers, counts, and sizes. A running graph shows the frame time in ms.<p>
The "Last X" times shown at the end of this list record the time spent during the last damage or split calls. These are broken down into sections, each contributing to the parent time. "Child" function times are denoted by indentation.<h3><a class="anchor" name="viewer_application">
Application</a></h3>
Here you may pause the physics simulation (the same as pressing 'P') and reload shaders.<h3><a class="anchor" name="viewer_debugrender">
Debug Render</a></h3>
Here you may select wireframe rendering, which is useful for the various debug render options given.<p>
You may select the debug render options from the Blast Debug Render Mode dropdown. Note: pressing 'I' will cycle through this menu:<p>
<ul>
<li>Disabled = no debug rendering</li><li>Health Graph = draws bonds with color based upon bond health. Green = full health, red = low health.</li><li>Centroids = draws a line segment starting at each bond centroid, pointing in the direction of the bond normal. Also draws a square centered at the bond centroid, with the area of the bond.</li><li>Health Graph + Centroids = the two options above, combined.</li><li>Stress Graph = draws bonds with color based upon stress values. Green = low stress, red = high stress.</li><li>Stress Graph + Nodes Impulse = same as Stress Graph plus a line segment indicating the impulse applied to each graph node. The length of the segment is scaled by the Blast Debug Render Scale control. The green segments show the linear impulse, the red segments the rotational impulse.</li><li>Stress Graph + Bonds Impulse = same as Stress Graph plus a line segment indicating the impulse applied to each bond. The length of the segment is scaled by the Blast Debug Render Scale control. The green segments show the linear impulse, the red segments the rotational impulse.</li></ul>
<h3><a class="anchor" name="viewer_physx">
PhysX</a></h3>
This menu controls PhysX™ simulation parameters. Here you may choose to use fixed time steps (off by default), and set the time step (if Use Fixed Timestep is checked) with the Fixed Timestep control.<p>
If a suitable GPU is available, GPU Physics may be enabled using the Use GPU Physics control.<h3><a class="anchor" name="viewer_renderer">
Renderer</a></h3>
Here you may change the lighting, shadow, and ambient occlusion (HBAO) options.<h3><a class="anchor" name="viewer_hints_help">
Hints / Help</a></h3>
Gives selected keyboard shortcuts.<p>
<br>
See <a class="el" href="pagecopyrights.html">Copyrights</a> for license information regarding third-party software used by the samples.<p>
<br>
</div>
<!-- start footer part -->
<div class="footer">
Copyright © 2015-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. <a href="http://www.nvidia.com ">www.nvidia.com</a>
</div>
</body>
</html>
|