unreal.ImportanceSamplingLibrary
¶
- class unreal.ImportanceSamplingLibrary(outer=None, name='None')¶
Bases:
unreal.BlueprintFunctionLibrary
Importance Sampling Library
C++ Source:
Module: Engine
File: ImportanceSamplingLibrary.h
- classmethod importance_sample(texture, rand, samples, intensity) -> (sample_position=Vector2D, sample_color=LinearColor, sample_intensity=float, sample_size=float)¶
Distribute sample points proportional to Texture2D luminance. outparam: SamplePosition - Importance sampled 2D output texture coordinate (0-1) outparam: SampleColor - Representative color near Position from MIP level for SampleSize outparam: SampleIntensity - Intensity of individual points, scaled by probability and number of samples outparam: SampleSize - Local density of points near Position (scaled for 1x1 texture space)
- Parameters
texture (ImportanceTexture) –
rand (Vector2D) – Random 2D point with components evenly distributed between 0 and 1
samples (int32) – Total number of samples that will be used
intensity (float) – Total intensity for light
- Returns
sample_position (Vector2D):
sample_color (LinearColor):
sample_intensity (float):
sample_size (float):
- Return type
tuple
- classmethod next_sobol_cell3d(index, num_cells=1, previous_value=[0.000000, 0.000000, 0.000000]) Vector ¶
- classmethod random_sobol_cell2d(index, num_cells=1, cell=[0.000000, 0.000000], seed=[0.000000, 0.000000]) Vector2D ¶
- Parameters
index (int32) – Which sequential point in the cell (starting at 0)
num_cells (int32) – Size of cell grid, 1 to 32768. Rounded up to the next power of two
cell (Vector2D) – Give a point from this integer grid cell
seed (Vector2D) – Random 2D seed (components in the range 0-1) to randomize across multiple sequences
- Returns
Sobol-distributed random 2D position in the given grid cell
- Return type
- classmethod random_sobol_cell3d(index, num_cells=1, cell=[0.000000, 0.000000, 0.000000], seed=[0.000000, 0.000000, 0.000000]) Vector ¶
- Parameters
index (int32) – Which sequential point in the cell (starting at 0)
num_cells (int32) – Size of cell grid, 1 to 1024. Rounded up to the next power of two
cell (Vector) – Give a point from this integer grid cell
seed (Vector) – Random 3D seed (components in the range 0-1) to randomize across multiple sequences
- Returns
Sobol-distributed random 3D vector in the given grid cell
- Return type