|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 |
Preparation of target MMD Model | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1.1 |
Select MMD Model to be used in the test. (Please Refer to my Report #4 and later). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1.2 |
Use .dae to FBX Converter to get FBX file for 3DXchange5 Pipeline. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1.3 |
Use manual Bone Mapping for MMD Model to operate as Non-Standard iClone Model. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Click first on each iClone basic bones and click on the corresponding MMD bones until Red indicator turns to Green. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1.4 |
Import some iMotions available in iClone5 such as Wave, Walk and Idle into Motion Library. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1.5 |
Apply them to the MMD Model by pushing "Add to Perform" button. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1.6 |
Preview each iMotions in the viewer. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 |
Exporting the Mesh of the MMD Model | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2.1 |
Make folder with the name "To Unity". (Can be any name.) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2.2 |
Firstly, export only Mesh of the MMD Model. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Export FBX/Export Option/Mesh/→Include Geometry At 3DX5 Pipeline: Advanced Settings/Target Tool/(drop-down)→GameEngine Unity3D |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3 |
Exporting of iMotions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Select "Including Animation" and "Save One Take Per File"). Deselect "Include Geometry" under Mesh. (Target Tool turns to Custom) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 |
Preparation of Stage for Unity. Try the MMD stage for example. (Optional) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4.1 |
Open MMD/UserFile/Accessory/stage01.x Use PMD Editor to get stage01.obj and import to 3DXchange5. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4.2 |
Export the Stage through the Export FBX/Advanced Settings/Target Tool/Unity 3D. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4.3 |
Confirm all the exported FBX files (Model, Motions and Stage) in the "To Unity" folder. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5 |
Set up Unity3D Environment. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5.1 |
Download the Unity3D(UnitySetup-3.3.5.exe), install and Start. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
a |
When "ESET Smart Security" is used, Unity never start up. (Win7, 64Bit) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
b |
Make the following Pass setting and try start up several times for success. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
C:\Program Files(Game)¥Unity¥*.* |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5.2 |
When Opened, blank Scene is shown. View panel layout is selectable and movable. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Project, Hierarchy and Inspector View can be placed separately by dragging each ViewTab. ![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5.3 |
Go to File/Build Settings and select Platform and Target Platform from Win/Win64/Mac. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5.4 |
Go to GameObject/Create Other/, then, add Camera and Directional Light in the Scene. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5.5 |
Open Gizmos panel to adjust the size and visibility of Camera and Light icons. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5.6 |
Use Transform Tools to move, rotate and scale all objects in the Scene. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5.7 |
3D Gismos provides Slider to adjust the icon size of the Camera and Light in the Scene. For example, when Camera is selected, its setting values are informed in the Inspector View. Click on icon images to show/hide them in the Gizmo panel. ![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5.8 |
Mouse can also be used for transforming. Push center button to move, Right button for rotate and rotate center button to scale. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6 |
MMD Model Set-up Operation in Unity (Introductive Part) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6.1 |
Drag all the FBX data of MMD model, iMotions and Stage into Project panel. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6.2 |
Open the YUKARI folder, drag YUKARI file into the Screen, adjust Position and Scale. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
When you push YUKARI, 3D image is also shown in the Purview window. When you drag YUKARI into Scene, set X,Y,Z Position to zero and scale her by approx. 10-30x enlarged. For Normal Map settings, click "Fix now" button. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6.3 |
When texture color adjustment is needed, open Materials and select the color in the .fbm. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Select the color in the Project view, Open external tool, correct the color and save. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6.4 |
Correct light in the Pupil of the Eye: Pick Material-25 and change Main Color. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6.5 |
Use Inspector view for changing Shader type for the Model Hair. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Select Model Hair: YUKARI_0005 to 0011 to be changed and open the drop-down list. Change Transparent/Diffuse to Bumped Diffuse. ![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
7 |
Applying Animation to the MMD Model |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
7.1 |
Click the Main Camera to create Preview for motion. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Preview Background Color can be changed in the default mode in which Model is T-posed. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
7.2 |
Click the Model YUKARI in Hierarchy view panel, open YUKARI in Project view panel and drag a motion clip into Animation indicator slot of the Inspector view panel. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Animation Clip Name turns to the motion clip name in MMD Model. ![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
7.3 |
Press the Play button, then assigned animation starts in the Game screen automatically. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
8 |
How to change motions |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
8.1 |
Select YUKARI, drag all the Motion Clip into Animation area in Inspector view panel. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
8.2 |
Open Animation View panel from Window. Now, Two Play buttons are available. Any change must be done in reset mode in which Model shows T-pose. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
a)Use Play button for Game screen to play back the motion clip in the Animation panel. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
9 |
Locating Models on the Stage |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
9.1 |
Drag the Stage into the Scene and locate Models, Light and Camera. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Select Main Camera in Hierarchy view panel, adjust camera distance and Field of View to get the best shot in the Preview. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
9.2 |
Select Gwynn in Hierarchy view panel, Select her Animation and Play. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
9.3 |
Select YUKARI in Hierarchy view panel, Select her Animation and Play. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In Animation view panel, select the motion by name in drop-down list. ![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
9.4 |
Two models can be moved at the same time. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Drag motions for both Models into Animation Clip indicator at reset mode. (Model T-Posed) Use the Play button. The play is one time only. ![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
9.5 |
Stop Button Operation: a) Click Stop button in the Game mode, Motion just stops at the Play button is pushed. b) Click Stop button in the Scene mode, Game screen returns to Scene view. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10 |
More test for adding MMD Model and Custom Motion through 3DXchange5 Pipeline |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10.1 |
Bring MMD Model INORI used in the Report 8 and motion from LiveAnimation. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Use .dae to FBX Converter to get FBX file to 3DXchange5. Characterize her by manual bone mapping. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10.2 |
Import other iMotions into Motion Library, click Add to Perform button. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
iMotions can be imported into Motion Library and previewed, however, Export License will be confirmed. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10.3 |
Following FBX files are prepared for more testing. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10.4 |
Open Unity, confirm the look of the added Model, Open Material in the Project view. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Shader type for Material-19 need to be Transparent/Diffuse. ![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10.5 |
Locate Models into the Scene first, select a Model and drag a Motion clip to Animation Clip indicator slot as shown below. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10.6 |
Add the Custom Motion to Gwynn and Export the Animation only. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10.7 |
Confirm that this Custom motion is added automatically to the Gwynn date in the Project view.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10.8 | Play the Custom motion, use Play button to play back. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
When stopped motion, frame by frame step forwarding is possible.. ![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Demo:MMD to Unity |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3DXchange5 Pipeline Test Series 9: MMD Model to Unity-1st step 2012.9.15 (Revised 10.20) by Hirospot (Personal Site) |