Hi, thanks for posting your questions. Here is how the current WPM / Acoustic Sensor implementation behaves for each point.
1. Custom ray properties
Yes. NvMatRayProps is designed to be extended. You derive your own struct from it (the built-in Acoustic Sensor already does this to carry its transmitter ID and channel). Then you set Config::customRayPropsSize = sizeof(YourProps) on the WPM and fill the initial values per primary ray in TraceDefinition::rayProps2D. On every bounce, WPM passes the parent ray’s props to the material shader as NvMatInput::incRayProps, with customPropsSize set. The material shader is responsible for copying the full blob into the reflected/transmitted/lookup output props and for modifying the amplitude in vector. The NVIDIA materials copy the full customPropsSize, so your extra fields are preserved across bounces. Any custom material you write must do the same.
You don’t need a custom field just for path length, though. WPM already accumulates it per ray and reports it per contribution (see 2). distPrevHit is only the length of the last segment. It is given to the material in case you want to apply per-segment effects such as absorption inside the BSDF.
2. TraceResult contents
getTraceResult() returns a TraceResult with:
contributions2D: struct-of-arrays indexed as [receiverIdx * maxNumBouncesPerReceiver + bounceIdx], with isValid, numBounces, rtDistance (total path length from transmitter through all bounces to the receiver, in meters), rtVelocity (optional), pos (hit point in the receiver frame), deltaTimeNs, materialId, cosAngle, accumBeamRangeDivergence, and optionally the hit triangle vertices.
rayProps2D: your custom ray properties for each contribution, using the same indexing. The contribution amplitude is in NvMatRayProps::vector (the acoustic model uses vector.x).
maxNumBouncesPerReceiver.
The receiver ID is implicit in the index, and the material ID and total path length are explicit. There is no built-in primary-ray/path identifier. If you need one, store it in your custom ray props when you build the trace definition. Note that you get one contribution per bounce per receiver, not the full list of intermediate bounce points for each path.
3. GPU memory access
Yes. When the WPM runs on a CUDA device, all TraceResult arrays are device pointers. A sensor model can pass the TraceResult straight into its own CUDA kernels without a host copy, which is how the built-in Acoustic Sensor builds its waveforms. This only works for the sensor model that owns the WPM instance, though. The built-in Acoustic Sensor does not expose its internal trace result to external code. It only publishes the processed outputs (signal-way waveforms / GenericModelOutput).
4. Using the built-in Acoustic Sensor
For a 1.2 MHz underwater sonar, the built-in Acoustic Sensor is unlikely to be suitable as-is, even with parameter changes. It is calibrated for in-air ultrasonic parking sensors (~50 kHz). The speed of sound, the waveform sample period, the maximum range, and the amplitude/close-range calibration are all fixed in the model. It has no absorption term and no hook for inserting your own processing between the trace result and the waveform. Your use case would need a custom sensor model built on the RtxSensor + WPM APIs, plus suitable acoustic materials for a water medium. The current acoustic material computes reflection/transmission against air impedance.
5. Sound speed
There is currently no API or USD attribute to change the propagation speed. The Acoustic Sensor uses a fixed speed of sound for air (343.21 m/s), and it applies to both time-of-flight and the acoustic material model. In a custom WPM-based model, this isn’t a blocker: rtDistance is purely geometric (meters), so you can compute time of flight with c = 1500 m/s and apply frequency-dependent absorption as a function of rtDistance in your own CUDA kernel.
References