wiki.sine.space | sinespace

Difference between revisions of "Clothing/Attachments"

From wiki.sine.space
Jump to: navigation, search
(Attachment Setup)
 
(14 intermediate revisions by 5 users not shown)
Line 1: Line 1:
Skin is a texture image that replaces the default skin of your avatar. Skins can be re made and uploaded in Sine Space using [[Virtual Goods]] component.
+
Space has the option to add attachments to your avatar. These can be anything from a sword, to jewellery, even other weapons such as guns, crossbows or shields.  
  
==Avatar Skin==
+
You can also use the attachment option to have your avatar wear certain types of armor such as shoulder pads.
  
You can download the default avatar skin template from following links. 
 
  
* Sine Space Male avatar Skin: [http://space-files.s3.amazonaws.com/creator/Space_male_Skin_UV.psd    | Download].
+
==Setting up for the Attachment==
  
* Sine Space Male avatar Normal Map: [http://space-files.s3.amazonaws.com/creator/Space_malebodynormalMap.psd | Download].
 
  
* Sine Space Female avatar Skin : [http://space-files.s3.amazonaws.com/creator/Space_female_Skin_UV.psd      | Download].
+
You can make an attachment the same way as any other 3D model you would make and import into Unity, or you can use assets from the Unity Asset Store and import them into Unity to use as your attachment.  
  
* Sine Space Female avatar Normal Map: [http://space-files.s3.amazonaws.com/creator/Space_femalebodyNormalMap.psd | Download].  
+
You can follow our guide [[Clothing/Importing|here]] on how to import 3D meshes.
  
==Importing Skin to Unity==
 
  
Once you have created the Skin save the PSD and import it back to Unity.
 
  
'''Setting imported Skin Texture'''
+
====Setup your scene====
  
* Select the imported skin texture.
 
* Set Texture Type as texture.
 
* Alpha to Grey Scale unchecked.
 
* Wrap Mode Repeat.
 
* Filter Mode Sets the filter suggested set it to bilinear.
 
* Aniso level Sets the anisotropic level. 
 
* Max Size Set to 2048.
 
* Format can be set to Compressed or 16 bit for a better quality.
 
* Once done hit Apply
 
  
[[File:Setting_texture.jpg|400px]]
+
The first thing you want to do is add your avatar skeleton into your unity scene. You can use either the default space avatars or your own avatar.
  
 +
If you want to have the attachment available to all avatars and for it to look correctly placed, you might to need to repeat these steps a couple of times for each avatar.
  
'''Setting imported Skin Normal Map'''
 
  
Normal Map gives more definition to the skin.
+
====Set up the attachment item====
  
Once you have imported the normal map
 
  
* Select the imported skin texture.
+
When you have the avatar in the scene, you need to also drag the item you are using as an attachment into the scene from your project window.  
* Set Texture Type as Normal map.
+
* Alpha to Grey Scale unchecked.
+
* Wrap Mode Repeat.
+
* Filter Mode Sets the filter suggested set it to bilinear.
+
* Aniso level Sets the anisotropic level. 
+
* Max Size Set to 2048.
+
* Format can be set to Compressed or 16 bit for a better quality.  
+
* Once done hit Apply
+
  
 +
When it is in the scene, you will want to place the item in the area of the avatar in which it will placed, for example, if you have a necklace as an attachment, place the necklace around the neck.
  
File:Setting_normalmap.jpg|400px]]
+
If you have a sword, place the sword in the hand of the avatar.  I have an eyepatch as an example, so I have placed it where an eyepatch would usually sit on the head.
  
  
==Setting the Skin material==
+
[[File:Eyepatch-example.jpg]]
  
you can create a new material and drag skin texture and normal map in normal map slot.
 
  
Once the material is created you can chose the material shader for skin from built in unity standard, custom shader or SineWave skin shader.
+
===Clothing Settings===
  
'''SineWave Skin Shader'''
 
  
* Main Color  - Sets the overall color of the skin.
+
With the item selected in the hierarchy, click on Add component in the inspector window and search for Clothing Item Settings. Add this component.  
* Specular Color - Tints specular highlights of the skin.
+
* Shininess - Sets the shine amount of the skin. 
+
* Rim Power  - how rim lighting spreads around the edges of the model.
+
* Rim HDR  - Adds a boost to rim lighting, to enable it push into HDR values (i.e. Brighter than white) for bloom.
+
* Normal Power - controls power of normal map (allowing them to be more/under represented)
+
* Tessellation  -  allows DX11 Tessellation which smooth's geometry when camera is up close.
+
* Specular Amount  - Sets the specular amount.
+
* Gloss Amount - Sets how glossy the skin should look.
+
* Smoothness - controls specular highlights on PBR platforms (higher = tighter highlights), correlates with Standard shader.
+
* Occlusion - controls ambient occlusion.
+
* Loading color - For internal use. PLEASE IGNORE THIS SETTING.  
+
  
+
Once this is added, you will see the clothing item settings. For attachments, there are a few things you need to check for the attachment to work correctly.
[[File:Setting_material.jpg|400px]]
+
  
==Using Make clothing component to fit the Skin==
 
  
Once the skin material is created, it needs to be converted to fit the skeleton.
+
====Fitting====
  
Create an empty game object in the scene and add the Make Clothing or Attachment Component to it.
+
In the fitting section, you make selections for the type of item you are creating, the skeleton it uses, and the layer and slots it occupies ''(for more information about layers and slots, see [https://wiki.sine.space/index.php?title=Clothing/Layers_Guide this page])''.  First, you need to select the skeleton.  If the item is going to be rigged to the avatar and move with the body, then you need to choose the avatar skeleton that the item will be rigged to fit.  '''Note:''' if you rig an item to a particular skeleton, then the item will only be available for users to buy or wear if they are wearing that avatar skeleton ''(ie male or female)''.  
  
'''Skeleton Selection'''
+
If your item will not be rigged to either a female or male skeleton and can be worn by either, then choose Unisex from the drop-down menu for Skeleton.
  
Chose the relevant Skelton for the clothing item. Please note Space supports multiple third party skeletons as well as it's own native male and female models.  
+
[[File:att1.jpeg]]
  
 +
Next, since you are setting the item up as an attachment, you would choose Attachment from the drop-down menu for Type.
  
'''Slots'''
+
[[File:att2.jpg]]
  
If you are creating only skin, select Skin Base slot. If you want the skin to have more than just skin select other applicable slots.  
+
Now you must choose a clothing layer.  There are 5 to choose from, in order of distance from the skin.  SineSpace users can wear one clothing item per layer, per slot on their avatar ''(for more information about layers and slots, see [https://wiki.sine.space/index.php?title=Clothing/Layers_Guide this page])''. On the eyepatch example, we will use Close Fitting.
  
[[File:Skin_slot.jpg|400px]]
+
[[File:att3.png]]
  
 +
And finally, you select which slot the item will occupy.  Whichever option is closest or most appropriate ''(and feel free to ask in one of the group chats if you are unsure)''.  For a necklace or scarf you would choose a neck, you would choose head for a hat, and for the eyepatch we will choose face.
  
'''Skin Setup'''
+
[[File:att4.jpg]]
  
Select Only contains skin if you are uploading skin only. If you are doing a combined outfit Don't select this.
+
====Materials====
  
* Note : if you are not making just skin you will have to click on Convert to skinned button later. if you are creating just skin this step is not needed and the button will disappear as soon as you select Skin only.  
+
On the Materials tab, there is one choice to make.  If the item does not have any different color variations (that is, if you are not going to make the item in different colors), then check the "Keep Materials Always" box. If you are planning on doing different color variations, then uncheck the box and see [https://wiki.sine.space/index.php?title=Clothing/Variations this page] for more information once you have set up and uploaded your main item.
  
'''Replacement Skin'''
+
[[File:att5.jpg]]
  
Set the number of material the skeleton you are using has.
+
====Attachment Setup====
  
Sine Space male and female skin only has 1 material; if you have selected that as the skeleton Set the size to 1.
 
  
After the size is set. Drag the skin material in the material slot.  
+
On this tab, you will select the bone on the avatar's body that the attachment will be attached to. This will affect the axis or pivot point on the body when the user wears and adjusts how the item is worn, so make sure to choose the bone that makes the most sense for that item.  The empty form is pictured below.
  
 +
[[File:att6.jpg]]
  
[[File:Skin_Setup.jpg|400px]]
+
You can either click the circular button at the far right and start entering the name of the bone you want to attach to ''(in this example, head)'' and you should see it appear on the list below.
  
==Add virtual goods script==
+
[[File:att7.png]]
  
Attach the virtual goods script and complete the submission process.
+
Or you can open up the avatar in your project hierarchy until you find the bone you want to use, then just drag that into the slot.
  
See [[Virtual Goods]] for more details on the virtual goods script.
+
[[File:att8.jpg]]
  
==Video Tutorial==
+
Whichever route you choose, once it's filled out your form should look something like this.
  
To know more on how to create and upload skins watch the tutorial shown [https://www.youtube.com/watch?v=vSuhAmnqZJE&index=17&list=PL3MZuSlVM0J9c42EyQuOWzl6F_ZEfHWAM| here]
+
[[File:att9.jpg]]
 +
 
 +
At this point, you click on the Prepare button, and in moments the process will finish and you will see a message underneath "Attach To This Bone" that tells you what it's attached to.  If you make a mistake or do not get the results you want, you can change this by repeating the steps above and clicking the Re-Prepare button.
 +
 
 +
[[File:att10.jpg]]
 +
 
 +
===Make the item a prefab===
 +
 
 +
After you have prepared the item, drag the item from your hierarchy into your project window to make it into a prefab. Make sure the prefab is selected for the next step.  
 +
 
 +
 
 +
 
 +
===Add the Virtual Good component and Uploading the Attachment===
 +
 
 +
 
 +
To upload the attachment, make sure you have the prefab selected in your Project folder. Scroll down in the Inspector window until you see the Add Component button.
 +
 
 +
Click on it and Search for Virtual Good and click on the virtual good script to add it.
 +
 
 +
For more information on the virtual good component, see [[Virtual_Goods|this page]].
 +
 
 +
 
 +
For attachments, you want to select the Clothing content type under the virtual good script. Fill in all the other details, and when you get to the Category option, choose the appropriate category.
 +
 
 +
Usually for attachments this will be under the Accessory sub category.
 +
 
 +
After all the details have been filled in, you can auto submit your attachment to space.
  
  

Latest revision as of 10:06, 25 October 2021

Space has the option to add attachments to your avatar. These can be anything from a sword, to jewellery, even other weapons such as guns, crossbows or shields.

You can also use the attachment option to have your avatar wear certain types of armor such as shoulder pads.


Setting up for the Attachment

You can make an attachment the same way as any other 3D model you would make and import into Unity, or you can use assets from the Unity Asset Store and import them into Unity to use as your attachment.

You can follow our guide here on how to import 3D meshes.


Setup your scene

The first thing you want to do is add your avatar skeleton into your unity scene. You can use either the default space avatars or your own avatar.

If you want to have the attachment available to all avatars and for it to look correctly placed, you might to need to repeat these steps a couple of times for each avatar.


Set up the attachment item

When you have the avatar in the scene, you need to also drag the item you are using as an attachment into the scene from your project window.

When it is in the scene, you will want to place the item in the area of the avatar in which it will placed, for example, if you have a necklace as an attachment, place the necklace around the neck.

If you have a sword, place the sword in the hand of the avatar. I have an eyepatch as an example, so I have placed it where an eyepatch would usually sit on the head.


Eyepatch-example.jpg


Clothing Settings

With the item selected in the hierarchy, click on Add component in the inspector window and search for Clothing Item Settings. Add this component.

Once this is added, you will see the clothing item settings. For attachments, there are a few things you need to check for the attachment to work correctly.


Fitting

In the fitting section, you make selections for the type of item you are creating, the skeleton it uses, and the layer and slots it occupies (for more information about layers and slots, see this page). First, you need to select the skeleton. If the item is going to be rigged to the avatar and move with the body, then you need to choose the avatar skeleton that the item will be rigged to fit. Note: if you rig an item to a particular skeleton, then the item will only be available for users to buy or wear if they are wearing that avatar skeleton (ie male or female).

If your item will not be rigged to either a female or male skeleton and can be worn by either, then choose Unisex from the drop-down menu for Skeleton.

Att1.jpeg

Next, since you are setting the item up as an attachment, you would choose Attachment from the drop-down menu for Type.

Att2.jpg

Now you must choose a clothing layer. There are 5 to choose from, in order of distance from the skin. SineSpace users can wear one clothing item per layer, per slot on their avatar (for more information about layers and slots, see this page). On the eyepatch example, we will use Close Fitting.

Att3.png

And finally, you select which slot the item will occupy. Whichever option is closest or most appropriate (and feel free to ask in one of the group chats if you are unsure). For a necklace or scarf you would choose a neck, you would choose head for a hat, and for the eyepatch we will choose face.

Att4.jpg

Materials

On the Materials tab, there is one choice to make. If the item does not have any different color variations (that is, if you are not going to make the item in different colors), then check the "Keep Materials Always" box. If you are planning on doing different color variations, then uncheck the box and see this page for more information once you have set up and uploaded your main item.

Att5.jpg

Attachment Setup

On this tab, you will select the bone on the avatar's body that the attachment will be attached to. This will affect the axis or pivot point on the body when the user wears and adjusts how the item is worn, so make sure to choose the bone that makes the most sense for that item. The empty form is pictured below.

Att6.jpg

You can either click the circular button at the far right and start entering the name of the bone you want to attach to (in this example, head) and you should see it appear on the list below.

Att7.png

Or you can open up the avatar in your project hierarchy until you find the bone you want to use, then just drag that into the slot.

Att8.jpg

Whichever route you choose, once it's filled out your form should look something like this.

Att9.jpg

At this point, you click on the Prepare button, and in moments the process will finish and you will see a message underneath "Attach To This Bone" that tells you what it's attached to. If you make a mistake or do not get the results you want, you can change this by repeating the steps above and clicking the Re-Prepare button.

Att10.jpg

Make the item a prefab

After you have prepared the item, drag the item from your hierarchy into your project window to make it into a prefab. Make sure the prefab is selected for the next step.


Add the Virtual Good component and Uploading the Attachment

To upload the attachment, make sure you have the prefab selected in your Project folder. Scroll down in the Inspector window until you see the Add Component button.

Click on it and Search for Virtual Good and click on the virtual good script to add it.

For more information on the virtual good component, see this page.


For attachments, you want to select the Clothing content type under the virtual good script. Fill in all the other details, and when you get to the Category option, choose the appropriate category.

Usually for attachments this will be under the Accessory sub category.

After all the details have been filled in, you can auto submit your attachment to space.


Further Reading