RealDocs

UImportanceSamplingLibrary::NextSobolFloat

function Engine Blueprint Since 5.0
#include "Kismet/ImportanceSamplingLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintPure

Description

Advances a Sobol sequence to the next sample using the previous sample's value, avoiding the cost of recomputing the whole sequence from index 0. Use inside loops that step through consecutive Sobol indices.

Caveats & Gotchas

  • PreviousValue must be the actual Sobol value returned for Index-1 (from RandomSobolFloat or a prior NextSobolFloat call) — passing an arbitrary float breaks the incremental math and produces an invalid sequence.
  • Only valid for consecutive indices; skipping indices requires RandomSobolFloat instead.
  • Like RandomSobolFloat, only Dimensions 0-15 are supported.

Signature

static float NextSobolFloat(int32 Index, int32 Dimension, float PreviousValue)

Parameters

Name Type Description Default
Index int32 Which sequential point in the Sobol sequence (the point being advanced to).
Dimension int32 Which Sobol dimension to draw from (0 to 15).
PreviousValue float The Sobol value returned for Index-1.

Return Type

float

Example

Incrementally advance a Sobol sequence C++
float Sample = UImportanceSamplingLibrary::RandomSobolFloat(0, 0, 0.0f);
for (int32 i = 1; i < 64; ++i)
{
    Sample = UImportanceSamplingLibrary::NextSobolFloat(i, 0, Sample);
    // use Sample
}

Tags

Version History

Introduced in: 5.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.