object test
With this node you can perform various tests against an object by using the particle position or any arbitrary position.
[Inputs]
#Particle Stream - This pin requires a particle stream to be connected. Connection is not required if Input (Position) pin is connected.
#Input (Position) - If this pin is connected then this position will be used to test against the object.
#Input (Object) - This pin is by default set to Object where particle in the input will be tested against the object from the list. If you right click on this pin you can change it to Input (Shape) which will then use particle shape.
Enabled - Enable or disable node evaluation.
Objects
Objects by RegEx - You can use regex (regular expressions) to select objects in the scene. This is a very powerful tool to automatize the process.
Objects - List of objects that you want to use. Double click on object name to remove it from the list or use Remove button. You can select multiple objects.
Animated Mesh - Enable this option if objects are animated in any way. Keeping this option disabled results in faster computations.
Properties
Test Type - There are five different test types:
- Surface Distance - This option lets you find the closest distance between the input position at the location on the object surface. With multiple objects, only the closest location is passed to the output.
- Inside Object - A test that checks whether a point is inside any of the object on the list or not.
- Raycast Hit - This option performs ray/triangle intersection calculations.
- Inside Bounding Box - Testing if particle is inside the bounding box of any object from the Objects lists.
- Vertices - This option lets you find the closest distance between the input position and vertices on the surface. With multiple objects only the closest location is passed to the output. If Output Averages option is enabled then all the output values will be averages based on vertices that were found.
Max. Distance - Any location that is further away than Max. Distance will be skipped from test.
Output Averages - This option is available only if test type is set to Vertex Distance and it allows user to compute average values of nearby vertices and set those values to output pins.
Max. Verts - This option is available only if test type is set to Vertex Distance and it defines maximum vertices number that will be used to compute average values.
Direction - Direction of the ray for Raycast Hit test. Most of the time you'll probably connect particle velocity to this pin.
UVW Map Channel - This channel is related to the output UVW coordinates. It is not used unless output UVW and related pins are connected.
[Outputs]
Visibility of outputs will depend on the Test Type selection. In the case were Test Type is set to Vertices and Output Averages is selected, output Distance, Position, Direction and VNormal will be average values of all vertices that have been found.
Hit - Set true if Raycast Hit or Surface Distance have succeeded.
Shape Particle - This pin is visible if Input (Shape) is used. In that case it will output the shape's particle on the output so that you can perform additional operations with that particle if needed.
Inside - Set true if Inside Object test type has found that point is located inside object.
Position - Position on object for Raycast Hit or Surface Distance.
FNormal - Face normal of the closest/hit face.
VNormal - Interpolated vertex normal on the closest/hit face.
Face Area - Area of the closest/hit face.
Face MtlID - Material ID of the closest/hit face.
Face Sel - Set true if face is selected.
Backside - Position on object for Raycast Hit or Surface Distance is located on the backside of the face.
UVW - UVW coordinates of UVW Map Channel at the test location. Often used by nodes such as Texmap and Texmap Gradient.
dPdU - The dPdU coordinates on the closest/hit face (used by texmap gradient node).
dPdV - The dPdV coordinates on the closest/hit face (used by texmap gradient node).
Direction - Direction from particle/position towards the position on the closest/hit face.
Distance - Distance between particle/position and the closest/hit face position.