Render Pick CHOP
Summary
The Render Pick CHOP samples a rendering (from a Render TOP or a Render Pass TOP) and returns 3D information from the geometry at that particular pick location. Values sampled can include position, normals, point color, texture coordinates, depth and the object's path. An Info DAT should be used to retrieve the object's path.
The pick location is specified through uv coordinates of the rendering. These uv coordinates can be selected by clicking on a Panel Component or explicitly setting them in the U and V parameters in the Render Pick CHOP.
Along with the geometric data returned, this node has two channels 'picked' and 'trigger' that inform the picked status. 'picked' will be 1 when an object has been found at the search location. 'trigger' will be 1 when both an object has been found, and the 'Picking By' condition has been met. That is, either the 'Panel Value' is 1, or the 'Select' parmeter is 'On.
See also the multi-sample Render Pick DAT.
Parameters - Render Pick Page
strategy
- ⊞ - Decides when to update values based on pick interactions.
- While Select
select
-
- Hold First Picked
holdfirst
- Holds the values first returned when geometry picked.
- Hold Last Picked
holdlast
- Holds the values last returned when geometry picked. This differs from the Continuous strategy in that it will hold the last values picked on geometry if the pick starts sampling empty space (no geometry in that part of the scene). Alternatively, using the Continuous strategy the values will be cleared to zero if the pick starts sampling empty space.
- Always
always
-
clearprev
- This parameter is only enabled when the Strategy is set to Hold Last Picked. When this is on, starting a new pick on empty space will clear the values. When off, the last values will be held if the pick starts on empty space.
responsetime
- ⊞ - Determines when the values are updated.
- Next Cook (Faster)
nextcook
- The values are captured on the current frame and updated next frame. Results are from the previous frame, but much faster cook times.
- This Cook (Slower)
thiscook
- The values are captured and updated in the current frame.
pickradius
- Controls the radius of the search area for the pick. If nothing is found at the pick's center it will keep searching for geometry in the search area defined by the Pick Radius.
pickradstep
- Used to reduce the searching within the search area. The search area is sampled at locations that correspond to 'spokes' outwards from the center pick point.
pickcirstep
- Used to reduce the searching within the search area. The search area is sampled at locations that correspond to 'rings' outwards from the center pick point.
rendertop
- Specifies which render to sample.
usepickableflags
- When turned on only geometry whose Pickable Flag is on can be selected by the Render Pick CHOP. The Pickable Flag is found on all Object components.
includenonpickable
- Includes the non-pickable objects in the picking algorithm such that non-pickable objects may occlude pickable objects. For example, if there is only one pickable object in the scene with lots of additional non-pickable geometry is present, turning this parameter on will prevent the pickable object from being selected if it is behind a non-pickage object (occluded by the non-pickage object).
pickingby
- ⊞ - Determines how the pick location is set.
- Panel
panel
- Uses the Panel Component scoped in the Panel parameter. The uv position of the mouse on this component's control panel will be the uv position in the render that is sampled. The pick is active when the panel value specified by the Panel Value parameter is 1.
- Parameters
parameters
- Uses the U, V, and Pick parameters below for picking.
panel
- Specifies which panel component to use when picking by panel.
panelvalue
- Specifies with panel value to use to trigger the pick when picking by panel.
picku
- Sets the u coordinate when picking by parameters.
pickv
- Sets the v coordinate when picking by parameters.
select
- When picking by parameters, picking is active when this parameter = 1.
activatecallbacks
- Enables Callback DAT for each pick event.
callbacks
- Path to a DAT containing callbacks for pick event received.
Parameters - Options Page
position
- ⊞ - Returns the position of the point picked on the geometry. Channels tx, ty, tz.
- No
no
- Do not return position values.
- In SOP Space
sopspace
- Return position of point picked in SOP transform space.
- In World Space
worldspace
- Return position of point picked in world transform space.
- In Camera Space
cameraspace
- Return position of point picked in camera transform space.
- Relative to Object
relativetoobj
- Return position of point picked relative to object specified in Reference Object parameter.
normal
- ⊞ - Returns the normals of the point picked on the geometry. Channels nx, ny, nz.
- No
no
- Do not return normal values.
- In SOP Space
sopspace
- Return normals of point picked in SOP transform space.
- In World Space
worldspace
- Return normals of point picked in world transform space.
- In Camera Space
cameraspace
- Return normals of point picked in camera transform space.
- Relative to Object
relativetoobj
- Return normals of point picked relative to object specified in Reference Object parameter.
referenceobj
- Object used when fetching position or normals Relative to Object.
color
- Returns the point color of the point picked on the geometry. Channels cr, cg, cb, ca.
uv
- Returns the texture coordinates of the point picked on the geometry. Channels mapu, mapv, mapw.
path
- Return the path to the object that is picked. This result requires and Info DAT with its Node Path parameter referecning the Render Pick CHOP.
depth
- Returns the depth of the point picked on the geometry. This value a non-linear ratio of the point's position between the near and far planes of the Depth Buffer. Channel is depth.
instanceid
- Returns the Instance ID of the object. This will always be 0 if instancing is off. Channel is instance.
customattrib1
- Specify which custom attributes to return from the object.
customattrib1type
- The type of attribute is selected from this menu.
customattrib2
- Specify which custom attributes to return from the object.
customattrib2type
- The type of attribute is selected from this menu.
customattrib3
- Specify which custom attributes to return from the object.
customattrib3type
- The type of attribute is selected from this menu.
customattrib4
- Specify which custom attributes to return from the object.
customattrib4type
- The type of attribute is selected from this menu.
Parameters - Common Page
timeslice
- Turning this on forces the channels to be "Time Sliced". A Time Slice is the time between the last cook frame and the current cook frame.
scope
- To determine which channels get affected, some CHOPs use a Scope string on the Common page.
srselect
- ⊞ - Handle cases where multiple input CHOPs' sample rates are different. When Resampling occurs, the curves are interpolated according to the Interpolation Method Option, or "Linear" if the Interpolate Options are not available.
- Resample At First Input's Rate
first
- Use rate of first input to resample others.
- Resample At Maximum Rate
max
- Resample to the highest sample rate.
- Resample At Minimum Rate
min
- Resample to the lowest sample rate.
- Error If Rates Differ
err
- Doesn't accept conflicting sample rates.
exportmethod
- ⊞ - This will determine how to connect the CHOP channel to the parameter. Refer to the Export article for more information.
- DAT Table by Index
datindex
- Uses the docked DAT table and references the channel via the index of the channel in the CHOP.
- DAT Table by Name
datname
- Uses the docked DAT table and references the channel via the name of the channel in the CHOP.
- Channel Name is Path:Parameter
autoname
- The channel is the full destination of where to export to, such hasgeo1/transform1:tx
.
autoexportroot
- This path points to the root node where all of the paths that exporting by Channel Name is Path:Parameter are relative to.
exporttable
- The DAT used to hold the export information when using the DAT Table Export Methods (See above).
Info CHOP Channels
Extra Information for the Render Pick CHOP can be accessed via an Info CHOP.
Common CHOP Info Channels
- start - Start of the CHOP interval in samples.
- length - Number of samples in the CHOP.
- sample_rate - The samplerate of the channels in frames per second.
- num_channels - Number of channels in the CHOP.
- time_slice - 1 if CHOP is Time Slice enabled, 0 otherwise.
- export_sernum - A count of how often the export connections have been updated.
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: