Exporting to Unity Workflow / More manual work then expected /


https://forum.reallusion.com/Topic384900.aspx
Print Topic | Close Window

By Peter (RL) - Last Year
k.rehimi (10/3/2018)


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):


Regarding the points you raise, here is a little feedback from the CC3 dev team. 

1: It is not possible to reduce the triangle count of the body mesh without combining it to the wearables.


Currently the only way reduce the body mesh is convert to our game base now using the option to "Convert to Game Base" on the Modify Panel.

2: It is not possible to combine meshes without reducing triangle count.


Right now we only have a way to combine mesh, you should convert the assets to Accessory and select the Accessories you want to merge, then go to Menu - Modify - Merge Accessory and execute it.

3: It is not possible to export the clothed character without the body.


We will consider to have this ability in a future update.

4: Every InstaLOD has its own baked texture set.


Yes, but you can choose to bake or not bake.
By The Simulation Crew - 6 Months Ago
Thank you so much Kareeem, you set the base for my findings.

As a 3D game and character artist I have tried CC3 from the release on and aimed to find the best possible pipeline for the most optimized result in Unity.
This is my workflow so far: click here for documentation.
Unfortunately these are many manual steps, but you can add or remove to your liking. 

I hope it helps someone!
~Enalya
By Peter (RL) - Last Year
Once again we do thank you for all the feedback in this thread and we do understand the process needs a little clearer instruction. We are working on adding further CC3 tutorials and will look specifically at the Unity export workflow and try to provide detailed tutorials to help achieve this in a clearer way. Thanks again.
By Kareeem - 6 Months Ago
Enalya this is amazing work an should be featured by Reallusion!

Although there is a ridiculous amount of klicking involved... Man oh man 

The only thing which would interest me is which shaders you use in unity and if you tried separating the lashes in Maya to combine them with the hair. 
By Kareeem - 6 Months Ago
Strange. I have never seen this. I am using 3ds max though. I had similar normal issues exporting meshes from maya to max in the past...
In the end I avoid bringing my characters in to 3ds max at all. Weird is though that you dont seem to have the issue on the blend shapes...

As I understand correctly your using the hidden mesh feature. why are you also removing tris in maya?
By The Simulation Crew - 6 Months Ago
I agree and can't find a good approach to it Sad
That is why I'm looking forward to the new shader that Unity promises in 2019.1 (source). 

Edit: I would say for now, the only solution is to hand model custom hair and tuck it inside the head mesh (so no hair cards), like they do in Sims 4.
By The Simulation Crew - Last Year
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
By slide47b - Last Year
Thank You, k.rehimi, very helpful. -k


By The Simulation Crew - 6 Months Ago
I've encountered a new problem: after manually deleting polys in the character Body mesh, it shows an odd normals issue in Unity 2018.3. The blend shapes don't have that issue, so it disappears when it's morphed into one:

https://forum.reallusion.com/uploads/images/c6bc9ffb-64e1-4b59-a4ff-cebe.png

I did delete all non-deformer history, tried all Maya export and Unity import settings, but nothing works. The only workaround is to put Normals in Unity import settings to 'Calculate', but this gives some sharp edges here and there that I don't want.
@Kareeem, did you not encounter this with your models? I hope someone can help Smile
By Kareeem - 6 Months Ago
Cool!

Although the hair in unity is just a big problem. I see your using the cutout method wich unfortunately is not giving very nice results for hair.
But even with separate meshes and a Fade or Transparent method you have the issue of the z clipping... you have any approach to that?
By Kareeem - Last Year
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
By Kareeem - Last Year
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
By Kareeem - Last Year
Another thing I just noticed is that it would be amazing if it would be possible to export the CC3 collision meshes!
By The Simulation Crew - Last Year
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
By Kareeem - Last Year
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


By Kareeem - Last Year
Hey Peter, 
Thanks for your response! 
As my research went on ( also posted here in this thread) a few things already cleared up.
I did not know about the feature of merging the Accessoires.

I will definetely open an entry in the Feedback tracker with some Suggestions on the complete workflow for unity. 
By The Simulation Crew - 6 Months Ago
@Kareeem: Thank you! Yes, unfortunately there is...

For the skin I use Pre-Integrated Skin Shader (asset store), which I really recommend.
In this case I combined the hair and eyelashes with the rest (Standard shader), but I can imagine you want to use a separate shader for them. In that case I suggest to combine them in Maya of Mesh Baker in Unity apart from the rest. 

Due to your valid question I updated the document!

Result with only 9 Batches:
https://forum.reallusion.com/uploads/images/3da85207-2fb0-4345-a8f1-51e4.png

By Kareeem - Last Year
Everyone who interested in this topic as well, please vote on the feedback tracker issue 5323 or comment if you have more suggestions.

I put together a list of features I thin everybody would benefit from a huge deal.
By e1_scheer - 5 Months Ago
This thread is a real life saver and should be pinned to the top of the forum.
I was also wondering if anyone knows how you set Instalod to not bake the
textures when creating multiple LOD levels?

Thanks !
By joseph.dalessandro - Last Year
I have two main issues with CC3 at the moment that are preventing me from using it.  

1)  The teeth of the character do not move (the jaw remains shut) when using the facial blendshapes that open the mouth.  I use a Unity Plug called "Lip Sync Pro" that makes uses of the characters facial blendshapes for lipsync, emotions and gestures.  If the teeth / jaw doesn't move when the character's mouth is open then it doesn't work.
2) There are no phoneme blendshapes on CC3 characters exported as FBX?  I don't see how anyone using any other piece of software is going to do any type of lip sync work without them.  They are required for lipsync unless you just animate the jaw open and close... which is a lame excuse and produces amateur results at best.  Reallusion is actually advertising and marketing and promoting a true ability to do real Lipsync for game-ready characters on their product page and in their teaser videos.  It's only possible to do it and with proper phoneme blendshapes or the only other way that I know of to do it is with their Live mocap solution which requires the purchase of another huge program... iClone. Very sneaky!  Advertise that CC3 can do lip sync character animation, but then require iClone in order for it to work?  Makes no sense!
By Kareeem - Last Year

--- 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!

By Kareeem - Last Year
I feel you.

But what exactly is the issue in your case. It really is possible to make this work.
By Peter (RL) - Last Year
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.
By The Simulation Crew - 6 Months Ago
Thanks for your fast reply! 
I am manually removing, because the hidden mesh feature still keeps a lot of polys in tact that I don't need (in the case of this character it even kept all of the body polys underneath the clothes..

It is indeed extra confusing that the blend shapes don't have the issue.
I'm doing another character the next few days, curious if it happens again.

Edit: Unfortunately it happens to every character after deleting faces from the Body. This is my best solution for it so far:
https://forum.reallusion.com/uploads/images/08d937cc-1679-4cd0-8f5b-9e73.jpg
By Kareeem - Last Year
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.
By joseph.dalessandro - Last Year
I have to say that this has been one very frustrating and time wasting experience.  This software product should work as advertised. Period.  It currently is very far from working with "Real-time game engines" and Unity.  I have already wasted several days trying unsuccessfully to get CC3 to export to Unity... as advertised ... and this is my day job and I'm the person who recommended my company purchase CC3 to use alongside Unity.  I've used iClone in the past at previous jobs and it worked great so I thought CC3 would be the same.  I was so wrong!  This software is currently all hype and no substance and it crashes constantly.  If you are a Unity developer stay away from this product ... it's a time suck and a complete waste of your time and energy... maybe 6 months to a year down the road it will work as advertised, but not at this time.  I'm sorry for being so harsh, but this is the truth.  I put my job on the line with this software and it let me down, big time.  I had to go back to just using Daz characters inside Unity.  It's just such a shame because they could have done things differently and released a product that actually works as advertised instead of releasing this piece of crap that crashes constantly and doesn't do what they claim it can.  And on top of all that there is literally no documentation or tutorials on the advertised CC3 to Unity workflow... probably because that feature doesn't really exist and they know it.  They just want us all to be beta testers and help them fix their software! Ugh!! What a huge disappointment!
By Kareeem - Last Year
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...