PrtEngine Class

Language:

The PrtEngine class is used to compute a precomputed radiance transfer (PRT) simulation. Its methods are typically used offline to compute per-vertex or per-texel transfer vectors in advance of real-time 3-D modeling.

Definition

Visual Basic Public Class PrtEngine
    Inherits MarshalByRefObject
    Implements IDisposable
C# public class PrtEngine : MarshalByRefObject, IDisposable
C++ public ref class PrtEngine : MarshalByRefObject, IDisposable
JScript public class PrtEngine extends MarshalByRefObject implements IDisposable

Members Table

Event Description
Disposing Occurs when the Dispose method is called or when the PrtEngine object is finalized and collected by the garbage collector of the .NET common language runtime.
Method Description
ClosestRayIntersects Uses efficient ray-tracing in precomputed radiance transfer (PRT) simulations to determine whether a ray intersects a mesh. If an intersection is found, the method returns the index of the closest mesh face hit by the ray and the barycentric coordinates of the intersection point.
ComputeBounce Computes the source radiance resulting from a single bounce of interreflected light. This method can be used for any lit scene, including a SH-based PRT model.
ComputeBounceAdaptive Computes the source radiance resulting from a single bounce of interreflected light, using adaptive sampling. This method generates new vertices and faces on the mesh to more accurately approximate the PRT signal. This method can be used for any lit scene, including a SH-based PRT model.
ComputeDirectLightingSphericalHarmonics Computes the direct-lighting contribution to 3-D objects where the source radiance is represented by a spherical harmonic (SH) approximation.
ComputeDirectLightingSphericalHarmonicsAdaptive Computes the direct-lighting contribution to 3-D objects where the source radiance is represented by a SH approximation, using adaptive sampling. This method generates new vertices and faces on the mesh to more accurately approximate the PRT signal.
ComputeDirectLightingSphericalHarmonicsGpu Uses the graphics processing unit (GPU) to compute the direct-lighting contribution to 3-D objects where the source radiance is represented by a SH approximation. Computing the lighting on the GPU will generally be much faster than on the CPU.
ComputeLDPrtCoefficients Computes locally-deformable precomputed radiance transfer (LDPRT) coefficients relative to per-sample normal vectors to minimize the least-squares error with respect to input PrtBuffer data. These coefficients can be used with skinned or transformed normal vectors to model global effects on dynamic objects.
ComputeSubsurfaceScattering Computes the source radiance resulting from subsurface scattering, using material properties set by PrtEngine.SetMeshMaterials. This method can be used only for materials defined per-vertex in a mesh object.
ComputeSubsurfaceScatteringAdaptive Computes a transfer vector that maps source radiance to exit radiance resulting from subsurface scattering, using adaptive sampling and material properties set by PrtEngine.SetMeshMaterials. The method generates new vertices and faces on the mesh to more accurately approximate the PRT signal. This method can be used only for materials defined per-vertex in a mesh object.
static (Shared in Visual Basic) ComputeSuperClusters Used with compressed results of the vertex version of the PRT simulator. Generates "superclusters," which are groups of clusters that can be drawn in the same draw call. A greedy algorithm that minimizes overdraw is used to group the clusters.
ComputeSurfSamplesBounce Computes PRT samples for an arbitrary point (and normal vector).
ComputeSurfSamplesDirectSphericalHarmonics Computes, at an arbitrary point not on a mesh, a transfer vector that maps source radiance (represented by a SH approximation) to exit radiance.
ComputeVolumeSamples Computes a projection of the direct lighting from the previous light bounce into SH basis vectors that represent incident radiance at specified locations.
ComputeVolumeSamplesDirectSphericalHarmonics Computes a projection of distant lighting into SH basis vectors that represent incident radiance at specified locations.
static (Shared in Visual Basic) ConcatenateMeshes Concatenates a group of meshes into one common mesh. This method can optionally apply a matrix transformation to each input mesh and its texture coordinates.
Dispose Immediately releases the unmanaged resources used by the PrtEngine object.
Equals Returns a value that indicates whether the current instance is equal to a specified object.
ExtractPerVertexAlbedo Copies per-vertex albedo values from a mesh.
Finalize Allows the PrtEngine object to free resources before it is destroyed by the garbage collector.
FreeBounceData Frees memory used for temporary bounced-light simulation data.
FreeSubsurfaceScatteringData Frees memory used for temporary subsurface light scattering simulation data.
GetAdaptedMesh Returns a mesh with modifications resulting from adaptive spatial sampling. The returned mesh contains only positions, normals, and texture coordinates (if defined).
GetHashCode Returns the hash code for the current instance.
GetObjectByValue This member supports the infrastructure for Microsoft DirectX 9.0 for Managed Code and is not intended to be used directly from your code.
GetVertexAlbedo Retrieves albedo values of the mesh vertices.
MultiplyAlbedo Multiplies each PRT vector by the per-vertex albedo.
static (Shared in Visual Basic) op_Equality Compares the current instance of a class to another instance to determine whether they are the same.
static (Shared in Visual Basic) op_Inequality Compares the current instance of a class to another instance to determine whether they are different.
PrtEngine Initializes a new instance of the PrtEngine class.
raise_Disposing Raises the Microsoft.DirectX.Direct3D.PrtEngine.Disposing event when called from within a derived class.
ResampleBuffer Resamples an input PrtBuffer object and saves it to an output PrtBuffer object. This method can be used to convert a vertex buffer to a texture buffer and vice-versa. It can also be used to convert single-channel buffers to 3-channel buffers and vice-versa.
RobustMeshRefine Subdivides faces on a mesh, allowing for conservative adaptive sampling that will not eliminate features on the mesh.
ScaleMeshChunk Scales all the samples associated with a given submesh. The method is useful for computing subsurface scattering.
SetCallback Sets a delegate to an optional callback method that computes the percentage of SH computations completed and gives the caller the option of aborting the simulator.
SetMeshMaterials Sets mesh material properties in the 3-D scene. Use this method to specify subsurface scattering parameters.
SetMinMaxIntersection Sets the minimum and maximum distances of intersection between 3-D objects. These distance values can be used to control the minimum or maximum distance that objects can shadow or reflect light. For example, the method can be used to limit the shadowing of nearby features of a 3-D model.
SetPerTexelAlbedo Sets an albedo value for each texel, overwriting previous albedo values.
SetPerTexelNormal Sets a normal vector for each texel in a texture object. This method is used to store vertex normal vectors from a mesh (or interpolated vertex normals if pixel-based PRT is being computed).
SetPerVertexAlbedo Sets an albedo value for each mesh vertex, overwriting previous albedo values.
SetSamplingInfo Sets sampling properties used by the PRT simulator.
ShadowRayIntersects Uses efficient ray-tracing in precomputed radiance transfer (PRT) simulations to determine whether a ray intersects a mesh. Typically used to determine whether a given point is in shadow.
UpdateUnmanagedPointer Updates the unmanaged pointer for this PrtEngine object. This method supports the Microsoft .NET Framework infrastructure and is not intended to be used directly in your code.
Property Description
Disposed Gets a value that indicates whether the object is disposed.
NumberFaces Retrieves the number of faces in the mesh, including any new faces added as a result of adaptive spatial sampling.
NumberVertices Retrieves the number of vertices in the mesh, including any new vertices added as a result of adaptive spatial sampling.
UnmanagedComPointer Returns the unmanaged Component Object Model (COM) ID3DXPRTEngine interface pointer.

Inheritance Hierarchy

Object Leave Site
MarshalByRefObject Leave Site
PrtEngine

Remarks

To convert from RGB to luminance values, the following formula is used:

Luminance = R * 0.2125 + G * 0.7154 + B * 0.0721

Class Information

Namespace Microsoft.DirectX.Direct3D
Assembly Microsoft.DirectX.Direct3DX (microsoft.directx.direct3dx.dll)
Strong Name Microsoft.DirectX.Direct3DX,  Version=1.0.900.0,  Culture=neutral,  PublicKeyToken=d3231b57b74a1492

Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center