Profile Picture

Exporting to Unity Workflow / More manual work then expected /

Posted By Kareeem Last Year
You don't have permission to rate!

Exporting to Unity Workflow / More manual work then expected /

Author
Message
Kareeem
Kareeem
Posted Last Year
View Quick Profile
Senior Member

Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)

Group: Forum Members
Last Active: 2 Months Ago
Posts: 82, Visits: 257

--- Update ---

Please read through the whole thread since my workflow changed over time. This post is the closest description of what I am doing so far for exporting models and this post explains how I export the animations.

Everyone who interested in this topic as well, please vote on the feedback tracker issue 5323 or comment if you have more suggestions.
There I put together a list of features I thin everybody would benefit from a huge deal.

----------------------

Original first Post

What I would like to achieve and what is in my eyes the best workflow for games:
1: Only the head, the eyes, the eye lashes and their morphs as one fbx ( no body ) 1 material for head and eyes and 1 material for the lashes
2: The naked body with hidden faces removed as single fbx ( no head )
3: All the clothes and accessories merged into one single mesh with 1 material
4: The hair as seperate mesh with one material

A few things I noticed when you want to make use of the new tools and are trying to export the complete character at once (please correct me if I am wrong):
1: It is not possible to reduce the triangle count of the body mesh without combining it to the wearables.
2: It is not possible to combine meshes without reducing trianglecount
3: It is not possible to export the clothed character without the body
4: Every InstaLOD has its own baked texture set.

Right now I am a bit disapointed in the new InstaLOD/Remesher/MergeMaterial features. Combining materials without combining meshes makes no sense. You will still have a drawcall per mesh because they are not static and cant be batched. Generating LODs is in theory a nice feature but here it scratches only the surface. I would love to have the option to at least keep eyes and body seperate to make use of the faces morphs. The LODs I can generate are only usable for actors really far away. A switch from the LOD0 to LOD1 while the character is talking would be a nightmare. Also every LOD uses an own texture set wich is a lot of unnecessary disk space if you have many characters ( but i guess with automatic solution there is no other way).

So, in my eyes the best approach with CC3 is this workaround:
1: Reduce all the wearables with the object reduction tool ( 50%, 25%, 12,5%, 5% ) - building your own LODs really. You have much more controll being able to conform your wearables before exporting.

2: Export 4 fbx files (wich are just for your wearables) while merging the materials by type. Unfortunately each of these LODs will have to use different texture sets.

3: Backup your project and delete all wearables ( except for the shoes. see below why ). Then export the body using InstaLOD. I used these settings:
https://forum.reallusion.com/uploads/images/26eeb6a3-e9a2-43f8-b02a-84d6.jpg

4: Unforntunately it is not possible to automatically delete the faces behind the clothes with this workflow. So you have to do that in your 3D application. Careful though... when deleting the wearables in CC3 the character might have a slightly different position because it has no shoes anymore... So just leave the shoes on while exporting and delete them later as well in max. If you have a character with short pants it will be a bit more of a challenge.
https://forum.reallusion.com/uploads/images/1fe6e970-119d-427d-9f31-42d3.png

5: Rename your textures cause CC3 will export you some really messy folder structure with even worse naming conventions.
6: Set everything up in Unity. 3 LODs might be enough for most projects. I used the unreduced bodymesh for LOD0 and LOD1 so I can have one lower level where i still can have facial animations.
https://forum.reallusion.com/uploads/images/09772856-07fc-4207-8113-28a3.png

7. After this I recommend you use Mesh Baker Pro in Unity to combine all your clothes to one mesh per LOD. Since you merged the materials already via CC3 this step is super easy.
Check out this: https://www.youtube.com/watch?v=lqxLVS9m2jQ

If anyone has a better way please let me know!

Edited
Last Year by k.rehimi
Kareeem
Kareeem
Posted Last Year
View Quick Profile
Senior Member

Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)

Group: Forum Members
Last Active: 2 Months Ago
Posts: 82, Visits: 257
Another thing I just noticed is that it would be amazing if it would be possible to export the CC3 collision meshes!
Edited
Last Year by k.rehimi
Kareeem
Kareeem
Posted Last Year
View Quick Profile
Senior Member

Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)

Group: Forum Members
Last Active: 2 Months Ago
Posts: 82, Visits: 257
I just came across the Game Base Character wich I guess fixes some of my problems. As I understand it reduces the triangle count of the body. has a simplfied bone structure and merges the bodys materials. Again the lashes are included wich makes no sense. You dont want to have a transparent shader in game for the whole character. Anyways... i will check that out and maybe this works better for me.

Oh... and I know I am responding to my own posts here but this is also a good way for me to keep track of what I am doing Smile
The Simulation Crew
The Simulation Crew
Posted Last Year
View Quick Profile
Senior Member

Senior Member (281 reputation)Senior Member (281 reputation)Senior Member (281 reputation)Senior Member (281 reputation)Senior Member (281 reputation)Senior Member (281 reputation)Senior Member (281 reputation)Senior Member (281 reputation)Senior Member (281 reputation)

Group: Forum Members
Last Active: 10 Months Ago
Posts: 11, Visits: 128
Please know how grateful I am for this topic, your thoughts and recommendations! I wouldn't have been anywhere without this. Thank you!

If you don't mind - how did you go about the animations? What do you record them with?
I have the following issue:
- I have my main character and LODs exported from CC3 and set up in Unity. 
- I open the character in iClone, record body and face animation and export it. 
- I use the Humanoid rig for it with copy from another avatar: the main one from CC3. 

This gives me an error, because somehow iClone renames the bone structure (for example 'root' to 'BoneRoot'). I tried renaming manually through Maya and in the FBX code, but that doesn't do the trick.
This means I can't retarget our animations to the CC3 character and LODs...

It would be awesome if someone can help Smile

~Lindy
Kareeem
Kareeem
Posted Last Year
View Quick Profile
Senior Member

Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)

Group: Forum Members
Last Active: 2 Months Ago
Posts: 82, Visits: 257
Thanks for letting me know that this topic helped you out.

I changed my workflow again because it was time consuming to reduce the polycount for all the LODs cloth, combine the meshes in unity and also to remove the hidden polygons from the LODs body parts in max. Its more effective to reduce them once in the beginning and then create a game base character for LOD1 and use the InstaLOD system to create further LOD.

https://forum.reallusion.com/uploads/images/ab3c43b7-75a7-4bc7-8489-8fc0.png


Regarding the issue with the bone naming...

I have the same problem. I did a bunch of research on how to share skeletons in unity between different meshes but had no luck so far. Using an avatar from an other FBX is not working for me either. Even from fbx files which have the same bone naming. I ended up with one avatar per fbx file and just sharing the animation controller. Its weird cause the Unity docu says it should work:

In some cases, you can change this option to Copy From Other Avatar to use an Avatar you already defined for another Model file. For example, if you create a Mesh (skin) in your 3D modeling application with several distinct animations, you can export the Mesh to one FBX file, and each animation to its own FBX file. When you import these files into Unity, you only need to create a single Avatar for the first file you import (usually the Mesh). As long as all the files use the same bone structure, you can re-use that Avatar for the rest of the files


But as the sharing of animations goes it should work even though your bones have different naming. Try generating avatar from fbx instead of using an other one. If that doesnt work check if all bones are linked correctly during import.

https://alastaira.files.wordpress.com/2013/07/image7.png

My research on recording the animation have brought me to the conclusion that these setups are the best in our price range:
- Headmount for IPhone X
- Face plugin for MotionLIve ( 300 €, the IPhone capturing seemed very good. I tested with a go pro 4 and faceware and was not very happy. Also Faceware is 1200€ very expensive.
- Perception Neuron for body mocap ( 1400€ + import taxes) This system can also track fingers.
I heard that the Perception Neuron requires a lot of cleaning and the hardware is very sensitive and the sensors break quite easily. Since we have a Kinect here I will also try that for the body mocap. For our game we dont need complex animations and this might be enough. Then of course we would need to mount the Leap Motion sensor also to the Headmount to capture the fingers. And i guess that requires even more cleaning. So I am not 100% sure what solution we will end up using.

What is your setup?
So long, Karim.
Edited
Last Year by k.rehimi
The Simulation Crew
The Simulation Crew
Posted Last Year
View Quick Profile
Senior Member

Senior Member (281 reputation)Senior Member (281 reputation)Senior Member (281 reputation)Senior Member (281 reputation)Senior Member (281 reputation)Senior Member (281 reputation)Senior Member (281 reputation)Senior Member (281 reputation)Senior Member (281 reputation)

Group: Forum Members
Last Active: 10 Months Ago
Posts: 11, Visits: 128
Thank you so much for taking the time and sharing about workflow and setup. Our workflow looks something similar, also using the game base (that is quite nice, although in my opinion some useless polys like at the fingernails). It would also help if we don't have to manually remove the hidden body polys...

'Copy from another Avatar' should and has worked for us, but only when every single bone and blend shape share the same name. The problem is: every external software that you need to record animation (even iClone) renames all these. This means the CC3 exports can't copy the Avatar from the animation FBX. But you are right, the messy option of every FBX with its own Avatar does work. 
I can't find any documentation or tutorial about how Reallusion has set things up in Unity anyway.

Our setup records directly in iClone:
- Face mocap: a generic high quality webcam
- Body animation: iClone library clips that we customized
We export that FBX animation clip (which includes both face and body keyframes) and import it in Unity, where we combine it with the audio clip in Timeline. 

For body motion capture I highly recommend the HTC Vive with 8 sensors for precise movement and little cleanup. For more generic and zoomed out stuff Rokoko also does the trick.
The best of luck to you Smile
Kareeem
Kareeem
Posted Last Year
View Quick Profile
Senior Member

Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)

Group: Forum Members
Last Active: 2 Months Ago
Posts: 82, Visits: 257
Interesting.

I guess its not possible to record body via Vive and face via Motion Live at the same time in IClone though?

Have you tried to import /export always through 3dxchange? Maybe that keeps the naming the same...
Peter (RL)
Peter (RL)
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (56.4K reputation)Distinguished Member (56.4K reputation)Distinguished Member (56.4K reputation)Distinguished Member (56.4K reputation)Distinguished Member (56.4K reputation)Distinguished Member (56.4K reputation)Distinguished Member (56.4K reputation)Distinguished Member (56.4K reputation)Distinguished Member (56.4K reputation)

Group: Administrators
Last Active: 29 minutes ago
Posts: 16.6K, Visits: 25.1K
Thank you for your feedback. I will pass this to the Character Creator team to review.

Please do continue to share your experiences using CC3 here, but do try to report any issues you have found in the Feedback Tracker. Thank you.


                                                                

Peter
Forum Administrator

www.reallusion.com


Kareeem
Kareeem
Posted Last Year
View Quick Profile
Senior Member

Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)

Group: Forum Members
Last Active: 2 Months Ago
Posts: 82, Visits: 257
I hope this gets solved. I still havent come up with a solution....

https://www.reallusion.com/FeedBackTracker/Issue/Bones-get-named-differently-when-exporting-from-IClone-or-CC3
Kareeem
Kareeem
Posted Last Year
View Quick Profile
Senior Member

Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)Senior Member (491 reputation)

Group: Forum Members
Last Active: 2 Months Ago
Posts: 82, Visits: 257
I finally found a workaround!

Check this: You can embedd motion files created in IClone in your FBX export from CC3. Since all the LODs have the same (incorrect) bone naming its possible to use an avatar ( skeleton ) from LOD0 on all the other LODs.

https://forum.reallusion.com/uploads/images/cc61fdda-e72e-42d2-9f66-0704.png

It is very important that you follow these steps. Unity doesnt fu**k around...:


1: Export your meshes
( with your desired settings )

https://forum.reallusion.com/uploads/images/3f3a37fc-02cb-447f-bc4f-feb5.jpg

2: Export your animation
( add all in one file )

https://forum.reallusion.com/uploads/images/e148aa82-b18f-44b9-8d4c-4f6b.png


3: Set up the Avatar in Unity
( from the animation fbx )
This will and has to be the main skeleton you use for all other LODs. Dont mess around with the "Optimize for Game" function. I couldnt get it to work. If you can please let me know.
I recommend checking the root transform as well and its possible to compress your animation if you like.
https://forum.reallusion.com/uploads/images/2bec09c3-58d1-4f4a-869f-d927.png

4: Create Animation Controller & place your animations ( only once )
You have to use this controller on all your LODs. Animations can be used from inside the fbx or can be extracted via Ctrl D. 

https://forum.reallusion.com/uploads/images/64d9d470-017d-425e-8ef4-d937.png

5: Setup the LODs fbx files
Use the existing Avatar from the animation fbx file

https://forum.reallusion.com/uploads/images/a9529772-c8b0-49d1-b946-cd62.png

6: Add Components to your LODs
Select all LODs in the hirarchy and add the Animator Component. Then select the Avatar from the "animation fbx" and the previously created Animation Controller.

https://forum.reallusion.com/uploads/images/e60bcccd-9a42-4c31-a5da-3862.png


Edited
Last Year by k.rehimi



Reading This Topic