Display "SD UNITY-CHAN" on UE4
This is repriting post written by me from other tech blog site in 2016.
Table of Contents
!! Cautions !!
This post was written by me in 2016 at other blog site. Especially UE4’s information on this page may be old. Be careful if you’ll reference this page.
I’ve tried to display “UNITY-CHAN” on UE4, and as the result I’ve succeeded it. So I’m going to show you how to display it.
Coverage range on this post
- try to import “UNITY-CHAN!” SD model to UE4.
- place “UNITY-CHAN!” SD model on UE4’ scene.
- UnrealEngine 4.10 or above
- Unity 5.2 or above
TODO in Unity
Download “UNITY-CHAN!” SD model from official page
At first, let’s download “UNITY-CHAN!” SD model from Unity’s official page. We can download it in unitypackage format.
Create new unity project
Next, we have to craete new unity project. This project will be used to extract UNITY-CHAN fbx and texture datas. So we may choose its name arbitrary.
Import “UNITY-CHAN!” SD model unitypackage into your unity project
In our unity project, we have to import unitypackage from upper menu of [Assets -> Import Package -> Custom Package…], and select UNITY-CHAN’s unitypackage in order to import. We don’t have to change default settings. You may import all assets.
Extraction of UNITY-CHAN’S model files
If you finished to import unitypackage, you can find “UnityChan” directory in the Assets directory. Then you have to extract UNITY-CHAN’s model data such as “.fbx” and “.tga” files.
|fbs||3D model and animtion datas of UNITY-CHAN|
|tga||Texture of UNITY-CHAN model|
We may find these files from as below path (There are some differences by your download version of unitypackage.)
UnityProjectPath/Assets/UnityChan/SD_unitychan/Models/SD_unitychan_generic.fbx UnityProjectPath/Assets/UnityChan/SD_unitychan/Animations/SD_unitychan_motion_generic.fbx UnityProjectPath/Assets/UnityChan/SD_unitychan/Models/Textures/XXXX.tga
We only have to extract these files, and you may close Unity project.
TODO in Unreal Engine 4
Create new UE4 Project
Now we’ll use UE4. First, we create new UE4 project. In using UE4, you can create it from existing templates. You needn’t create scratch! This time, we’ll create our project from “Third Person” template.
Add directory to manage “UNITY-CHAN” assets
I want to put together “UNITY-CHAN”’s assets, so I’ve created “UNITY-CHAN” directory. I’ve created “Animation”, “Model”, “Texture”, and “Material” directory in it.
Import “UNITY-CHAN” fbx model into UE4
Then, we’re going to import “UNITY-CHAN” fbx file into UE4. You select “Import” button, and import below file.
On UE 4.10, I am successful to import as below figure’s setting. It is important that you have to check “Convert Scene” toggle. Why we shold be so? Because UE4 and Unity’s coordinate system are different, we should convert for UE4’ coordinate system.
Then, you will find “SD_unitychan_generic_head” file in a Model directory. Let’s double click it.
So the new window model edit is opened and you’ll see a gray colored UNITY-CHAN! Next we have to set material settings for this model on the orange square area.
Import texture files and create material
We import texture files into UE4, too. (only “utc_all2.tga”) Then you’ll find “utc_all2” file on UE4. You do right click on this file and select “Create Material”, and you can create “mtc_all2_Mat” file in the same directory.
Set materials to UNITY-CHAN model
At last, we set this material to UNITY-CHAN fbx model. You only have to drag & drop this material file to the orange square area as below.
Set UNITY-CHAN model into sample scene
Finally, you place “SD_unitychan_generic_head” model into the Scene with drag and drop. You can see “UNITY-CHAN” on your scene!
First, we extract “UNITY-CHAN” fbx and texture datas from Unity. Second, we import “UNITY-CHAN” data into UE4. Finally, we set the material data to model and place it on the sample scene.
This post is under the UTJ/UCL.
- Developing real-time multiplayer game using MagicOnion -3. Client Program-
- Developing real-time multiplayer game using MagicOnion -2. Architectures-
- Developing real-time multiplayer game using MagicOnion -1. Overview-
- How to detect New Android SDK from Unity 2018.4 when you are using Android Studio 3.6