Baking¶
Functions¶
-
void iplReflectionsBakerBake(IPLContext context, IPLReflectionsBakeParams *params, IPLProgressCallback progressCallback, void *userData)¶
Bakes a single layer of reflections data in a probe batch.
Only one bake can be in progress at any point in time.
- Parameters
context – The context used to initialize Steam Audio.
params – Parameters to use for baking reflections data.
progressCallback – (Optional) This function will be called by Steam Audio to notify your application as the bake progresses. Use this to display a progress bar or some other indicator that the bake is running.
userData – (Optional) Pointer to arbitrary data that will be sent to the progress callback when Steam Audio calls it.
-
void iplReflectionsBakerCancelBake(IPLContext context)¶
Cancels any running bakes of reflections data.
- Parameters
context – The context used to initialize Steam Audio.
-
void iplPathBakerBake(IPLContext context, IPLPathBakeParams *params, IPLProgressCallback progressCallback, void *userData)¶
Bakes a single layer of pathing data in a probe batch.
Only one bake can be in progress at any point in time.
- Parameters
context – The context used to initialize Steam Audio.
params – Parameters to use for baking pathing data.
progressCallback – (Optional) This function will be called by Steam Audio to notify your application as the bake progresses. Use this to display a progress bar or some other indicator that the bake is running.
userData – (Optional) Pointer to arbitrary data that will be sent to the progress callback when Steam Audio calls it.
-
void iplPathBakerCancelBake(IPLContext context)¶
Cancels any running bakes of pathing data.
- Parameters
context – The context used to initialize Steam Audio.
Structures¶
-
struct IPLReflectionsBakeParams¶
Parameters used to control how reflections data is baked.
Public Members
-
IPLProbeBatch probeBatch¶
A probe batch containing the probes at which reflections data should be baked.
-
IPLSceneType sceneType¶
The type of scene being used.
-
IPLBakedDataIdentifier identifier¶
An identifier for the data layer that should be baked.
The identifier determines what data is simulated and stored at each probe. If the probe batch already contains data with this identifier, it will be overwritten.
-
IPLReflectionsBakeFlags bakeFlags¶
The types of data to save for each probe.
-
IPLint32 numRays¶
The number of rays to trace from each listener position when baking.
Increasing this number results in improved accuracy, at the cost of increased bake times.
-
IPLint32 numDiffuseSamples¶
The number of directions to consider when generating diffusely-reflected rays when baking.
Increasing this number results in slightly improved accuracy of diffuse reflections.
-
IPLint32 numBounces¶
The number of times each ray is reflected off of solid geometry.
Increasing this number results in longer reverb tails and improved accuracy, at the cost of increased bake times.
-
IPLfloat32 simulatedDuration¶
The length (in seconds) of the impulse responses to simulate.
Increasing this number allows the baked data to represent longer reverb tails (and hence larger spaces), at the cost of increased memory usage while baking.
-
IPLfloat32 savedDuration¶
The length (in seconds) of the impulse responses to save at each probe.
Increasing this number allows the baked data to represent longer reverb tails (and hence larger spaces), at the cost of increased disk space usage and memory usage at run-time.
It may be useful to set
savedDuration
to be less thansimulatedDuration
, especially if you plan to use hybrid reverb for rendering baked reflections. This way, the parametric reverb data is estimated using a longer IR, resulting in more accurate estimation, but only the early part of the IR can be saved for subsequent rendering.
-
IPLint32 rayBatchSize¶
If using custom ray tracer callbacks, this the number of rays that will be passed to the callbacks every time rays need to be traced.
-
IPLfloat32 irradianceMinDistance¶
When calculating how much sound energy reaches a surface directly from a source, any source that is closer than
irradianceMinDistance
to the surface is assumed to be at a distance ofirradianceMinDistance
, for the purposes of energy calculations.
-
IPLint32 bakeBatchSize¶
If using Radeon Rays or if
identifier.variation
isIPL_BAKEDDATAVARIATION_STATICLISTENER
, this is the number of probes for which data is baked simultaneously.
-
IPLOpenCLDevice openCLDevice¶
The OpenCL device, if using Radeon Rays.
-
IPLRadeonRaysDevice radeonRaysDevice¶
The Radeon Rays device, if using Radeon Rays.
-
IPLProbeBatch probeBatch¶
-
struct IPLPathBakeParams¶
Parameters used to control how pathing data is baked.
Public Members
-
IPLProbeBatch probeBatch¶
A probe batch containing the probes for which pathing data should be baked.
-
IPLBakedDataIdentifier identifier¶
An identifier for the data layer that should be baked.
The identifier determines what data is simulated and stored at each probe. If the probe batch already contains data with this identifier, it will be overwritten.
-
IPLint32 numSamples¶
Number of point samples to use around each probe when testing whether one probe can see another.
To determine if two probes are mutually visible, numSamples * numSamples rays are traced, from each point sample of the first probe, to every other point sample of the second probe.
-
IPLfloat32 radius¶
When testing for mutual visibility between a pair of probes, each probe is treated as a sphere of this radius (in meters), and point samples are generated within this sphere.
-
IPLfloat32 threshold¶
When tracing rays to test for mutual visibility between a pair of probes, the fraction of rays that are unoccluded must be greater than this threshold for the pair of probes to be considered mutually visible.
-
IPLfloat32 visRange¶
If the distance between two probes is greater than this value, the probes are not considered mutually visible.
Increasing this value can result in simpler paths, at the cost of increased bake times.
-
IPLfloat32 pathRange¶
If the length of the path between two probes is greater than this value, the probes are considered to not have any path between them.
Increasing this value allows sound to propagate over greater distances, at the cost of increased bake times and memory usage.
-
IPLProbeBatch probeBatch¶
Enumerations¶
-
enum IPLReflectionsBakeFlags¶
Flags for specifying what types of reflections data to bake.
Values:
-
enumerator IPL_REFLECTIONSBAKEFLAGS_BAKECONVOLUTION¶
Bake impulse responses for
IPL_REFLECTIONEFFECTTYPE_CONVOLUTION
,IPL_REFLECTIONEFFECTTYPE_HYBRID
, orIPL_REFLECTIONEFFECTTYPE_TAN
.
-
enumerator IPL_REFLECTIONSBAKEFLAGS_BAKEPARAMETRIC¶
Bake parametric reverb for
IPL_REFLECTIONEFFECTTYPE_PARAMETRIC
orIPL_REFLECTIONEFFECTTYPE_HYBRID
.
-
enumerator IPL_REFLECTIONSBAKEFLAGS_BAKECONVOLUTION¶