Close

Experimental:Projection POP

Summary

The Projection POP takes a float3 3D spatial attribute, like P, and outputs to a float3 attribute, transforming the attribute between cartesian (orthographic), polar, cylindrical, and perspective coordinate systems. For example, all the the points in cartesian X, Y and Z format can be converted into a polar longitude/latitude/radius format.

The menu From Coordinate System lets you choose how to interpret the 3 numbers of the input attribute:

  • Cartesian treats the 3 numbers of the float3 attribute as X, Y and Z in the usual 3D "orthogonal" coordinate space. (In TouchDesigner X is horizontal left-to-right, Y is vertical bottom to top. Z is along line of sight distant to near.)
  • Spherical treats the three numbers of the attribute as longitude, latitude and radius, assuming the axis is the vertical Y axis.
  • Cylindrical treats the 3 numbers of the attribute as latitude (angle around Y), Y value and a radius.
  • Screen Space is a perspective form along the Z axis - you need to specify additional camera/perspective info. 0,0 is the bottom left corner, 1, 1 is top right.
  • Normalized Device Coordinates (NDC) - For points within the field of view, the first and second components are between -1 and 1 where 0,0 is at the center. The third component is between 0 and 1 (as re-ranged to the Near and Far distances).

The menu To Coordinate System lets you choose what form you want the 3 numbers of the output attribute to be in.

The angles can be expressed in

  • Degrees in the usual graphics standard (360 is a full rotation), or
  • Radians (Pi 3.14157 is one full rotation)
  • Cycles (value of 1 means one full 360 degrees rotation)
  • Normalized - a 0-1 normalized form which, like Spherical longitude is like a wraparound: looking along the -Z axis, the value is 0 at the back, .25 the left, .5 is face-on, .75 at the right, and 1 at the back. For latitude the value goes from 0 at the south pole and 1 at the north pole. This is used for mapping a texture on a sphere sometimes.

See also tbe Sphere POP, Tube POP, Normalize POP and the Texture Map POP.

PythonIcon.pngprojectionPOP_Class


Parameters - Projection Page

Attribute Class attrclass - -
  • Point point -
  • Vertex vertex -
  • Primitive primitive -

Group group -

Input Attribute Scope inputattrscope -

From Coordinate System fromcoordsys - -
  • Cartesian cartesian -
  • Spherical spherical -
  • Cylindrical cylindrical -
  • Screen Space screenspace -
  • Normalized Device Coordinates ndc -

To Coordinate System tocoordsys - -
  • Cartesian cartesian -
  • Spherical spherical -
  • Cylindrical cylindrical -
  • Screen Space screenspace -
  • Normalized Device Coordinates ndc -

Angle Units angunit - -
  • Degrees deg -
  • Radians rad -
  • Cycles cycle -
  • Normalized norm -

Camera camera -

Aspect Correct UVs aspectcorrectuv -

Aspect Ratio aspect - -
  • Aspect Ratio aspectx -
  • Aspect Ratio aspecty -

Horizontal FOV fov -

Near near -

Far far -

Output Attribute Scope outputattrscope - -
  • P P -
  • N N -
  • Color Color -
  • Color.i012 Color.i012 -
  • Tex Tex -
  • PointScale PointScale -
  • LineWidth LineWidth -


Override Automatic Attribute overrideautoattr -

New Attribute Type newattrtype - -
  • float float -
  • double double -
  • int int -
  • uint uint -
  • dir dir -
  • dbl dir ddir -

New Attribute Number of Components attrnumcomps - -
  • 1 1 -
  • 2 2 -
  • 3 3 -
  • 4 4 -

New Attribute Default Value newattrdefaultval - -
  • New Attribute Default Value newattrdefaultval1 -
  • New Attribute Default Value newattrdefaultval2 -
  • New Attribute Default Value newattrdefaultval3 -
  • New Attribute Default Value newattrdefaultval4 -


Parameters - Common Page

Bypass bypass -

Delete Input Attributes delinputattrs -


Operator Inputs

  • Input 0: -


Info CHOP Channels

Extra Information for the Projection POP can be accessed via an Info CHOP.

Common POP Info Channels

Common Operator Info Channels

  • total_cooks - Number of times the operator has cooked since the process started.
  • cook_time - Duration of the last cook in milliseconds.
  • cook_frame - Frame number when this operator was last cooked relative to the component timeline.
  • cook_abs_frame - Frame number when this operator was last cooked relative to the absolute time.
  • cook_start_time - Time in milliseconds at which the operator started cooking in the frame it was cooked.
  • cook_end_time - Time in milliseconds at which the operator finished cooking in the frame it was cooked.
  • cooked_this_frame - 1 if operator was cooked this frame.
  • warnings - Number of warnings in this operator if any.
  • errors - Number of errors in this operator if any.


TouchDesigner Build: