wiki.sine.space | sinespace

Difference between revisions of "Full Body Replacement Costumes"

From wiki.sine.space
Jump to: navigation, search
Line 1: Line 1:
 
{{Revision}} -- Needs clarification of terminology. Avatar vs. Skin, Skeleton, Costume, Outfit etc., especially in the links leading up to the details. How does it all fit together? what's a part of what?  
 
{{Revision}} -- Needs clarification of terminology. Avatar vs. Skin, Skeleton, Costume, Outfit etc., especially in the links leading up to the details. How does it all fit together? what's a part of what?  
  
In space you can completely customize your avatar skeleton anything from an alien, fire elemental to a dragon.   
+
In space you can customize your avatar skeleton to be anythingfrom an alien, or fire elemental, to a dragon.   
  
There is two parts to this particular feature - Costumes - costumes are an object which replaces your base skeleton mesh with something<br>
+
There are two parts to this particular feature - Costumes - costumes are an object which replaces your base skeleton mesh with something<br>
 
entirely custom. We load the Game Object whole and insert it into the avatar hierarchy on load. The costume can be anything from a box to a particle<br>
 
entirely custom. We load the Game Object whole and insert it into the avatar hierarchy on load. The costume can be anything from a box to a particle<br>
 
system such as a fire elemental. You can add custom animations so for an example the particle system could change colors as you walk.<p>
 
system such as a fire elemental. You can add custom animations so for an example the particle system could change colors as you walk.<p>
  
Note: You will need to be using the space asset pack 7.5 or later.<p>
+
Note: You will need to use the space asset pack v7.5 or later.<p>
  
 
To Create A Costume
 
To Create A Costume
 +
 
Create your avatar as a normal game object with whatever elements you want, if it has an animator on it, you should uncheck "Apply Root Motion".<br>
 
Create your avatar as a normal game object with whatever elements you want, if it has an animator on it, you should uncheck "Apply Root Motion".<br>
 
If  ‘Apply Root Motion’ is greyed out,  drag your model into your scene, then drag it back into the assets folder to convert it from a 'Model Prefab' <br>
 
If  ‘Apply Root Motion’ is greyed out,  drag your model into your scene, then drag it back into the assets folder to convert it from a 'Model Prefab' <br>
 
to a plain 'Prefab'.<br>
 
to a plain 'Prefab'.<br>
  
If your new avatar is humanoid you may want it compatible with the current avatar animations already in space or any custom animations you wish to add.<br>
+
If your new avatar is humanoid, you may want it to be compatible with the current avatar animations already in space, or any custom animations you wish to add.<br>
 
Click on the original FBX file in your Assets,  Under the 'Rig' tab on the Model Importer in the Inspector, select 'Humanoid'. You may need/want to configure this.<br><br>
 
Click on the original FBX file in your Assets,  Under the 'Rig' tab on the Model Importer in the Inspector, select 'Humanoid'. You may need/want to configure this.<br><br>
  
Line 26: Line 27:
 
<br><br>
 
<br><br>
  
Under 'Extended Settings' there is 'Skeleton' field.  In the 'Root Template' drag from the Project Panel (NOT the Hierarchy) the prefab you are using <br>
+
Under Extended Settings there is the Skeleton field.  In the Root Template drag the prefab you are using, from the Project Panel <br>
 
for your costume into this slot.
 
for your costume into this slot.
  
Tick 'Attachment' but otherwise leave everything alone. Click 'Prepare' - and save this new game object as a prefab the same as other clothing items.<br>
+
Tick AttachmentClick Prepare - and save this new game object as a prefab as you would other clothing items.<br>
If your object does not require an animator, you can upload it. <br><br>
+
If your object does not need an animator, you can now upload it. <br><br>
  
  
Line 36: Line 37:
  
  
Select the prefab of your costume in the Assets window (not in the Hierachy) and add the ‘Virtual Goods Script’<br>
+
Select the prefab of your costume in the Assets window (not in the Hierachy) and add the Virtual Goods Script’<br>
Fill out the mandatory sections and any optional you wish, watch for messages at the bottom of the window when you try to submit, it will tell you what you are missing.<br><br>
+
Fill out the mandatory sections and any of the options you want, watch for messages at the bottom of the window when you try to submit, it will tell you what you are missing.<br><br>
  
 
[[File:Shopping.PNG]]<br>
 
[[File:Shopping.PNG]]<br>
 
[[File:Vendormid.PNG]]<br><br>
 
[[File:Vendormid.PNG]]<br><br>
Upload the item as a piece of clothing, does not matter what clothing item.  The item will upload to your inventory.  
+
Upload the item as a piece of clothing, it does not matter which clothing item.  The item will upload to your inventory.  
  
To wear the costume, open your Inventory , and click on the Costume and select 'Wear'. To unequip, simply wear something else.  Do not use the outfit window.<br>
+
To wear the costume, open your Inventory , and click on the Costume and select Wear. To unequip, simply wear something else.  Do not use the outfit window.<br>
  
Note: If  you don’t want this costume to appear in the store, be sure to check ‘Not for Sale’ in the virtual goods script. <br><br>
+
Note: If  you don’t want this costume to appear in the store, check Not for Sale in the virtual goods script. <br><br>
 
   
 
   
  
 
== Creating an Animator ==
 
== Creating an Animator ==
  
Animators are the second part - this allows you to upload completely custom animations; including as part of another clothing item (e.g. a Beer jug that<br>
+
Animators are the second part - this allows you to upload complete custom animations; including as part of another clothing item (e.g. a Beer jug that<br>
makes you swerve drunkenly is possible).<br>
+
makes you swerve drunkenly).<br>
 +
 
 +
Useful Tutorials:
 +
 
 
Unity Documentation [https://docs.unity3d.com/Manual/Animator.html]<br>
 
Unity Documentation [https://docs.unity3d.com/Manual/Animator.html]<br>
 
Humanoid Animation Tutorial [https://unity3d.com/learn/tutorials/modules/intermediate/live-training-archive/setting-up-a-humanoid-avatar]<br>
 
Humanoid Animation Tutorial [https://unity3d.com/learn/tutorials/modules/intermediate/live-training-archive/setting-up-a-humanoid-avatar]<br>
Line 60: Line 64:
  
 
An animator controller transitions animations based on input variables - we let you insert a few variables in here (we may add more over time). Your animator<br>
 
An animator controller transitions animations based on input variables - we let you insert a few variables in here (we may add more over time). Your animator<br>
needs to have all these variables listed - even if it doesn't use them.<br>
+
needs to have all these variables listed - even if it does not use them.<br>
  
 
See example:<br>
 
See example:<br>
Line 77: Line 81:
 
[[File:Parameters.PNG]]<br><br>
 
[[File:Parameters.PNG]]<br><br>
 
[[File:Transition.PNG]]<br><br>
 
[[File:Transition.PNG]]<br><br>
Once you have built your animator, drag it into the clothing item under the Extended Settings, 'Custom Animation' area on the Clothing Item settings inspector.<br>
+
Once you have built your animator, drag it into the clothing item under the Extended Settings, Custom Animation area on the Clothing Item Settings inspector.<br>
You need to insert the names you used for the variables into the various fields. These are case and syntax sensitive (i.e. you should copy them exactly.)<br>
+
You need to insert the names you used for the variables into the fields. These are case and syntax sensitive (i.e. you should copy them exactly.)<br>
 
[[File:Animationscript.PNG]]
 
[[File:Animationscript.PNG]]

Revision as of 15:28, 19 December 2016

This page has been flagged for revision.
Some of the content on this page may be incomplete or out of date.
-- Needs clarification of terminology. Avatar vs. Skin, Skeleton, Costume, Outfit etc., especially in the links leading up to the details. How does it all fit together? what's a part of what?

In space you can customize your avatar skeleton to be anything; from an alien, or fire elemental, to a dragon.

There are two parts to this particular feature - Costumes - costumes are an object which replaces your base skeleton mesh with something
entirely custom. We load the Game Object whole and insert it into the avatar hierarchy on load. The costume can be anything from a box to a particle

system such as a fire elemental. You can add custom animations so for an example the particle system could change colors as you walk.

Note: You will need to use the space asset pack v7.5 or later.<p> To Create A Costume Create your avatar as a normal game object with whatever elements you want, if it has an animator on it, you should uncheck "Apply Root Motion".
If ‘Apply Root Motion’ is greyed out, drag your model into your scene, then drag it back into the assets folder to convert it from a 'Model Prefab'
to a plain 'Prefab'.
If your new avatar is humanoid, you may want it to be compatible with the current avatar animations already in space, or any custom animations you wish to add.
Click on the original FBX file in your Assets, Under the 'Rig' tab on the Model Importer in the Inspector, select 'Humanoid'. You may need/want to configure this.

Rig.PNG

Create a new blank Game Object in your scene, and attach a Clothing Item Settings component. Under the Clothing Setup slot settings, check them all.
The only exception is Animator, only select this if you have created your own custom animator.

Clothingslots1.PNG

Under Extended Settings there is the Skeleton field. In the Root Template drag the prefab you are using, from the Project Panel
for your costume into this slot. Tick Attachment, Click Prepare - and save this new game object as a prefab as you would other clothing items.
If your object does not need an animator, you can now upload it.

Uploading Your Costume

Select the prefab of your costume in the Assets window (not in the Hierachy) and add the Virtual Goods Script’
Fill out the mandatory sections and any of the options you want, watch for messages at the bottom of the window when you try to submit, it will tell you what you are missing.

Shopping.PNG
Vendormid.PNG

Upload the item as a piece of clothing, it does not matter which clothing item. The item will upload to your inventory.

To wear the costume, open your Inventory , and click on the Costume and select Wear. To unequip, simply wear something else. Do not use the outfit window.

Note: If you don’t want this costume to appear in the store, check Not for Sale in the virtual goods script.


Creating an Animator

Animators are the second part - this allows you to upload complete custom animations; including as part of another clothing item (e.g. a Beer jug that
makes you swerve drunkenly).

Useful Tutorials:

Unity Documentation [1]
Humanoid Animation Tutorial [2]
You will find other good tutorials on the Unity Learn website. [3]

Animators need a controller - to do that, create a new Animator Controller in Unity, and begin laying it out. This is a complex topic,
but you can use our own editor pack controller (a smaller version of the full thing) as a template. Search for 'PlayerController' in the editor pack project panel.

An animator controller transitions animations based on input variables - we let you insert a few variables in here (we may add more over time). Your animator
needs to have all these variables listed - even if it does not use them.

See example:
Animatorcontrol.PNG

These variables are: Magnitude: runs from 0.0 to 1.0 - 0.0 is standing still, 0.5 is walking, 1.0 is running (approximately. These values may deviate from these general bounds.)
Angle: Runs from -1.0 to 1.0, 0.0 is not turning. -1.0 is turning left, 1.0 is turning right.
Vertical: The users key input - moving forward/back shifts this value from -1.0 to 1.0
Horizontal: As per above, except for the left/right keys.
Fly Vertical: 0.0 is not moving up/down in flight, -1 is descending, 1.0 is ascending.
Floor Angle: The normal angle of the floor - used for angling feet to match angled surfaces. Currently disabled.
Is Falling: On/Off - is the user in a falling state
Is Jump: On/Off - is the user currently jumping
Is Flying: On/Off - is the user currently flying

Parameters.PNG

Transition.PNG

Once you have built your animator, drag it into the clothing item under the Extended Settings, Custom Animation area on the Clothing Item Settings inspector.
You need to insert the names you used for the variables into the fields. These are case and syntax sensitive (i.e. you should copy them exactly.)

Animationscript.PNG