Profile Picture

Textures missing in Unity

Posted By jeff_807073 6 Years Ago
Rated 5 stars based on 1 vote.
Author
Message
jeff_807073
jeff_807073
Posted 6 Years Ago
View Quick Profile
Senior Member

Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)

Group: Forum Members
Last Active: 6 Years Ago
Posts: 4, Visits: 26
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?


siumanchunandy
siumanchunandy
Posted 6 Years Ago
View Quick Profile
Senior Member

Senior Member (305 reputation)Senior Member (305 reputation)Senior Member (305 reputation)Senior Member (305 reputation)Senior Member (305 reputation)Senior Member (305 reputation)Senior Member (305 reputation)Senior Member (305 reputation)Senior Member (305 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 4, Visits: 191
I also have this problem ! 
Is this a CC3 bug?
Alexxander
Alexxander
Posted 6 Years Ago
View Quick Profile
Senior Member

Senior Member (477 reputation)Senior Member (477 reputation)Senior Member (477 reputation)Senior Member (477 reputation)Senior Member (477 reputation)Senior Member (477 reputation)Senior Member (477 reputation)Senior Member (477 reputation)Senior Member (477 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 22, Visits: 610
Try this import settings:
https://forum.reallusion.com/uploads/images/61f35c55-2ece-4244-a7c8-0758.png

jeff_807073
jeff_807073
Posted 6 Years Ago
View Quick Profile
Senior Member

Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)

Group: Forum Members
Last Active: 6 Years Ago
Posts: 4, Visits: 26
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?
t_ipsen
t_ipsen
Posted 6 Years Ago
View Quick Profile
Senior Member

Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 7, Visits: 145
I have the same problem. did you find a fix ? 
t_ipsen
t_ipsen
Posted 6 Years Ago
View Quick Profile
Senior Member

Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 7, Visits: 145
transparency issue 

https://forum.reallusion.com/uploads/images/d029da3d-ce37-403a-8c20-4ab7.png
jeff_807073
jeff_807073
Posted 6 Years Ago
View Quick Profile
Senior Member

Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)

Group: Forum Members
Last Active: 6 Years Ago
Posts: 4, Visits: 26
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.
t_ipsen
t_ipsen
Posted 6 Years Ago
View Quick Profile
Senior Member

Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)Senior Member (250 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 7, Visits: 145
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 !
brent_114049
brent_114049
Posted 6 Years Ago
View Quick Profile
Veteran Member

Veteran Member (623 reputation)Veteran Member (623 reputation)Veteran Member (623 reputation)Veteran Member (623 reputation)Veteran Member (623 reputation)Veteran Member (623 reputation)Veteran Member (623 reputation)Veteran Member (623 reputation)Veteran Member (623 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 29, Visits: 151
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!
jeff_807073
jeff_807073
Posted 6 Years Ago
View Quick Profile
Senior Member

Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)Senior Member (254 reputation)

Group: Forum Members
Last Active: 6 Years Ago
Posts: 4, Visits: 26
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;
  }
}




Reading This Topic