Difference between revisions of "Non-Spatial Objects"

From Constructive Labs
Jump to navigation Jump to search
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
These objects are for “programming” making objects interactive.
+
These objects are for “programming” -- making objects interactive.
  
 
==Logic objects==
 
==Logic objects==
 +
These objects are for comparing the value of things to make decisions
 
* AndGate
 
* AndGate
 
* OrGate
 
* OrGate
Line 9: Line 10:
  
 
==Variables objects==
 
==Variables objects==
 +
These objects are for storing the value of something
 +
 
[[File:Variables.png]]
 
[[File:Variables.png]]
* Value
+
* Value - any value
* IntegerValue
+
* IntegerValue - a whole number
* FloatValue
+
* FloatValue - a decimal number
* BoolValue
+
* BoolValue - true or false
* Vector3fScaler
+
* Vector3fScaler - stores three float values
* Vector3fValue
+
* Vector3fValue - stores three float values. A vector is a set of 3 related numbers, typically an X,Y,Z position
* Euler -= rotation: pitch yaw and roll
+
* Euler - stores a rotation: pitch, yaw and roll
* Material
+
* Material - stores a material, which contains color
* String (for resource locators and text in TextQuads)
+
* String - stores test characters (for resource locators and text in TextQuads)
* color3f
+
* color3f - stores a color
  
 
==Array Objects==
 
==Array Objects==
A complete set of Arrays of the above, which can be iterated though, presenting a current value to wiring.  This enables you to, say, switch the resource locator on a mesh though a set, either from a timer or from a button.
+
Arrays are an ordered list of variables, used to store several items. A complete set of Arrays of the above variables, which can be iterated (stepped) though, presenting a selected value for wiring.  This enables you to, say, switch the resource locator on a mesh though a set, either from a timer or from a button.
 
* IntegerArray
 
* IntegerArray
 
* FloatArray
 
* FloatArray
Line 35: Line 38:
 
A vector is a set of 3 related numbers, typically an X,Y,Z position, or rotation specification. Offset allows adding one vector to another to do something like change the position.
 
A vector is a set of 3 related numbers, typically an X,Y,Z position, or rotation specification. Offset allows adding one vector to another to do something like change the position.
  
A complete set of offsets – these are dataflow components – wire something like a position and it will present at the output a value offset by the value of the offset.  Or they can be use “get” style.
+
A complete set of offsets – these are dataflow components – wire something like a position and it will present at the output a value offset by the value of the offset.  Or they can be used “get” style.
 
* IntegerOffset
 
* IntegerOffset
 
* FloatOffset
 
* FloatOffset
Line 44: Line 47:
  
 
==Splitters==
 
==Splitters==
Mux (takes a complex type like Vector3f in input and splits it into 3 values, x, y, z in output) and DeMux, which performs the reverse.  Allows you to process just one component of a complex type in wiring, and then turn it back into a vector type >Vector3fMutiplexer - unpacks a vector into 3 individual values
+
Mux (takes a complex type like Vector3f in input and splits it into 3 values, x, y, z in output) and DeMux, which performs the reverse.  Allows you to process just one component of a complex type in wiring, and then turn it back into a vector type
 
* EulerMux
 
* EulerMux
 
* EulerDemux
 
* EulerDemux
 
* Color3fMux
 
* Color3fMux
 
* Color3fDemux
 
* Color3fDemux
* Vector3fMux
+
* Vector3fMux -- unpacks a vector into 3 individual values
 
* Vector3fDemux
 
* Vector3fDemux
  
 
==Interpolators==
 
==Interpolators==
A set of interpolators which “tween” values between two end values (start and end).  These exist for things which make sense to tween = Integers, floats, Vector3f, Euler, and Color3f
+
A set of interpolators which “tween” values between two end values (start and end).  These exist for things which make sense to tween = Integers, floats, Vector3f, Euler, and Color3f.
given two vectors,and an amount float that ranges from zero to one,  this outputs an altered vector that is interpolated between the two vectors based on the amount.
+
 
 
* IntegerInterpolator
 
* IntegerInterpolator
 
* FloatInterpolator
 
* FloatInterpolator
 
* Color3fInterpolator
 
* Color3fInterpolator
 
* EulerInterpolator
 
* EulerInterpolator
* Vector3fInterpolator
+
* Vector3fInterpolator - Given two vectors, and an amount float that ranges from zero to one,  this outputs an altered vector that is interpolated between the two vectors based on the amount.
  
 
==Resource objects==
 
==Resource objects==
Line 70: Line 73:
 
* IntegerTrigger- fires a message when an integer number is equal to another
 
* IntegerTrigger- fires a message when an integer number is equal to another
 
* ProximityDetector - sends a message when an object gets close to another object
 
* ProximityDetector - sends a message when an object gets close to another object
 +
 +
==Twiddlers==
 +
* '''Vector3fTwiddle''' - swap axes (e.g. make the X axis value output as the Y azis value and vice versa) Has X Y Z properties that you set to "X", "Y" or "Z"
  
 
==Random==
 
==Random==
Two variants for random offsets are also implemented.  Use these to add noise to movement.
+
Random generates a random number. Two variants for random offsets are also implemented.  Use these to add noise to movement.
 
* '''Random->RanFloat - random number
 
* '''Random->RanFloat - random number
 
* '''Random'''->RanVec3
 
* '''Random'''->RanVec3
  
 
==Teleport==
 
==Teleport==
* Reparenter
+
===Reparenter Object===
* Teleport - Contains a destination location, orientation and zone. When its '''Go''' method triggered, it moves the user to that destination
+
'''Reparenter''' - changes the parent of an object. Objects, by default have the zone as their parent. This object enables you to set another object as the parent - typically a Composite object.
 +
 
 +
Any position is going to be relative to the new parent.  If you just reparent wo having sendPosition and sendRotation turned on, you will just stay in the same place but be attached to the new parent
 +
 
 +
in the case of reparenting to a composite, the path is just the name of the composite
 +
 
 +
In the case of reparenting to the zone, leave it blank or "Zone"
 +
 
 +
Does not work across zones.  use Teleport for that
 +
 
 +
You can only reparent to composites
 +
 
 +
If a composite is inside a composite that would be Composite0/CompositeN
 +
===SpawnPoint Object===
 +
The SpawnPoit object is the destination of a reparent action. When a reparenter does a reparentUser action, the user is placed at the location of the spawnPoint object.
 +
===Teleport Object===
 +
'''Teleport''' - Contains a destination location, orientation and zone. When its '''Go''' method triggered, it moves the user to that destination
  
 
There are five properties of the Teleport object that are relevant to where the user will be placed and how their viewpoint will be rotated:
 
There are five properties of the Teleport object that are relevant to where the user will be placed and how their viewpoint will be rotated:
Line 95: Line 117:
  
 
==Timer objects==
 
==Timer objects==
* OneShotTimer - sends a message after a delay
+
* '''OneShotTimer''' - sends a message after a delay
* Timer - sends periodic messages
+
* '''Timer''' - sends periodic messages
  
 
==Controllers==
 
==Controllers==
 
The new controller objects are easier to use – just hook up “controlOut” on a controller/mover to “controlIn” on an object being controller and it will automatically “just work” once you set its running property to true.
 
The new controller objects are easier to use – just hook up “controlOut” on a controller/mover to “controlIn” on an object being controller and it will automatically “just work” once you set its running property to true.
 
If you want to go old school and use data flow type wiring to modify the output of a controller (say using offsets) appropriate “output” outputs also exist on the various controllers to wire to things like splitters, interpolators, etc.
 
If you want to go old school and use data flow type wiring to modify the output of a controller (say using offsets) appropriate “output” outputs also exist on the various controllers to wire to things like splitters, interpolators, etc.
* EllipseMover2 – move things on ellipses
+
* '''EllipseMover2''' – move things on ellipses (or a circle), Interval defines the time in milliseconds between each step, Steps is the number of steps along the circumference, X and Y radius determine the size of the ellipse.
* RotationContoller2 – controls rotation
+
* '''RotationContoller2''' – controls rotation around a selected axis, number of Steps defines the angle and Interval defines the number of millisconds for each step.
* WaypointMover2 – moves things around on waypoints, replaces previous embedded functionality
+
* '''WaypointMover2''' – moves things around on a path defined by Waypoint objects. See [[Moving_Objects_Along_Paths]]
* LookAtController2 – look at things – ie giant eyeballs follow something you drag.
+
* '''LookAtController2''' – look at things – i.e. giant eyeballs follow something you drag.
* ScannerController2 – move things back and forth in a line
+
* '''ScannerController2''' – move things back and forth in number of steps in a line. Interval defines the time in milliseconds between each step.
* SineController2 – move things on Sine waves (with adjustable phase – so can do Sin, Cos or anything between)
+
* '''SineController2''' – move things on Sine waves (with adjustable phase – so can do Sin, Cos or anything between)
 +
 
 
==Debugging==
 
==Debugging==
 
* EdgeDebugger – wire something like positionChanged output to this and observe the values on the wire using the PropertyEditor – it adds values for the values inside the parameter node
 
* EdgeDebugger – wire something like positionChanged output to this and observe the values on the wire using the PropertyEditor – it adds values for the values inside the parameter node
 +
 +
Next: '''[[Animated_Objects]]'''

Latest revision as of 17:09, 13 May 2022

These objects are for “programming” -- making objects interactive.

Logic objects

These objects are for comparing the value of things to make decisions

  • AndGate
  • OrGate
  • NandGate
  • XorGate
  • SimpleSequencer - an object that steps through a number of outputs

Variables objects

These objects are for storing the value of something

Variables.png

  • Value - any value
  • IntegerValue - a whole number
  • FloatValue - a decimal number
  • BoolValue - true or false
  • Vector3fScaler - stores three float values
  • Vector3fValue - stores three float values. A vector is a set of 3 related numbers, typically an X,Y,Z position
  • Euler - stores a rotation: pitch, yaw and roll
  • Material - stores a material, which contains color
  • String - stores test characters (for resource locators and text in TextQuads)
  • color3f - stores a color

Array Objects

Arrays are an ordered list of variables, used to store several items. A complete set of Arrays of the above variables, which can be iterated (stepped) though, presenting a selected value for wiring. This enables you to, say, switch the resource locator on a mesh though a set, either from a timer or from a button.

  • IntegerArray
  • FloatArray
  • BoolArray
  • Color3fArray
  • StringArray
  • EulerArray
  • Vector3fArray
  • MaterialArray

Offsets

A vector is a set of 3 related numbers, typically an X,Y,Z position, or rotation specification. Offset allows adding one vector to another to do something like change the position.

A complete set of offsets – these are dataflow components – wire something like a position and it will present at the output a value offset by the value of the offset. Or they can be used “get” style.

  • IntegerOffset
  • FloatOffset
  • Color3fOffset
  • EulerOffset
  • Vector3fOffset
  • Vector3fRandomOffset

Splitters

Mux (takes a complex type like Vector3f in input and splits it into 3 values, x, y, z in output) and DeMux, which performs the reverse. Allows you to process just one component of a complex type in wiring, and then turn it back into a vector type.

  • EulerMux
  • EulerDemux
  • Color3fMux
  • Color3fDemux
  • Vector3fMux -- unpacks a vector into 3 individual values
  • Vector3fDemux

Interpolators

A set of interpolators which “tween” values between two end values (start and end). These exist for things which make sense to tween = Integers, floats, Vector3f, Euler, and Color3f.

  • IntegerInterpolator
  • FloatInterpolator
  • Color3fInterpolator
  • EulerInterpolator
  • Vector3fInterpolator - Given two vectors, and an amount float that ranges from zero to one, this outputs an altered vector that is interpolated between the two vectors based on the amount.

Resource objects

  • Resource
  • Spawner

Triggers

  • FloatTrigger - fires a message when a float number is equal to another
  • Trigger - fires a message
  • IntegerTrigger- fires a message when an integer number is equal to another
  • ProximityDetector - sends a message when an object gets close to another object

Twiddlers

  • Vector3fTwiddle - swap axes (e.g. make the X axis value output as the Y azis value and vice versa) Has X Y Z properties that you set to "X", "Y" or "Z"

Random

Random generates a random number. Two variants for random offsets are also implemented. Use these to add noise to movement.

  • Random->RanFloat - random number
  • Random->RanVec3

Teleport

Reparenter Object

Reparenter - changes the parent of an object. Objects, by default have the zone as their parent. This object enables you to set another object as the parent - typically a Composite object.

Any position is going to be relative to the new parent. If you just reparent wo having sendPosition and sendRotation turned on, you will just stay in the same place but be attached to the new parent

in the case of reparenting to a composite, the path is just the name of the composite

In the case of reparenting to the zone, leave it blank or "Zone"

Does not work across zones. use Teleport for that

You can only reparent to composites

If a composite is inside a composite that would be Composite0/CompositeN

SpawnPoint Object

The SpawnPoit object is the destination of a reparent action. When a reparenter does a reparentUser action, the user is placed at the location of the spawnPoint object.

Teleport Object

Teleport - Contains a destination location, orientation and zone. When its Go method triggered, it moves the user to that destination

There are five properties of the Teleport object that are relevant to where the user will be placed and how their viewpoint will be rotated:

  1. TargetZone
  2. TargetPosition
  3. TargetRotation
  4. SendRotation
  5. SendPosition
  • If the TargetZone property has a value (the name of that zone) then we are going to switch to that zone. If it is empty, we stay in the current zone.
  • SendPosition and SendRotation must be true (checked) for TargetPosition and TargetRotation respectively to have any effect. If teleporting within the current zone, you must set one or both of these to be true.
  • If SendPosition is true, then when the user arrives in the new zone, the SpawnPosition of that zone is overridden and the user is positioned at the TargetPosition
  • If SendRotation is true, then when the user arrives, the SpawnRotation of that zone is overridden and the users eyes are forced to look in the direction specified by the TargetRotation property.
  • If both SendPosition and SendRotation are false, then the user arrives at the SpawnPosition and SpawnRotation specified in the target zone.

Timer objects

  • OneShotTimer - sends a message after a delay
  • Timer - sends periodic messages

Controllers

The new controller objects are easier to use – just hook up “controlOut” on a controller/mover to “controlIn” on an object being controller and it will automatically “just work” once you set its running property to true. If you want to go old school and use data flow type wiring to modify the output of a controller (say using offsets) appropriate “output” outputs also exist on the various controllers to wire to things like splitters, interpolators, etc.

  • EllipseMover2 – move things on ellipses (or a circle), Interval defines the time in milliseconds between each step, Steps is the number of steps along the circumference, X and Y radius determine the size of the ellipse.
  • RotationContoller2 – controls rotation around a selected axis, number of Steps defines the angle and Interval defines the number of millisconds for each step.
  • WaypointMover2 – moves things around on a path defined by Waypoint objects. See Moving_Objects_Along_Paths
  • LookAtController2 – look at things – i.e. giant eyeballs follow something you drag.
  • ScannerController2 – move things back and forth in number of steps in a line. Interval defines the time in milliseconds between each step.
  • SineController2 – move things on Sine waves (with adjustable phase – so can do Sin, Cos or anything between)

Debugging

  • EdgeDebugger – wire something like positionChanged output to this and observe the values on the wire using the PropertyEditor – it adds values for the values inside the parameter node

Next: Animated_Objects