wiki.sine.space | sinespace

Difference between revisions of "Gestures/Single Person Animation"

From wiki.sine.space
Jump to: navigation, search
 
(26 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
==Create Gesture Prefab==
 
==Create Gesture Prefab==
  
In the project folder called Gestures / Prefabs you will see a selection of templates you can duplicate, rename and modify.
+
In the project folder called Gestures (search for "Gestures" in project search) you will see a selection of templates you can duplicate, rename and modify.
  
Highlight the 1 Person Template file and click ctrl D to duplicate.
+
Highlight the "Sample 1 person template" file and click ctrl D to duplicate.
  
 
Rename your new prefab in the project window, then drag it into the scene.
 
Rename your new prefab in the project window, then drag it into the scene.
 
  
 
[[File:Create_new_gesture_template.jpg]]
 
[[File:Create_new_gesture_template.jpg]]
  
  
You can also create an empty game object and then add the specific Avatar Effect Scripts you require, and a Virtual Goods Script.  
+
If you don't want to duplicate the template objects, you can also create an empty game object and then add the "Animate Single Avatar" or "Animate Multiple Avatars" components (which will automatically add the two scripts required) and then you also have to add the "Virtual Good" component.
 +
 
 +
[[File:Singlepersonanimation.jpeg]]
  
 
==Import FBX==
 
==Import FBX==
Line 20: Line 21:
 
Set the type to Humanoid.
 
Set the type to Humanoid.
 
Set the Avatar Definition to Copy From Other Avatar
 
Set the Avatar Definition to Copy From Other Avatar
Select the relevant Space avatar as the source (click the small circle to the right of the Source field.)
+
Select the relevant sinespace avatar as the source (click the small circle to the right of the Source field.)
 
+
 
+
[[File:Gesture_rigging.jpg]]
+
  
 +
[[File:Import FBX Screenie 02.jpeg]]
  
 
Now click from the rig tab to the Animations tab.
 
Now click from the rig tab to the Animations tab.
Line 30: Line 29:
 
You should be able to see your animation in the preview window in the Inspector.
 
You should be able to see your animation in the preview window in the Inspector.
  
You may wish to crop or modify the animation using Unity's tools in this panel; see here for more information on Unity's animation tools.  
+
You may wish to crop or modify the animation using Unity's tools in this panel; see here for more information on Unity's animation tools.
  
http://docs.unity3d.com/Manual/AnimationClips.html
 
  
 
==Avatar Effect Script==
 
==Avatar Effect Script==
 
The name and description fields in the Avatar Effect Script are for PENDING
 
  
 
Set the number of participants to 1.
 
Set the number of participants to 1.
 +
 +
If your animation is specifically for a single gender then check "Is Gendered" and select Male or Female from the "Nominal Gender" dropdown.
  
 
Leave the Trigger fields empty; these will be used with multi-person gestures.
 
Leave the Trigger fields empty; these will be used with multi-person gestures.
  
Tick loop if required; e.g. for dances. The user will be able to stop looping inworld.
+
Tick loop if required; e.g. for dances. The user will be able to stop looping in-world by exiting the gesture..
 +
 
 +
[[File:Avatar Effect Script.jpeg]]
 +
 
 +
'''Other Avatar Effect Scripts'''
 +
 
 +
[[Gestures/Props]]
 +
 
 +
[[Gestures/FX]]
 +
 
 +
[[Gestures/Take Snapshot]]
 +
 
 +
==Avatar Animation Effect Script==
  
 
Drag the animation take from within your fbx file into the Clip field.
 
Drag the animation take from within your fbx file into the Clip field.
 +
 +
Leave "Participant" set to Initiator.
  
 
You can use the start time to delay the start of the gesture.
 
You can use the start time to delay the start of the gesture.
  
If your gesture involves interaction with fixed position prop (e.g. a door handle) or with precise two person gestures (e.g. shaking hands) you may wish to tick Fix Avatar Height. This will set the user's avatar height to the standard height for avatars in Space.
+
If your gesture involves interaction with fixed position prop (e.g. a door handle) or with precise two person gestures (e.g. shaking hands) you may wish to tick Fix Avatar Height. This will set the user's avatar height to the standard height for avatars in sinespace.
  
 
+
[[file:Avatar_Animation_Effect_Script.jpeg]]
[[File:Avatar_effect_script.jpg]]
+
  
 
==Preview gesture in scene==
 
==Preview gesture in scene==
Line 64: Line 75:
  
 
[[Virtual Goods]]
 
[[Virtual Goods]]
 
==A zero-cost animation production workflow. This is FAIRLY EXPERIMENTAL, please do update if possible!==
 
 
Animation production for Sine Space has been a bit of a neglected topic. Here is a fresh end-to-end process and toolchain for getting animations/poses together for your furniture, vehicles, and etc.
 
 
===The Toolchain and Process===
 
 
1. QAvimator ([http://qavimator.org/])
 
 
This older opensource application does one thing and one thing only, and does it fairly well. It allows you to pose an avatar model for keyframes on a timeline, and output the resulting humanoid animation as both a proprietary file and as a mocap motion file (BVH). Version 0.1.1.426 on Windows 10 is being used in this workflow.
 
 
We wont get into how to use QAvimator; it is simple, and if you've ever made a paper flipbook and used a computer, you should not have a problem working out how to use QAvimator. One note though regarding storage: It'll try and save to the directory in 'Programs (x86)' where the executable lives. That's bad. That way lies madness. Make a data directory somewhere and use it.
 
 
2. Blender ([http://blender.org/])
 
 
Blender is exactly the opposite of QAvimator in scope; it does *everything*. Including provide for the production of animations. However, blender is a highly complex tool with a steep learning curve and a user interface made by aliens from alpha centauri, so we will use it only for converting from BVH to FBX. Blender version 2.78 is being used in this workflow. Doing so is fairly straightforward:
 
Click 'File->Import->Motion Capture(.BVH)'. You should not need to tweak any settings here; just import it according to the defaults. Next, export it as FBX (File->Export->FBX(.fbx)).
 
 
If you've never used blender, pay careful attention to the file saving dialog, it's a bit different. I'd recommend fiddling with it a bit and gathering some confidence that my files were being saved.
 
 
3. Unity/Space
 
 
Finally, we're getting the animation into Space. This is where the important tweaks come into play. The process is not unlike that of importing any other FBX, excpet for a few notable ddifferences.
 
 
First, you'll want to click 'Assets->Import Asset...'. This will take you into the file selector dialog; browse to your data directory (you did make one and use it, yes?) and select the FBX version of your animation saved from blender in the previous step.
 
 
Your FBX is imported now, but there are various tweaks that need be applied to get it into a proper working state for Space. First, click the 'Rig' tab on the import properties pane. Set the anim type as 'Humanoid' and the root bone to 'Hip'. Click apply. The root bone selection will go away. On the 'Model' tab, untick 'Use File Scale'. Click the Apply button. You should be set; there will be a folder generated in your unity project's assets named after the file you imported. Within that will be the clip(s) (animations). These should be ready to use in your vehicle furniture sits or animation controllers in Space.
 
 
Good luck and happy animating! ANIMATE ALL THE THINGS!!
 
  
 
{{Creation Navbox}}
 
{{Creation Navbox}}

Latest revision as of 14:51, 12 May 2022

Create Gesture Prefab

In the project folder called Gestures (search for "Gestures" in project search) you will see a selection of templates you can duplicate, rename and modify.

Highlight the "Sample 1 person template" file and click ctrl D to duplicate.

Rename your new prefab in the project window, then drag it into the scene.

Create new gesture template.jpg


If you don't want to duplicate the template objects, you can also create an empty game object and then add the "Animate Single Avatar" or "Animate Multiple Avatars" components (which will automatically add the two scripts required) and then you also have to add the "Virtual Good" component.

Singlepersonanimation.jpeg

Import FBX

When you import the .fbx file containing your animation you need to rig it.

Click the rig tab in the inspector. Set the type to Humanoid. Set the Avatar Definition to Copy From Other Avatar Select the relevant sinespace avatar as the source (click the small circle to the right of the Source field.)

Import FBX Screenie 02.jpeg

Now click from the rig tab to the Animations tab.

You should be able to see your animation in the preview window in the Inspector.

You may wish to crop or modify the animation using Unity's tools in this panel; see here for more information on Unity's animation tools.


Avatar Effect Script

Set the number of participants to 1.

If your animation is specifically for a single gender then check "Is Gendered" and select Male or Female from the "Nominal Gender" dropdown.

Leave the Trigger fields empty; these will be used with multi-person gestures.

Tick loop if required; e.g. for dances. The user will be able to stop looping in-world by exiting the gesture..

Avatar Effect Script.jpeg

Other Avatar Effect Scripts

Gestures/Props

Gestures/FX

Gestures/Take Snapshot

Avatar Animation Effect Script

Drag the animation take from within your fbx file into the Clip field.

Leave "Participant" set to Initiator.

You can use the start time to delay the start of the gesture.

If your gesture involves interaction with fixed position prop (e.g. a door handle) or with precise two person gestures (e.g. shaking hands) you may wish to tick Fix Avatar Height. This will set the user's avatar height to the standard height for avatars in sinespace.

Avatar Animation Effect Script.jpeg

Preview gesture in scene

Once you have added the animation track to the Clip field in the Avatar Effects Script you can click play in Unity and see the gesture performed by the model in the scene.

Virtual Goods Script

Fill out the product details in the Virtual Goods Script and submit your gesture to the staging server for review.

for more information on the Virtual Goods Script go here;

Virtual Goods