Keywords: hypersampling
Summary
This simulation demonstrates the use of hypersampling to improve sampling in a large (many pixels) object that has a small (sub-pixel) component that is important. In this case, we have a moving vehicle that has a hot spot on the hood that is important to sample well. Failure to sample it could result in a flickering effect from frame to frame as some frames have sampled this high-magnitude component well and others have not.
Related Materials
The following demos, manuals and tutorials can provide additional information about the topics at the focus of this demo:
-
Related Demos
-
Related Manuals
-
The BasicPlatform plugin manual.
-
-
Related Tutorials
-
N/A
-
Details
The DIRSIG adaptive sampling approach starts by sampling a pixel with a minimum number of paths (rays) to compute an initial estimate of the radiance. It then starts to add additional paths and checks to see if that addition caused the radiance estimate to change by an amount that exceeds a threshold. If it does, then additional paths are added until the radiance estimate converges to a value that is no longer impacted by additional samples.
This demo focuses on a case where a portion of a pixel contains a high magnitude contribution (a hot spot) compared to the rest of the pixel. In this case, we want to make sure that the relative proportion of the hot spot is well estimated because the failure to do so could make the radiance estimate of the pixel too low or too high. This can become problematic when a multi-frame simulation is performed an the estimate in one frame is too low, the estimate in the next frame is too high, etc. In this case, the hot spot pixel will temporally modulate across frames far more than it should. To mitigate this, the hypersampling feature in the BasicPlatform plugin can be employed. This feature triggers pixels that overlap labeled objects in the scene to increase their minimum and maximium sampling values by a user-supplied factor. This allows specific and challenging objects in the scene to get increased sampling while using the normal sampling for the rest of the scene. As a result, the increase in run-time for the simulation is minimal because only a portion of the scene requires more samples.
Important Files
This section highlights key files important to the simulation.
The Vehicle
The vehicle used in the scene is the Infiniti G35 car used in many of the
demos. The hot spot on the hood was created by selecting 4 triangles on
the hood in a copy of the OBJ and then deleting the remaining facets in the
model. These 4 facets were then offset by 0.001
in the Z dimension using
the DIRSIG object_tool.
The original car OBJ and the 4 facet "hot spot" OBJ are then combined in
the geometry/infiniti_g35.glist
file. The 380 K temperature for the
"hot spot" OBJ is set using the <temperature>
override in the GLIST file:
<geometrylist> <object enabled="true"> <basegeometry> <obj> <filename>infiniti_g35.obj</filename> </obj> </basegeometry> <staticinstance/> </object> <object enabled="true"> <basegeometry> <obj> <filename>hood_z.obj</filename> <temperature>380</temperature> </obj> </basegeometry> <staticinstance/> </object> </geometrylist>
The vehicles are moving at 30 m/s (around 65 mph) and the integration time of the focal plane is 25 ms. The motion for the two car instances are defined with DeltaMotion instances.
<object> <basegeometry> <glist><filename>infiniti_g35.glist</filename></glist> </basegeometry> <dynamicinstance tags="::IMPORTANT::"> <motion type="delta"> <filename>car_1.mov</filename> </motion> </dynamicinstance> <dynamicinstance> <motion type="delta"> <filename>car_2.mov</filename> </motion> </dynamicinstance> </object>
Note
|
Only one vehicle is flagged with the key ::IMPORTANT:: string
that the hypersampling feature will look for. Hence, one instance
will be hypersampled and the other will not.
|
The zoomed images below show one of the Infiniti G35 instances being imaged without temporal integration and then with the 25 ms temporal integration. As a reminder, the focus of this demo is when that hot spot on the hood is proportional to the pixel size.


Simulations and Results
The focus of this demo is looking at the impact of hypersampling on insuring that the hot spot is appropriately sampled. When this does not happen, we can expect that the variation from frame to frame to be higher than it should be. To look at this variation, the scenario has been run 5 different ways:
-
Without temporal integration and without hypersampling
-
With temporal integration and without hypersampling
-
With temporal integration and with 2x hypersampling
-
With temporal integration and with 5x hypersampling
-
With temporal integration and with 10x hypersampling
Run the multi-frame file without temporal integration using DIRSIG5:
$ dirsig5 wo_int.sim
Run the multi-frame file with temporal integration but without hypersampling using DIRSIG5:
$ dirsig5 w_int.sim
Run the multi-frame file with temporal integration and with hypersampling using DIRSIG5:
$ dirsig5 hyper.sim

Note
|
As a reminder, only the upper car is flagged for hypersampling
in the geometry/demo.glist file.
|
The plot below shows the maximum value of each frame for the 5 different scenarios. The without temporal integration (and without hypersampling) displays variation from frame to frame. This variation is expected as the hot spot changes from being largely contained in one pixel versus being split across 2 or more pixels as the vehicle moves. When temporal integration is added, the hot spot is smeared across multiple pixels and the variation decreases. However, viewing the "sample count" truth reveals that the maximum number of samples is reached on pixels overlapping the hot spot. This is a good indicator that hypersampling is needed. The 2x hypersampling simulation further reduced the variation and the 5x hypersampling reduces it even more. However, the 10x and 5x hypersampling lines overlap indicating that this scenario has fully converged at 5x (and possibly at 4x or 3x).

Note
|
The Y axis in the plot is labeled "radiance" but technically the units are no longer contain Watts but rather Joules due to the temporal integration (e.g., Joules/(cm2 sr)). The without temporal integration values (in Watts/(cm2 sr)) were scaled to account for the units difference for this plot. |
In this demo, we introduced hypersampling because the maximum number
of samples was being reached for the default threshold of 1.0e-06
.
As a reminder hypersampling increases the maximum and the minimum
number of samples. Increasing the minimum samples is useful when
you are worried that a sub-pixel contribution is small enough that
it might be missed by the initial set of pixel samples. In this
scenario, increasing the maximum number of samples might have solved
the problem of the hot spot pixels not converging without slowing
down the entire simulation, since the non hot spot pixels had
converged (as observed by the sample count truth not reaching the
maximum).
It is important to point out that whenever we discuss the numerical convergence that this is performed in the context of the requirements of the system. The variation observed in the w/ temporal integration and w/o hypersampling might already be lower than the variation that can be measured by the sensor. In that case, there is no reason to increase the number of samples via the standard convergence mechanisms or via hypersampling.