RenderMan API
23.0
|
#include <RixIntegrator.h>
Public Types | |
enum | RayType { k_rtInvalid = 0, k_rtCamera = 1, k_rtLight = 2, k_rtTransmission = 3, k_rtDirectlight = 4, k_rtIndirect = 5, k_rtNumRayTypes = 6 } |
Public Member Functions | |
void | InitOrigination (RixShadingContext const *sCtx, RtNormal3 const *Ngn, int _shadingCtxIndex) |
void | InitTransmitOrigination (RixShadingContext const *sCtx, int _shadingCtxIndex) |
void | SetRaySpread (RixBXLobeSampled lobe, float rayOriginRadius, float rayOriginSpread, float curvature, float fPdf, bool lightPath=false) |
Static Public Member Functions | |
static PRMAN_INLINE uint16_t | EncodeWavelength (float wavelength) |
static PRMAN_INLINE float | DecodeWavelength (uint16_t encodedWavelength) |
Public Attributes | |
RtPoint3 | origin |
float | originRadius |
Ray origin. More... | |
RtVector3 | direction |
Radius of ray at its origin. More... | |
float | raySpread |
Ray direction. More... | |
float | minDist |
float | maxDist |
Minimum hit distance. Used only for primary rays. More... | |
float | time |
Maximum hit distance. More... | |
uint16_t | raytype |
Shutter-normalized time of ray launch. More... | |
RixBXLobeSampled | lobeSampled |
See RayType for possible values. More... | |
RixShadingContext::Id | shadingCtxId |
Characteristics of the BxDF lobe this ray samples. More... | |
int16_t | integratorCtxIndex |
Shading context unique identifier. More... | |
uint16_t | shadingCtxIndex |
Associated primary ray index. More... | |
uint16_t | rayId |
Index into the lauching shading context. More... | |
RixLPEState * | lpeState |
User-provided index in the ray bundle. More... | |
uint32_t | private0 [5] |
A pointer to the LPE state for this ray launch. More... | |
float | opacityThreshold |
Data for internal use. More... | |
uint16_t | hitId |
uint16_t | flags |
Internal hit id, zero means 'no hit.'. More... | |
uint16_t | wavelength |
Flags for internal use. More... | |
Definition at line 234 of file RixIntegrator.h.
Enumerator | |
---|---|
k_rtInvalid | |
k_rtCamera | |
k_rtLight | |
k_rtTransmission | |
k_rtDirectlight | |
k_rtIndirect | |
k_rtNumRayTypes |
Definition at line 236 of file RixIntegrator.h.
|
inlinestatic |
Converts from encoded 16 bits representation of wavelength to nanometers In both units 0 means "full spectrum", meaning no wavelength is defined.
[in] | encodedWavelength | A 16-bits encoded wavelength |
Definition at line 447 of file RixIntegrator.h.
|
inlinestatic |
Converts a wavelenght
(in nanometers) to a compact 16 bits representation of it. In both units 0 means "full spectrum", meaning no wavelength is defined.
[in] | wavelength | A wavelength in nanometers. |
Definition at line 433 of file RixIntegrator.h.
|
inline |
InitOrigination()
should be called after the ray geometry has been setup for calls to GetNearestHits()
. In addition to setting the origination context, we analyze the combination of lobeSampled
and Nn
to determine whether a transmit event was a nominal enter or exit. Origination state allows rays to be back-tracked to the original shading context for recovery of ray-path information.
[in] | sCtx | Shading context containing the shading point that launched this ray. |
[in] | Ngn | Geometric normal at the shading point that launched this ray. |
[in] | _shadingCtxIndex | Index of the shading point in the shading context. |
Definition at line 291 of file RixIntegrator.h.
|
inline |
InitTransmission()
is analogous to InitOrigination()
but should be used for transmission rays. All transmission 'events' are transmit events and lobeSampled
is ill-defined (since lights are responsible for producing most transmission rays).
[in] | sCtx | Shading context containing the shading point that launched this ray. |
[in] | _shadingCtxIndex | Index of the shading point in the shading context. |
Definition at line 311 of file RixIntegrator.h.
|
inline |
Computes ray spread for given reflection/transmission type, pdf, and surface curvature, using two approaches:
We set the overall ray spread to the max of these two. (For rough curved surfaces a better answer might be larger than the max – perhaps the sum? – but it's not 100% clear what the optimal combined value should be.)
[in] | lobe | Used to determine if we are dealing with a reflection or transmission event. |
[in] | rayOriginRadius | Incident ray radius at ray origin. |
[in] | rayOriginSpread | Incident ray spread at ray origin. |
[in] | curvature | Local surface curvature. |
[in] | fPdf | Pdf associated with the ray direction. |
[in] | lightPath | Indicates if the rays is part of a light path or not. Optional. |
Definition at line 352 of file RixIntegrator.h.
RtVector3 RtRayGeometry::direction |
Radius of ray at its origin.
Definition at line 249 of file RixIntegrator.h.
uint16_t RtRayGeometry::flags |
Internal hit id, zero means 'no hit.'.
Definition at line 272 of file RixIntegrator.h.
|
mutable |
This value is updated on each presence hit, whenever a surface with presence is hit. The presence value will be compared against this threshold to decide if it is a hit or a miss.
Definition at line 271 of file RixIntegrator.h.
int16_t RtRayGeometry::integratorCtxIndex |
Shading context unique identifier.
Definition at line 262 of file RixIntegrator.h.
RixBXLobeSampled RtRayGeometry::lobeSampled |
See RayType for possible values.
Definition at line 260 of file RixIntegrator.h.
RixLPEState* RtRayGeometry::lpeState |
User-provided index in the ray bundle.
Definition at line 265 of file RixIntegrator.h.
float RtRayGeometry::maxDist |
Minimum hit distance. Used only for primary rays.
Definition at line 256 of file RixIntegrator.h.
float RtRayGeometry::minDist |
How much the ray radius changes for each unit the ray travels. Use as is to get tex/env filter radii. Multiply by 2 to get footprints and tex/env filter diameters. Values range between 0 and 1 (where 1 corresponds to an angle of 45 degrees).
Definition at line 255 of file RixIntegrator.h.
float RtRayGeometry::opacityThreshold |
Data for internal use.
Definition at line 268 of file RixIntegrator.h.
RtPoint3 RtRayGeometry::origin |
Definition at line 247 of file RixIntegrator.h.
float RtRayGeometry::originRadius |
Ray origin.
Definition at line 248 of file RixIntegrator.h.
uint32_t RtRayGeometry::private0[5] |
A pointer to the LPE state for this ray launch.
Definition at line 267 of file RixIntegrator.h.
uint16_t RtRayGeometry::rayId |
Index into the lauching shading context.
Definition at line 264 of file RixIntegrator.h.
float RtRayGeometry::raySpread |
Ray direction.
Definition at line 251 of file RixIntegrator.h.
uint16_t RtRayGeometry::raytype |
Shutter-normalized time of ray launch.
Definition at line 259 of file RixIntegrator.h.
RixShadingContext::Id RtRayGeometry::shadingCtxId |
Characteristics of the BxDF lobe this ray samples.
Definition at line 261 of file RixIntegrator.h.
uint16_t RtRayGeometry::shadingCtxIndex |
Associated primary ray index.
Definition at line 263 of file RixIntegrator.h.
float RtRayGeometry::time |
Maximum hit distance.
Definition at line 257 of file RixIntegrator.h.
uint16_t RtRayGeometry::wavelength |
Flags for internal use.
Wavelength associated with the ray. See EncodeWavelength()
and DecodeWavelength()
methods. This quantity is then available on hits by querying the k_wavelength
built-in primvar with RixShadingContext::GetBuiltinVar()
.
Definition at line 277 of file RixIntegrator.h.