Textures missing in Unity


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

By jeff_807073 - 7 Years Ago
I'm exporting an FBX directly from Character Creator 3. I'm using the Unity3d settings and checking the "Embed Textures" box:

https://forum.reallusion.com/uploads/images/add7bd67-5a34-43a0-830a-a979.png

When I then bring this FBX file into Unity, the model initially has no textures.
When I go into the Unity Inspector for the object, I can see the materials. But no matter how I try to remap the materials, they never show.
Looking closer at the object in the Unity Inspector, it has materials but no textures.
The export from CC3 is also creating a directory structure for the textures. I get a couple of them (cornea and eye), but most of the directories are just blank.

What's the best way to get this character into Unity with the right materials/ textures?


By siumanchunandy - 7 Years Ago
I also have this problem ! 
Is this a CC3 bug?
By Alexxander - 7 Years Ago
Try this import settings:
https://forum.reallusion.com/uploads/images/61f35c55-2ece-4244-a7c8-0758.png

By jeff_807073 - 7 Years Ago
Those settings worked! Thank you! But led to one more thing...

Looks like all of the imported materials are set to use the Transparent rendering mode.  You can imagine the weird effects I'm getting, especially on clothing. I can create a script that changes all of these in Unity, but it seems like something is wrong with the export; they shouldn't be exporting like this.  Any additional thoughts?
By t_ipsen - 7 Years Ago
I have the same problem. did you find a fix ? 
By t_ipsen - 7 Years Ago
transparency issue 

https://forum.reallusion.com/uploads/images/d029da3d-ce37-403a-8c20-4ab7.png
By jeff_807073 - 7 Years Ago
If you look at the shader itself, it's set to Transparent. Flip it to Opaque and you're fine. Trouble is doing that when they're embedded in the models.  We can do it via script, but would rather just have a clean export of the fbx files.
By t_ipsen - 7 Years Ago
Thanks Jeff, that fixet it, but yes @ Reallusion we hope this will be on of the first updates to CC3 ?

In the mean time, Jeff if you make at script for your self that you want to share, then let me know !
By brent_114049 - 7 Years Ago
Finally I've found some others struggling with this too. I had all the same problems and while this thread definitely helped, it didn't get me all the way to a good "clean" character in Unity.  I'd seen the suggestions to use "Opaque" before but while it fixed some things it messed up others (like if used on the eyebrows it makes them all thick and black and hair looked super thick and weird like it was a blanket or something). I kind of gave up because I thought all these manual steps can't possibly be right... anyway, somehow reading this thread made me look into it a bit more and I discovered there are two other rendering mode settings besides Opaque and Transparent.  So, for those that still have models with weirdness, such as a semi-transparent surface along which the hair, eyelashes, and some aspects of clothing seem to flow, the "Fade" rendering mode seems to clean those up. You can see what I mean on the forehead, eyelashes, and ponytail of the picture above.  I had other issues like clothing, such as a tank top strap, being visible through thecharacter's arm.  Again, the skin-relatedmaterials are rendering as transparent instead of "Opaque."  Other clothing issues were a set of straps that you are supposed be able to see skin through - Opaque made them into a black surface but "Fade" got rid of the semi-transparent surface and made it look pretty nice.

I hope the above helps get closer to a final set of steps that get us there but I echo the request that Reallusion make this work nicer out of the box.  I also have one issue I'm not sure how to solve but perhaps someone can help...  After I set the rendering mode to "Fade" for the material that renders the side of my characters hair, which is sort of a short shave, I see the scalp poking through:

https://forum.reallusion.com/uploads/images/ea0f77bc-3c33-4808-9094-4ea1.jpg

This seems similar to a "clothing fitting" issue which I feel like I've seen fixed in CC3 with "conforming" or something but not sure how to fix it in Unity or if I have to sort of anticipate this from the CC3 side.  Any help would be very much appreciated!
By jeff_807073 - 7 Years Ago
Here's a script you can throw on an object to turn all sub-mesh shaders to Opaque. You'll be able to assign certain sub-meshes (hair!) as ones to skip. This totally assumes that you're using the standard shader (which is what iClone exports to).  This fixes them at run-time; they'll still be wonky in the editor.


public class FixIcloneShaders : MonoBehaviour
{
  public List<SkinnedMeshRenderer> ShadersToSkip;

  private void Start()
  {
    List<SkinnedMeshRenderer> allRenderers = new List<SkinnedMeshRenderer>(gameObject.GetComponentsInChildren<SkinnedMeshRenderer>());

    foreach (SkinnedMeshRenderer smr in allRenderers)
    {
      if (!ShadersToSkip.Contains(smr))
      {
        foreach (Material m in smr.materials)
        {
          FixMaterial(m);
        }
      }
    }
  }

  private void FixMaterial(Material m)
  {
    m.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One);
    m.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.Zero);
    m.SetInt("_ZWrite", 1);
    m.DisableKeyword("_ALPHATEST_ON");
    m.DisableKeyword("_ALPHABLEND_ON");
    m.DisableKeyword("_ALPHAPREMULTIPLY_ON");
    m.renderQueue = -1;
  }
}

By julesd - 7 Years Ago
Use the Cut and not Opaque option, do to the eyelashes. You still only get one sided material though, I use Amplify Shader to create my own double sided Opacity mask shader. If you do not have amplify shader for Unity I do really recommend it.

If you are trying, a Model that was Remeshed with Character Creator 3 there is no Opacity mask image.It was left out, for now.
By WarLord - 7 Years Ago
For those that haven't solved this yet (I keep getting questions about this issue) one workaround is to drag your texture folder into the project first, then drag in the character. Fix the normals with the popup and it should have all textures with no issues. If you don't see a texture folder then drag the fbx file into 3DXchange, 3DS Max or some program that will automatically extract the texture folder for you. Hopefully, this will answer the question for those that search the forum for this problem. I have no idea if this solves all missing texture problems but it has so far for my projects.

EDIT: I should add this does not work on all projects as I have had projects sent to me that failed to show the "Fix Normals" popup. If you don't get that first then I'd try the other workarounds listed in this thread.