wiki.sine.space | sinespace

Difference between revisions of "Morph Shapes"

From wiki.sine.space
Jump to: navigation, search
(Prequisites)
(Creating the Morph Shape)
 
(7 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
You are expected to have installed Unity and a valid Editor Pack installed correctly ( called SDK on Unity’s Asset Store).
 
You are expected to have installed Unity and a valid Editor Pack installed correctly ( called SDK on Unity’s Asset Store).
  
Unity version used for tutorial: 2017.4.36f1
+
Unity version used for tutorial: 2017.4.36f1.  [[https://unity3d.com/get-unity/download?thank-you=update&download_nid=63301&os=Win Download here.]]
  
Editor Pack/SDK: 14.415.8463-nightly (shows as "Intended for Unity Version 2017.3").  Download [[here|https://sinespace-editorpacks.s3.amazonaws.com/Editor%20Pack%2014.415.8463-nightly%20for%20Unity%202017.3.unitypackage]]
+
Editor Pack/SDK: 14.415.8463-nightly (shows as "Intended for Unity Version 2017.3").  [[https://sinespace-editorpacks.s3.amazonaws.com/Editor%20Pack%2014.415.8463-nightly%20for%20Unity%202017.3.unitypackage Download here.]]
  
See our [[XMPP_Chat_Client|XMPP Chat Client]] page for more information.
+
Or you can use the Unity Hub application to easily manage multiple Unity installations.  [[https://store.unity.com/download/thank-you?thank-you=personal&os=win&nid=1605 Download here.]]
  
 
==Creating the Morph Shape==
 
==Creating the Morph Shape==
Line 54: Line 54:
  
  
Now switch to Sculting mode.   
+
Now switch to Sculpting mode.   
  
 
[[File:Shot_08_-_Switch_to_Sculpt_mode.jpg |1000px]]
 
[[File:Shot_08_-_Switch_to_Sculpt_mode.jpg |1000px]]
 
 
Here is our starting point.
 
 
[[File:Step_9.jpeg|1000px]]
 
  
  
Line 166: Line 161:
  
 
In your project search box, type 2017 and drag the 2017 Male file into the Alternative Avatar slot.
 
In your project search box, type 2017 and drag the 2017 Male file into the Alternative Avatar slot.
 +
 +
The reason we do not use the Base Avatar for preview is that this defaults to the Male version and cannot be used for
 +
 +
a Female morph. Therefore it's better to get into the habit of locating the individual 2017 Male/Female avi's manually.
  
 
[[File:Shot_24_-_Alernative_Avatar drag.jpg|1000px]]
 
[[File:Shot_24_-_Alernative_Avatar drag.jpg|1000px]]
Line 193: Line 192:
 
Here's what it looks like in Krita.
 
Here's what it looks like in Krita.
  
[[File:Step_25.jpeg|1000px]]
+
[[File:Step_25.jpeg|500px]]
  
 
=Creating The Virtual Good=
 
=Creating The Virtual Good=

Latest revision as of 04:13, 12 March 2020

MORPH SHAPES TUTORIAL

Prequisites

You are expected to have installed Unity and a valid Editor Pack installed correctly ( called SDK on Unity’s Asset Store).

Unity version used for tutorial: 2017.4.36f1. [Download here.]

Editor Pack/SDK: 14.415.8463-nightly (shows as "Intended for Unity Version 2017.3"). [Download here.]

Or you can use the Unity Hub application to easily manage multiple Unity installations. [Download here.]

Creating the Morph Shape

You will be using our avatar model in your 3D modelling tool of choice. You will find it included in our Editor Pack.

Here we use Blender which is free to use. This is the default start scene in Blender.

Delete cube, lights and cameras - we don't need those.

Shot 01 - New Blender scene.jpg


Go to File and Import, then pick FBX.

Shot 02 - Import of our avi.jpg


Here is the import window.

Shot 03 - Locating the avi.jpg


You should see this. Click off and on the model and click the Collections icon here:

Shot 04 - Avi loaded.jpg


Now delete the existing Morph Keys.

Shot 05 - Delete shape keys.jpg


We now add two morph keys - clicking the plus sign. The first will be our 'Basis' and the second our new morph.

While on that new morph, double click to rename

Shot 06 - Create 2 new shape keys.jpg


Now ensure the value is set to 1.

Shot 07 - Rename the morph.jpg


Now switch to Sculpting mode.

Shot 08 - Switch to Sculpt mode.jpg


After my changes here is our face morph.

Shot 09 - the new morph.jpg


That's it for the Blender part. Now we export to FBX.

Export FBX From Blender

Go to File then Export then FBX.

Shot 10 - Export the file.jpg


Make sure your export settings are the same as this. Do ensure !Expermintal! Apply Transform is checked and Bake Animation is unchecked.

Then click Export.

Shot 11 - Export settings.jpg

Import FBX into Unity

Now we switch to Unity. Here we have an empty scene ready and a work folder created called "Morph Tutorial Folder".

You of course, should use your own recognisable name.

Shot 12 - New unity scene.jpg


With this folder selected, right click in the empty right hand pane of your project and select Import Asset.

Shot 13 - Import the new fbx.jpg


Locate your folder where you exported the modified 2017 Male into. First go to Assets.

Shot 14 - Go to folder.jpg


Then go to your work folder and import the model.

Shot 15 - Locate fbx.jpg


Here our model is now imported into the project.

Shot 16 - Model imported.jpg

Checking Our Morph Has Imported

Drag the model into the scene/hierarchy and expand the model to see its child objects. Check the mesh has a skinned renderer and that you

can see your morph name.

Shot 17 - Checking the morph.jpg


Dialling this to 100 will reveal your morph. Leave it set at 100.

Shot 18 - Successful import.jpg

Creating the Vertex Displacement Map

Open the menu item: Sinespace->Tools->Custom Shapes->Create Body Morph Texture

Shot 19 - Creating the displacement map.jpg


Now click into the Assets folder and then into your work folder.

Shot 19a - Locate folder.jpg


You will now see the Create Morph Map dialog box.

Step 21.jpeg


Drag the mesh (from the project) into the top slot.

Put a checkmark into Preview and Overwrite Silently then click Bake Map.

Shot 20 - Drag malebody to slot.jpg


Type the name of your morph into the "Original Blendshape" field.

Shot 21 - Blend Shape field.jpg


Uncheck Incorporate Normal.

Shot 22 - Uncheck normal.jpg


Set preview options.

Shot 23 - Set preview options.jpg


In your project search box, type 2017 and drag the 2017 Male file into the Alternative Avatar slot.

The reason we do not use the Base Avatar for preview is that this defaults to the Male version and cannot be used for

a Female morph. Therefore it's better to get into the habit of locating the individual 2017 Male/Female avi's manually.

Shot 24 - Alernative Avatar drag.jpg


Click on your work folder in the project and then click Bake Map.

Shot 25 - Bake map.jpg


A preview of your morph will show in the scene. Move the original out of the way to compare that they are the same.

Shot 26 - Worked.jpg


Now click on the new displacement map in your project work folder. Ensure sRGB is off, Read/Write is enabled, Generate Mipmaps off, Wrap Mode is Clamp,

Filter Mode is Point. No compression.

Then click Apply.

Shot 27 - Modify map properties.jpg


You might see some very subtle pastel RGB shadings but Unity cannot show the preview properly for the morph map generated.

Here's what it looks like in Krita.

Step 25.jpeg

Creating The Virtual Good

Now we get to the final step - creating the virtual good. Right click an empty part of the hierarchy and create an empty game object.

Shot 28 - Create empty game object.jpg


Rename your game object to something recognisable. Add a Clothing Item Settings component.

Shot 29 - Add clothing script.jpg


Tick and expand Body Slider. Then drag the generated morph texture into the Vertex Displacement Map slot. Ensure the skeleton is set to Base Male.

Shot 30 - Drag map to slot.jpg


Add a virtual good component.

Shot 31 - Add VG.jpg


Set the type to Clothing and the category to Clothes / Body / Morphs.

Shot 32 - VG 2.jpg


After completing that, drag your item from the hierarchy to your project. Right clik it then select Upload to Sinespace.

Shot 33 - VG3.jpg

The Result

Here's the finished item in world, called "Morph Tutorial" and is available free in the shop.

Step 34.jpeg