Make Your First Effect With Visual Scripting
Try making a simple effect by using the Mouth open and Mouth close actions to change the visibility of a cube. You can also follow along in the sections below. Here is a demo of the final result and the project package:
Add an Object and Nodes
- To start, add a 3D cube object to the scene by clicking the Add button [+].
- Go to 3D and click Cube. Adjust the Position parameters of the cube to place it in the desired position on your screen.
- Since you are using mouth open/close actions as triggers, select a Mouth Open demonstration video from the drop-down list in the Preview panel to test the effect.
- Right click in the Visual Scripting panel, and search for and select the Facial Movement Detection. Set the Facial Movement property to Mouth Open.
- In the node information, check the required inputs. Since Set Visibility needs to take an Object, select the cube object from the Hierarchy panel and drag it to the Visual Scripting panel. This will create the cube object node automatically.
- Set the visibility value. There is a checkbox next to the Value of Visibility On. Select or deselect it to set the value to true (visible) or false (invisible), respectively.
Link the Nodes
- Link the Begin output of Facial Movement Detection to the Enter input of Set Visibility, link the Entity output of Cube to the Target input of Set Visibility, and then deselect the checkbox next to the Visibility On input of Set Visibility.
- Add a new Set Visibility node in order to make the cube visible when the mouth is closed. Link the newly added nodes accordingly and select the Visibility On checkbox this time. You can move the nodes around to clean up and organize your interface.
- Congratulations! Now that you’ve learned the basics of visual scripting, feel free to incorporate it into your own effects.