reallusion / auto-setup-for-unity Goto Github PK
View Code? Open in Web Editor NEWiClone / Character Creator / ActorCore Auto Setup for Unity Script
License: GNU General Public License v2.0
iClone / Character Creator / ActorCore Auto Setup for Unity Script
License: GNU General Public License v2.0
I'm using this project in my HDRP Unity project instead of the DLL to import CC models.
By default, after an import, all the materials are black and almost no values are set.
For example, adding the line:
Debug.Log(kMaterialJson.ToJson());
at line 1090 in RLEditor.cs will log:
{"Material Type":"Pbr","MultiUV Index":0,"Two Side":true,"Diffuse Color":[0,0,0],"Ambient Color":[0,0,0],"Specular Color":[0,0,0],"Opacity":0,"Self Illumination":0,"Textures":{"Metallic":{"Texture Path":"","Strength":0,"Offset":[0,0],"Tiling":[0,0]},"Base Color":{"Texture Path":"./OldBG.fbm/Ga_Skin_Body_Pbr_Diffuse.tga","Strength":0,"Offset":[0,0],"Tiling":[0,0]},"Roughness":{"Texture Path":"","Strength":0,"Offset":[0,0],"Tiling":[0,0]},"Opacity":{"Texture Path":"./OldBG.fbm/Ga_Skin_Body_Pbr_Diffuse.tga","Strength":0,"Offset":[0,0],"Tiling":[0,0]},"Blend":{"Texture Path":"./textures/OldBG/OldBG/CC_Base_Tongue/Ga_Skin_Body_Pbr/Ga_Skin_Body_Pbr_blend_multiply.tga","Strength":0,"Offset":[0,0],"Tiling":[0,0],"Blend Mode":"Multiply"},"Normal":{"Texture Path":"./OldBG.fbm/Ga_Skin_Body_Pbr_Normal.tga","Strength":0,"Offset":[0,0],"Tiling":[0,0]},"Reflection":{"Texture Path":"","Strength":0,"Offset":[0,0],"Tiling":[0,0]},"AO":{"Texture Path":"./textures/OldBG/OldBG/CC_Base_Tongue/Ga_Skin_Body_Pbr/Ga_Skin_Body_Pbr_ao.tga","Strength":0,"Offset":[0,0],"Tiling":[0,0]},"MetallicAlpha":{"Texture Path":"./textures/OldBG/OldBG/CC_Base_Tongue/Ga_Skin_Body_Pbr/Ga_Skin_Body_Pbr_MetallicAlpha.tga"},"HDRP":{"Texture Path":"./textures/OldBG/OldBG/CC_Base_Tongue/Ga_Skin_Body_Pbr/Ga_Skin_Body_Pbr_HDRP.tga"}}}
As you can see, the Json parser is not able to read the decimal values, but the string are correct (e.g. Path).
Is it a LitJson library problem or am I doing something wrong?
Unity 2020.1.8f1
HDRP 8.2.0
This occurs on import of a new character from CC3 into Unity 2021.1.19f1, HDRP 11.0.0, and it recurs whenever this code is re-executed based on user activity. Stack trace:
Trying to copy properties from null material.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
RLPlugin.RLEditor:CreateMaterials (System.Collections.Generic.HashSet`1<string>,string,RLPlugin.RLEditor/EBaseGeneration,LitJson.JsonData) (at Assets/Plugins/Reallusion/Auto-Setup-for-Unity/Editor/RLEditor.cs:1043)
RLPlugin.RLEditor:OnPostprocessAllAssets (string[],string[],string[],string[]) (at Assets/Plugins/Reallusion/Auto-Setup-for-Unity/Editor/RLEditor.cs:894)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets (string[],string[],string[],string[],string[])
Initially I thought this might be related to #1, but it persists even after the diffusion profile has been assigned to the character and clothing materials.
I took a brief look at the code but haven't yet had time to investigate deeply.
Hello,
I'm using this package to import CC avatars in my Unity HDRP project.
I find that the hair doesn't render well with the default HDRP/Lit shader.
I modified your script to use the HDRP/Hair shader but still it doesn't render as good as in CC, especially the colors and the transparency.
Typically there are values (in the Json: root, tip, dye colors) and textures (flow, id, root maps) that are not used.
My question is: do you have a better hair shader for Unity HDRP that render hair as close as in CC?
When using 4b860f8 (HEAD at the time of writing) inside a HDRP Unity project (2021.1.16f1), imported characters have green skintones. This seems to be due to the unassigned diffusion profile in SSS_Profile.mat
.
If I understand correctly its properties are the ones copied at
Auto-Setup-for-Unity/Editor/RLEditor.cs
Line 1043 in 4b860f8
In the file .../Editor/RLEditor.cs the code at line 1100
rlMaterail.SetColor("_BaseColor", kBaseColor); - works only for SRP projects. But fails for projects with Built-in older Render Pipeline.
Need to use the same logic as lines 1115 - 1122.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.