Skip to content

Expressions Colliders Pendulums Props

lunazera edited this page Apr 10, 2024 · 6 revisions

Expressions, Colliders, Pendulums and Props

Expressions

VNyan's Expression menu allows you to create Blendshape rulesets or conditions to trigger or control other blendshapes. For instance, if you want a "laughter" expression to activate when both your eyes are closed and your mouth is smiling and open, you could set an expression that does this.

Blendshape Conditions

You can set multiple blendshapes to control whether the expression is turned on or off. Enter the blendshape name and enter the minimum and maximum values for when the expression should be active.

Output Values

Your expression can either set the value of different blendshapes and hold them there, or it can scale the blendshape by a multiplier. If using Set Value, you only need to enter a number in the Value field and how many seconds for the blendshape to smoothly transition. If using Multiply, enter in the multiplier value, the minimum and maximum range for that blendshape, and the smoothing transition time.

Colliders

VNyan has a few built-in colliders that are mainly used for interactions within VNyan. Many physics effects like the water and slime nodes, or item interactions like for the drop node or food node rely on these colliders. You can adjust the size and placement of these colliders to your avatar in the Colliders etc menu.

These colliders might impact other elements on your model if they interact with other colliders in the world, such as particle emitters. For particle emitters, if they are set to collide with only the default setting and nothing else, then they will not interact with VNyan's built-in colliders.

There are also settings specific for the placement of food items here.

Pendulum Chains

VNyan features a Pendulum chain physics system. These can be used to create things like eye wobbles, flowy arm or rig movements, or more!

How to create a Chain

Use the Amount of Pendulums slider to set how long you want your pendulum (up to 10 bones), and then press Add Chain. The chain length cannot be changed once created, so make sure you make it as long as you need. Generally it's better to have the chain be a bit longer than what length you will use, as more joints will help stabilize the chain's movement.

Input Values

Pendulum chains are moved or driven by either parameters or blendshapes. You can set multiple inputs to drive the chain by pressing the + icon. Set whether the input is a parameter or a blendshape, and what name it should be listening for. Movement will always be based on the first point in the chain.

  • Multiplier scales how much the input values move the chain. Setting a negative scale number here will also reverse the driven motion.
  • Effect sets whether the parameter will move the chain horizontally, or rotate the angle of the chain. When using Pos X, the whole chain will sway and come to rest in a vertical line. When using angle, the whole chain will rotate and sway, but come to rest at that new rotation. This might be useful if you want parameter changes to maintain some change in movement.

Output Values

You can set multiple outputs from your pendulum chain which can either affect a blendshape, parameter, or the rotation of a game object attached to your model.

  • Bone # sets which pendulum bone to use. Bone # 1 corresponds to the first bone or point in the chain, however as this is used to drive the chain it will not give you any useful output. Instead, start with at least bone # 2.
  • Blendshape/Negative Blendshape will have the pendulum bone drive two opposing blendshape values. This can be useful if you have two blendshapes you want to correspond with movement back and forth.
  • Parameter will have the pendulum bone output into your named parameter, allowing you to use that in other graphs. Multiplier scales this output if you need the bone to result in larger number changes, and Offset additively shifts this parameter (for example, if you wanted the bone to output values around a rest value of 5, you would put 5 for your offset).
  • Avatar GameObject will have the pendulum bone transform a game object attached to your avatar. This could be your model's main skeleton bone, additional bones like for ears or a tail, or any prop. You can choose to transform the rotation in the X, Y, or Z axis.

Pendulum Settings

These four sliders controls the physical motion of your pendulum chain. Here are some descriptions on how the sliders work, however your best bet will be to

  • Damping - Drag on the pendulums motion, reducing oscillations or how long it swings for. Higher damping results in slower movement with less swings, while lower damping results in more chaotic movement with more swings.
  • Elasticity - How much force each bone transfers to the next bone. High elasticity will result in the chain moving all together in a straight line, while low elasticity will result in the chain not following the previous bones motion
  • Stiffness - How stiff the links are between each bone. Higher stiffness results in the chain moving altogether.
  • Inert - How resistive each bone is to movement. Higher inertia means that more force/movement from each bone will be required to swing the next bone.

Import/Export

You can export your chain with the Export Chain button, and import chains with the Import Chain button. Chains are stored as a .vnchain file. Importing a new chain will not replace existing chains, and instead add to the list.

Props

VNyan has a system for placing props on your model that you can access from the side menu. There are a few types of props you can add: .png images, .gif animated images, vnyan props, Spout2 sources, Text, and browser sources.

VNyan Prop object

VNyan has it's own package bundle for props that can be made in unity using the VNyan SDK. These will have the extension .vnprop. Props can have different animators such as Dynamic Bones, particle effects, custom shaders and more.

VNyan Prop objects can be linked to different parameters to control or change them. These would be set in Unity when creating the prop object. For example, you could link animations in the prop to different parameter values. In VNyan, by setting or changing the specified parameter value, this would effect the prop.

Spout2 prop

You can load Spout2 sources as props, allowing you to bring in any source that can send Spout2. This could be other instances of VNyan, or a Live2D model from VTube Studio.

You could also use the Spout2 Plugin for OBS to send sources in OBS to VNyan. For example, you could add the FugiTech Reactive discord app by first bringing it into OBS, and then sending it to VNyan as a Spout2 prop.

Text prop

You can add simple text linked to your model or the environment. The Text field can be a text /, allowing you to dynamically change the text displayed using graphs. The font cannot be changed; if you wish to use a different font, it would be better to create your own text vnyan prop in Unity.

Browser prop

You can load a website or local html file as a browser prop. This could be used to bring twitch chat or different overlays into your VNyan environment. There is no support for interacting with the browser, so you will not be able to click or navigate within the website itself. If a website requires login or authentication this won't work either.