PxrProjector

PxrProjector

This node is meant to work in conjunction with PxrProjectionLayer but can be used as a general projection manifold. This manifold supports camera, spherical and cylindrical mapping. It encapsulates 2D parameterization for pattern generators and allows transformations and selection of arbitrary variables bound to primitives.

Input Parameters

Projection

Select a projection:

  • 0: Camera
  • 1: Spherical
  • 2: Cylindrical
RIB: int projection
Default: 0

Coordinate System

Name of coordinate system transform (e.g. place3dTexture node in Maya).

RIB: string coordsys
Default: ""
  • Important:

    You must set a coordinate system.

Use

Selects the positions you are going to project on.

  • 0: P - N

    P is the current position and N the current normal

  • 1: Pref - Nref

    Use this if your object if deforming and you want the projected texture to 'stick'. This relies on two primvars : __Pref and __Nref that should be present on the deforming geometry. In Maya, use the RenderMan > Primvars > Freeze menu to add them to the selected geometry.

  • 2: WPref - WNref

    This will allow your projected texture to stick if the object is deforming AND transformed. It relies on __WPref and __WNref primvars. In Maya, use the RenderMan > Primvars > Freeze menu to add them to the selected geometry.

RIB: int use
Default: 0

Occlusion

frontOnly

Restricts the projection to the points facing the projection direction.

RIB: int frontOnly
Default: 1

Front Falloff

Introduces a smooth transition when using frontOnly. Useful to blend transitions between different projections. The default, 0.0, means no falloff.

RIB: float frontFalloff
Default: 0.0

Trace Occlusion

Shoots rays to avoid projecting on areas that are occluded by geometry, from the projections point of view.

RIB: int traceOcclusion
Default: 1

Trace Max Distance

When traceOcclusion is on, you can limit the ray length. This number is expressed in scene units, whatever it may be in your authoring package.

RIB: float traceMaxDistance
Default: 1.0

Trace Set

The name of a trace set to restrict ray hits to a specific group of objects. The derfault is to consider all objects in the scene.

RIB: string traceSet
Default: ""

Camera

Horizontal Resolution

The horizontal image resolution. This is used to specify your image's original resolution, prior to txmake-ing.

RIB: int resolutionX
Default: 2048

Vertical resolution

The vertical image resolution. This is used to specify your image's original resolution, prior to txmake-ing.

RIB: int resolutionY
Default: 1556

Focal Length

The focal length of the camera in degrees.

RIB: float focalLength
Default: 5.0

Horizontal Aperture

The width of your camera's film back in inches.

RIB: float apertureX
Default: 0.98

Vertical Aperture

The height of your camera's film back in inches.

RIB: float apertureY
Default: 0.735

Near Clip Plane

Positions closer than this distance from the coordinate system will be masked. This number is expressed in scene units, whatever it may be in your authoring package.

RIB: float nearClipPlane
Default: 0.01

Far Clip Plane

Positions farther than this distance from the coordinate system will be masked. This number is expressed in scene units, whatever it may be in your authoring package.

RIB: float farClipPlane
Default: 1.0

Film Fit

The way your image is fitted to the film back if they have different aspect ratios. This is mimicking Maya's camera settings.

  • 0: Fill
  • 1: Horizontal
  • 2: Vertical
  • 3: overscan
RIB: int filmFit
Default: 0

Clamp To

Activates the mask output. You can mask different areas but this is mostly useful with camera projection.

  • 0: Off
  • 1: Frustum
  • 2: Texture
RIB: int clampTo
Default: 1

2D Parameters

Angle

Rotation angle around the origin.

RIB: float angle
Default: 0.0

Scale S

Frequency of feature in the S direction.

RIB: float scaleS
Default: 1.0

Scale T

Frequency of feature in the T direction.

RIB: float scaleT
Default: 1.0

Offset S

Offset from the origin in the S direction.

RIB: float offsetS
Default: 0.0

Offset T

Offset from the origin in the T direction.

RIB: float offsetT
Default: 0.0

Invert T

Flip the manifold in the T direction.

RIB: int invertT
Default: 1

Advanced

Verbose

Outputs various infos to help you debug your scenes.

RIB: int verbose
Default: 0

Output Parameters

result

The 2D manifold.

resultS

A float representation of the S component of the manifold.

resultT

A float representation of the T component of the manifold.

resultMask

A binary mask defining a restricted projection area. Should be plugged into the mask input of PxrProjectionLayer.