Ground-truth velocity (VelocityGroundTruthInline)¶
This render pass renders a velocity map (m/s per pixel) of the direct path camera -> primary hit -> light, to check the Doppler passes against. The primary hit is that of the pixel-center camera ray. Three velocities are available, and they differ:
|
Velocity |
Objects move? |
|---|---|---|
|
Half the path velocity \(u\) of the direct path, as
|
no |
|
\(-(\ell(\mathrm{d}t) - \ell(0)) / (2\,\mathrm{d}t)\): how fast the length of the direct path along the fixed
pixel ray changes, as |
yes, to their pose at |
|
The hit point’s velocity along |
no |
The visibility of the light is ignored. Pixels without a hit are NaN; with path_length, so are pixels whose ray
hits another object at dt than at time 0 (an object edge, where the length difference is not a velocity).
Parameters¶
Parameter |
Type |
Description |
|---|---|---|
|
string |
|
|
dictionary |
The motion of the scene objects; see Velocities. (Default: none) |
|
float |
|
|
float3 |
|
|
float3 |
|
Inputs and outputs¶
Channel |
Description |
|---|---|
|
Velocity of the direct path, m/s, R32Float; NaN without a hit. |
The light is set on the LaserLight pass. From Python: set_velocity(...), clear_velocities() and get_object_names(), which returns
(instance, mesh name, material name, movable) for every object of the scene.
Example¶
testbed.load_scene("cornell-box-moving/scene.pyscene",
falcor.SceneBuilderFlags.DontMergeMaterials | falcor.SceneBuilderFlags.DontOptimizeGraph)
graph = testbed.create_render_graph("Truth")
graph.create_pass("Light", "LaserLight", {"isLightSourceLaser": False, "laserCollocated": True})
graph.create_pass("Truth", "VelocityGroundTruthInline", {
"mode": "path_length", "dt": 1e-3,
"velocities": {"TallBox": {"linear": [0.0, 0.0, 2.0]}},
})
graph.add_edge("Light", "Truth")
graph.mark_output("Truth.velocity")
testbed.render_graph = graph
The Doppler ToF tutorial compares the three modes.