diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d115bf..dc2ae27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ Changelog ========= +### v 1.4.3 +- Tries to untangle instalod duplication suffixes on accessories. + - inc. Script error fix that was blocking build materials when instalod meshes were not found in Json data. +- Cast shadows removed from Tearline, Eye occlusion and scalp meshes. +- Stand alone shader packages for the various pipelines included in /Packages/ folder. + ### v 1.4.2 - OSX and Linux file path support. - Tweaked character model importer settings for better normal import and blend shape normal generation. Should reduce mesh smoothing issues. diff --git a/Editor/CharacterInfo.cs b/Editor/CharacterInfo.cs index 50b68e6..e471259 100644 --- a/Editor/CharacterInfo.cs +++ b/Editor/CharacterInfo.cs @@ -356,25 +356,52 @@ public QuickJSON GetMatJson(GameObject obj, string sourceName) if (jsonMeshData != null) { jsonPath = objName + "/Materials/" + sourceName; - if (jsonMeshData.PathExists(jsonPath)) + matJson = jsonMeshData.GetObjectAtPath(jsonPath); + + if (matJson == null) { - matJson = jsonMeshData.GetObjectAtPath(jsonPath); + if (objName.iContains("_Extracted")) + { + objName = objName.Substring(0, objName.IndexOf("_Extracted", System.StringComparison.InvariantCultureIgnoreCase)); + + jsonPath = objName + "/Materials/" + sourceName; + matJson = jsonMeshData.GetObjectAtPath(jsonPath); + } } - else + + if (matJson == null) { // there is a bug where a space in name causes the name to be truncated on export from CC3/4 if (objName.Contains(" ")) { - Util.LogWarn("Object name " + objName + " contains a space, this can cause the materials to setup incorrectly."); - string[] split = objName.Split(' '); - objName = split[0]; - jsonPath = objName + "/Materials/" + sourceName; + Util.LogWarn("Object name " + objName + " contains a space, this can cause the materials to setup incorrectly..."); + string[] split = objName.Split(' '); + jsonPath = split[0] + "/Materials/" + sourceName; + if (jsonMeshData.PathExists(jsonPath)) + { + matJson = jsonMeshData.GetObjectAtPath(jsonPath); + } + } + } + + if (matJson == null) + { + // instalod will generate unique suffixes _0/_1/_2 on character objects where object names and container + // transforms have the same name, try to untangle the object name by speculatively removing this suffix. + // (seems to happen mostly on accessories) + if (objName[objName.Length - 2] == '_' && char.IsDigit(objName[objName.Length - 1])) + { + Util.LogWarn("Object name " + objName + " may by suffixed by InstaLod exporter. Attempting to untangle..."); + + string specName = objName.Substring(0, objName.Length - 2); + jsonPath = specName + "/Materials/" + sourceName; if (jsonMeshData.PathExists(jsonPath)) { matJson = jsonMeshData.GetObjectAtPath(jsonPath); } } } + } if (matJson == null) Util.LogError("Unable to find json material data: " + jsonPath); diff --git a/Editor/Importer.cs b/Editor/Importer.cs index 5bf6273..517cd10 100644 --- a/Editor/Importer.cs +++ b/Editor/Importer.cs @@ -261,7 +261,7 @@ public GameObject Import() ProcessObjectTreeBakePass(fbx); // create / apply materials and shaders with supplied or baked texures. - ProcessObjectTreeBuildPass(fbx); + ProcessObjectTreeBuildPass(fbx); characterInfo.tempHairBake = false; @@ -290,8 +290,8 @@ public GameObject Import() AssetDatabase.Refresh(); // create prefab. - GameObject prefabAsset = RL.CreatePrefabFromFbx(characterInfo, fbx, out GameObject prefabInstance); - + GameObject prefabAsset = RL.CreatePrefabFromFbx(characterInfo, fbx, out GameObject prefabInstance); + // setup 2 pass hair in the prefab. if (characterInfo.DualMaterialHair) { @@ -313,6 +313,9 @@ public GameObject Import() MeshUtil.FixSkinnedMeshBounds(prefabInstance); } + // apply post setup to prefab instance + ProcessObjectTreePostPass(prefabInstance); + // save final prefab instance and remove from scene RL.SaveAndRemovePrefabInstance(prefabAsset, prefabInstance); @@ -373,8 +376,6 @@ private void ProcessObjectBuildPass(Renderer renderer) Util.LogInfo(" Material name: " + sourceName + ", type:" + materialType.ToString()); - FixRayTracing(obj, sharedMat, materialType); - // re-use or create the material. Material mat = CreateRemapMaterial(materialType, sharedMat, sourceName); @@ -499,7 +500,43 @@ private void ProcessObjectBakePass(Renderer renderer) } } } - } + } + + void ProcessObjectTreePostPass(GameObject obj) + { + Renderer[] renderers = obj.GetComponentsInChildren(); + + foreach (Renderer renderer in renderers) + { + ProcessObjectPostPass(renderer); + } + } + + private void ProcessObjectPostPass(Renderer renderer) + { + GameObject obj = renderer.gameObject; + + if (renderer) + { + Util.LogInfo("Post Processing sub-object: " + obj.name); + + foreach (Material sharedMat in renderer.sharedMaterials) + { + // in case any of the materials have been renamed after a previous import, get the source name. + string sourceName = Util.GetSourceMaterialName(fbxPath, sharedMat); + + // fetch the json parent for this material. + // the json data for the material contains custom shader names, parameters and texture paths. + QuickJSON matJson = characterInfo.GetMatJson(obj, sourceName); + + // determine the material type, this dictates the shader and template material. + MaterialType materialType = GetMaterialType(obj, sharedMat, sourceName, matJson); + + // Fix ray tracing and shadow casting + FixRayTracing(obj, sharedMat, materialType); + } + } + } private MaterialType GetMaterialType(GameObject obj, Material mat, string sourceName, QuickJSON matJson) { @@ -679,12 +716,14 @@ private void FixRayTracing(GameObject obj, Material mat, MaterialType materialTy materialType == MaterialType.Tearline) { Pipeline.DisableRayTracing(smr); + smr.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off; } else if (materialType == MaterialType.Scalp) { if (smr.sharedMaterials.Length == 1) { Pipeline.DisableRayTracing(smr); + smr.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off; } } } @@ -866,7 +905,7 @@ private void ConnectDefaultMaterial(GameObject obj, string sourceName, Material string customShader = matJson?.GetStringValue("Custom Shader/Shader Name"); string jsonMaterialType = matJson?.GetStringValue("Material Type"); - if (jsonMaterialType.iEquals("Tra")) + if (jsonMaterialType == "Tra") { if (RP == RenderPipeline.HDRP) { @@ -1159,7 +1198,7 @@ private void ConnectDefaultMaterial(GameObject obj, string sourceName, Material mat.SetFloatIf("_GlossMapScale", smoothness - microRoughnessMod); } } - else if (jsonMaterialType.iEquals("Tra")) + else if (jsonMaterialType == "Tra") { float glossiness = 0.5f; float specular = 1f; diff --git a/Editor/ImporterWindow.cs b/Editor/ImporterWindow.cs index 9913880..e31c5fd 100644 --- a/Editor/ImporterWindow.cs +++ b/Editor/ImporterWindow.cs @@ -1662,13 +1662,15 @@ public Styles() fakeButtonContext.padding = new RectOffset(1, 1, 1, 1); fakeButtonContext.stretchHeight = true; fakeButtonContext.stretchWidth = true; + + FixMeh(); } public void FixMeh() { if (!dragTex) { - dragTex = TextureColor(Color.white * 0.1f); + dragTex = TextureColor(new Color(0f,0f,0f,0.25f)); dragBarStyle.normal.background = dragTex; } if (!contextTex) diff --git a/Editor/MeshUtil.cs b/Editor/MeshUtil.cs index e348bff..a534fa3 100644 --- a/Editor/MeshUtil.cs +++ b/Editor/MeshUtil.cs @@ -1130,20 +1130,23 @@ public static GameObject Extract2PassHairMeshes(CharacterInfo info, GameObject p if (oldMat.shader.name.iContains(Pipeline.SHADER_HQ_HAIR)) { + float alphaClipValue = 0.666f; + if (Pipeline.is3D) alphaClipValue = 0.55f; + // set alpha clip and remap to values that work better // with the two material system. if (isFacialObject) - { - oldMat.SetFloatIf("_AlphaClip", 0.666f); - oldMat.SetFloatIf("_AlphaClip2", 0.666f); + { + oldMat.SetFloatIf("_AlphaClip", alphaClipValue); + oldMat.SetFloatIf("_AlphaClip2", alphaClipValue); oldMat.SetFloatIf("_AlphaPower", 1.5f); oldMat.SetFloatIf("_ShadowClip", 0.5f); oldMat.SetFloatIf("_AlphaRemap", 1.0f); } else { - oldMat.SetFloatIf("_AlphaClip", 0.666f); - oldMat.SetFloatIf("_AlphaClip2", 0.666f); + oldMat.SetFloatIf("_AlphaClip", alphaClipValue); + oldMat.SetFloatIf("_AlphaClip2", alphaClipValue); oldMat.SetFloatIf("_AlphaPower", 0.7f); oldMat.SetFloatIf("_ShadowClip", 0.5f); oldMat.SetFloatIf("_AlphaRemap", 1.0f); diff --git a/Editor/Pipeline.cs b/Editor/Pipeline.cs index 5bb2626..3ee1510 100644 --- a/Editor/Pipeline.cs +++ b/Editor/Pipeline.cs @@ -21,6 +21,7 @@ using UnityEngine; using UnityEngine.Diagnostics; using UnityEngine.Rendering; +using System.IO; #if HDRP_10_5_0_OR_NEWER using UnityEngine.Rendering.HighDefinition; using UnityEditor.Rendering.HighDefinition; @@ -34,13 +35,13 @@ public enum MaterialType { None, Skin, Head, Eye, Cornea, EyeOcclusion, Tearline, Hair, Scalp, Eyelash, Teeth, Tongue, DefaultOpaque, DefaultAlpha, SSS - } + } public enum MaterialQuality { None, Default, High, Baked } public static class Pipeline { - public const string VERSION = "1.4.2"; + public const string VERSION = "1.4.3"; #if HDRP_10_5_0_OR_NEWER // version diff --git a/Editor/Shader/CustomHairShaderGUI.cs b/Editor/Shader/CustomHairShaderGUI.cs new file mode 100644 index 0000000..483ecaf --- /dev/null +++ b/Editor/Shader/CustomHairShaderGUI.cs @@ -0,0 +1,200 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering; +using UnityEditor; +using System.Linq; +using System.IO; + +namespace Reallusion.Import +{ + public class CustomHairShaderGUI : ShaderGUI + { + private Material[] pass1 = null; + private Material[] pass2 = null; + private Material[] sources = null; + + private void CheckMaterials(Object[] targets) + { + bool rebuild = false; + + if (pass1 == null || pass1.Length != targets.Length) + { + pass1 = new Material[targets.Length]; + rebuild = true; + } + + if (pass2 == null || pass2.Length != targets.Length) + { + pass2 = new Material[targets.Length]; + rebuild = true; + } + + if (sources == null || sources.Length != targets.Length) + { + sources = new Material[targets.Length]; + rebuild = true; + } + + if (rebuild) + { + for (int i = 0; i < targets.Length; i++) + { + Material target = targets[i] as Material; + + string path = AssetDatabase.GetAssetPath(target); + string folder = Path.GetDirectoryName(path); + string name = Path.GetFileNameWithoutExtension(path); + string pass1Path = Path.Combine(folder, name + "_1st_Pass.mat"); + string pass2Path = Path.Combine(folder, name + "_2nd_Pass.mat"); + if (File.Exists(pass1Path)) pass1[i] = AssetDatabase.LoadAssetAtPath(pass1Path); + if (File.Exists(pass2Path)) pass2[i] = AssetDatabase.LoadAssetAtPath(pass2Path); + sources[i] = target; + } + } + } + + override public void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties) + { + EditorGUI.BeginChangeCheck(); + + // render the shader properties using the default GUI + base.OnGUI(materialEditor, properties); + + Material targetMat = materialEditor.target as Material; + + CheckMaterials(materialEditor.targets); + + if (EditorGUI.EndChangeCheck()) + { + CopyMaterialProps(targetMat); + } + } + + private bool SetFloatIfSourcesAgree(Material from, string prop) + { + float value = from.GetFloat(prop); + + for (int i = 0; i < sources.Length; i++) + { + if (sources[i].GetFloat(prop) != value) return false; + } + + for (int i = 0; i < sources.Length; i++) + { + if (pass1[i]) pass1[i].SetFloatIf(prop, value); + if (pass2[i]) pass2[i].SetFloatIf(prop, value); + } + + if (prop == "BOOLEAN_ENABLECOLOR") + { + for (int i = 0; i < sources.Length; i++) + { + if (value == 1f) + { + if (pass1[i]) pass1[i].EnableKeyword("BOOLEAN_ENABLECOLOR_ON"); + if (pass2[i]) pass2[i].EnableKeyword("BOOLEAN_ENABLECOLOR_ON"); + } + else + { + if (pass1[i]) pass1[i].DisableKeyword("BOOLEAN_ENABLECOLOR_ON"); + if (pass2[i]) pass2[i].DisableKeyword("BOOLEAN_ENABLECOLOR_ON"); + } + } + } + + return true; + } + + private bool SetColorIfSourcesAgree(Material from, string prop) + { + Color value = from.GetColor(prop); + + for (int i = 0; i < sources.Length; i++) + { + if (sources[i].GetColor(prop) != value) return false; + } + + for (int i = 0; i < sources.Length; i++) + { + if (pass1[i]) pass1[i].SetColorIf(prop, value); + if (pass2[i]) pass2[i].SetColorIf(prop, value); + } + + return true; + } + + private bool SetVectorIfSourcesAgree(Material from, string prop) + { + Vector4 value = from.GetVector(prop); + + for (int i = 0; i < sources.Length; i++) + { + if (sources[i].GetVector(prop) != value) return false; + } + + for (int i = 0; i < sources.Length; i++) + { + if (pass1[i]) pass1[i].SetVectorIf(prop, value); + if (pass2[i]) pass2[i].SetVectorIf(prop, value); + } + + return true; + } + + private bool SetTexureIfSourcesAgree(Material from, string prop) + { + Texture value = from.GetTexture(prop); + + for (int i = 0; i < sources.Length; i++) + { + if (sources[i].GetTexture(prop) != value) return false; + } + + for (int i = 0; i < sources.Length; i++) + { + if (pass1[i] && pass1[i].GetTexture(prop) != value) + pass1[i].SetTextureIf(prop, value); + if (pass2[i] && pass2[i].GetTexture(prop) != value) + pass2[i].SetTextureIf(prop, value); + } + + return true; + } + + private void CopyMaterialProps(Material from) + { + int props = from.shader.GetPropertyCount(); + for (int i = 0; i < props; i++) + { + string prop = from.shader.GetPropertyName(i); + int flagValue = (int)from.shader.GetPropertyFlags(i); + int checkBit = 0x00000001; //bit for UnityEngine.Rendering.ShaderPropertyFlags.HideInInspector + int flagHasBit = (flagValue & checkBit); + ShaderPropertyType type = from.shader.GetPropertyType(i); + + if ((flagValue & checkBit) == 0) + { + switch (type) + { + case ShaderPropertyType.Texture: + SetTexureIfSourcesAgree(from, prop); + break; + + case ShaderPropertyType.Float: + case ShaderPropertyType.Range: + SetFloatIfSourcesAgree(from, prop); + break; + + case ShaderPropertyType.Color: + SetColorIfSourcesAgree(from, prop); + break; + + case ShaderPropertyType.Vector: + SetVectorIfSourcesAgree(from, prop); + break; + } + } + } + } + } +} \ No newline at end of file diff --git a/Editor/Shader/CustomHairShaderGUI.cs.meta b/Editor/Shader/CustomHairShaderGUI.cs.meta new file mode 100644 index 0000000..52cb142 --- /dev/null +++ b/Editor/Shader/CustomHairShaderGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 34d2eafa926dbf944adc5dda9e0e9680 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/ShaderPackageManifest.cs b/Editor/ShaderPackageManifest.cs new file mode 100644 index 0000000..62d691d --- /dev/null +++ b/Editor/ShaderPackageManifest.cs @@ -0,0 +1,121 @@ +using UnityEditor; +using UnityEngine; +using System.IO; + +namespace Reallusion.Import +{ + public class ShaderPackageManifest : ScriptableObject + { + public string packageVersion = "0.0.0"; + public string shaderPackageGuid = "0"; + + public const string SHADER_PACKAGE_GUID_3D = "bb0033482f21aca428935ae427801441"; + public const string SHADER_PACKAGE_GUID_URP10 = "262039ac86a922246b86ddb4223895f0"; + public const string SHADER_PACKAGE_GUID_URP12 = "c071ccb632d0d9e42a46d20aa5f82ebd"; + public const string SHADER_PACKAGE_GUID_HDRP10 = "ac3c47e6d2a7bc840be841aa1783fad9"; + public const string SHADER_PACKAGE_GUID_HDRP12 = "7752b315a58f7ef4489dd777221f3432"; + public const string SHADER_PACKAGE_PATH_3D = "Assets\\CCiC Unity Tools 3D"; + public const string SHADER_PACKAGE_PATH_URP10 = "Assets\\CCiC Unity Tools URP10"; + public const string SHADER_PACKAGE_PATH_URP12 = "Assets\\CCiC Unity Tools URP12"; + public const string SHADER_PACKAGE_PATH_HDRP10 = "Assets\\CCiC Unity Tools HDRP10"; + public const string SHADER_PACKAGE_PATH_HDRP12 = "Assets\\CCiC Unity Tools HDRP12"; + public const string SHADER_PACKAGE_MANIFEST_GUID = "dcd86d18493245c478e0879a56d8e81f"; + + /* + [MenuItem("Reallusion/Misc Tools/Import Shader Package", priority = 200)] + private static void DoImportShaderPackage() + { + ShaderPackageManifest.ImportShaderPackage(); + } + */ + + public static ShaderPackageManifest GetShaderManifest(string packageFolder) + { + ShaderPackageManifest manifest = null; + string manifestPath = AssetDatabase.GUIDToAssetPath(SHADER_PACKAGE_MANIFEST_GUID); + + // try to load manifest from the expected GUID + if (!string.IsNullOrEmpty(manifestPath)) + { + manifest = AssetDatabase.LoadAssetAtPath(manifestPath); + } + + if (manifest == null) + { + // try to load manifest from the expected shader package folder + manifestPath = Path.Combine(packageFolder, "ShaderPackageManifest.asset"); + if (!string.IsNullOrEmpty(manifestPath)) + { + manifest = AssetDatabase.LoadAssetAtPath(manifestPath); + } + + // otherwise create a new one. + if (manifest == null) + { + manifest = ScriptableObject.CreateInstance(); + Util.EnsureAssetsFolderExists(packageFolder); + AssetDatabase.CreateAsset(manifest, manifestPath); + } + } + + return manifest; + } + + public static void UpdateShaderManifest(ScriptableObject manifest) + { + EditorUtility.SetDirty(manifest); +#if UNITY_2021_2_OR_NEWER + AssetDatabase.SaveAssetIfDirty(AssetDatabase.GUIDFromAssetPath(AssetDatabase.GetAssetPath(manifest))); +#else + AssetDatabase.SaveAssets(); +#endif + } + + public static bool ImportShaderPackage() + { +#if HDRP_12_0_0_OR_NEWER + string shaderPackageGuid = SHADER_PACKAGE_GUID_HDRP12; + string shaderPackageFolder = SHADER_PACKAGE_PATH_HDRP12; +#elif HDRP_10_5_0_OR_NEWER + string shaderPackageGuid = SHADER_PACKAGE_GUID_HDRP10; + string shaderPackageFolder = SHADER_PACKAGE_PATH_HDRP10; +#elif URP_12_0_0_OR_NEWER + string shaderPackageGuid = SHADER_PACKAGE_GUID_URP12; + string shaderPackageFolder = SHADER_PACKAGE_PATH_URP12; +#elif URP_10_5_0_OR_NEWER + string shaderPackageGuid = SHADER_PACKAGE_GUID_URP10; + string shaderPackageFolder = SHADER_PACKAGE_PATH_URP10; +#else + string shaderPackageGuid = SHADER_PACKAGE_GUID_3D; + string shaderPackageFolder = SHADER_PACKAGE_PATH_3D; +#endif + string shaderPackagePath = AssetDatabase.GUIDToAssetPath(shaderPackageGuid); + + // check shader package manifest exists and is current version + bool installPackage = true; + + ShaderPackageManifest manifest = GetShaderManifest(shaderPackageFolder); + + // if no shader package manifest, install package + if (manifest != null && + manifest.shaderPackageGuid == shaderPackageGuid && + manifest.packageVersion == Pipeline.FULL_VERSION) + { + Util.LogInfo("CC/iC Unity Tools Shader Package up to date."); + installPackage = false; + } + + if (installPackage) + { + Util.LogInfo("Installing CC/iC Unity Tools Shader Package: " + Pipeline.FULL_VERSION); + AssetDatabase.ImportPackage(shaderPackagePath, false); + manifest = GetShaderManifest(shaderPackageFolder); + manifest.packageVersion = Pipeline.FULL_VERSION; + manifest.shaderPackageGuid = shaderPackageGuid; + UpdateShaderManifest(manifest); + } + + return false; + } + } +} diff --git a/Editor/ShaderPackageManifest.cs.meta b/Editor/ShaderPackageManifest.cs.meta new file mode 100644 index 0000000..690f2a1 --- /dev/null +++ b/Editor/ShaderPackageManifest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a79b2dcacb27b134abac2bcf99ec65cb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/Util.cs b/Editor/Util.cs index 239cadd..17b2458 100644 --- a/Editor/Util.cs +++ b/Editor/Util.cs @@ -588,13 +588,13 @@ public static GameObject FindPreviewScenePrefab() { string[] texGuids; - texGuids = AssetDatabase.FindAssets("t:prefab PreviewScenePrefab"); + texGuids = AssetDatabase.FindAssets("t:prefab RL_PreviewScenePrefab"); foreach (string guid in texGuids) { string assetPath = AssetDatabase.GUIDToAssetPath(guid); string name = Path.GetFileNameWithoutExtension(assetPath); - if (name.Equals("PreviewScenePrefab", System.StringComparison.InvariantCultureIgnoreCase)) + if (name.Equals("RL_PreviewScenePrefab", System.StringComparison.InvariantCultureIgnoreCase)) { return AssetDatabase.LoadAssetAtPath(assetPath); } @@ -613,7 +613,15 @@ public static string GetSourceMaterialName(string fbxPath, Material sharedMateri if (pair.Value == sharedMaterial) return pair.Key.name; } - return sharedMaterial.name; + string sourceName = sharedMaterial.name; + + if (sourceName.iContains("_1st_Pass")) + sourceName = sourceName.Substring(0, sourceName.IndexOf("_1st_Pass", System.StringComparison.InvariantCultureIgnoreCase)); + + if (sourceName.iContains("_2nd_Pass")) + sourceName = sourceName.Substring(0, sourceName.IndexOf("_2nd_Pass", System.StringComparison.InvariantCultureIgnoreCase)); + + return sourceName; } // example functions diff --git a/Editor/com.soupday.cc3_unity_tools.editor.asmdef b/Editor/com.soupday.cc3_unity_tools.editor.asmdef index 7a074df..c78f46b 100644 --- a/Editor/com.soupday.cc3_unity_tools.editor.asmdef +++ b/Editor/com.soupday.cc3_unity_tools.editor.asmdef @@ -1,16 +1,22 @@ { "name": "soupday.cc3_unity_tools.editor", "rootNamespace": "Reallusion.Import", - "references": [ + "references": [ "GUID:3eae0364be2026648bf74846acb8a731", "GUID:df380645f10b7bc4b97d4f5eb6303d95", "GUID:78bd2ddd6e276394a9615c203e574844", "GUID:457756d89b35d2941b3e7b37b4ece6f1", - "GUID:3932ccc3044a255448b1c8bfffe8d0c1", - "GUID:8f7035be1433e7b42bb810f12982480e", + "GUID:8f7035be1433e7b42bb810f12982480e", "GUID:f9dedde5eec30c2468e14d8a7b14626e", "GUID:7e9d95a3be8cd654ba8a8d2bb2409223", - "GUID:22f31b74491fb45d5b598e0b935deb31" + "GUID:22f31b74491fb45d5b598e0b935deb31", + "GUID:c579267770062bf448e75eb160330b7f", + "GUID:15fc0a57446b3144c949da3e2b9737a9", + "GUID:5a630cec8ed146c44818bd9e43016622", + "GUID:a35efad8797223d499f8c68b1f545dbc", + "GUID:d60799ab2a985554ea1a39cd38695018", + "GUID:f68ff95cd5433b640840728c8ffe0f9d", + "GUID:3932ccc3044a255448b1c8bfffe8d0c1" ], "includePlatforms": [ "Editor" @@ -25,9 +31,9 @@ "defineConstraints": [], "versionDefines": [ { - "name": "com.unity.render-pipelines.high-definition", - "expression": "12.0.0", - "define": "HDRP_12_0_0_OR_NEWER" + "name": "com.unity.postprocessing", + "expression": "3.1.1", + "define": "UNITY_POST_PROCESSING_3_1_1" }, { "name": "Unity", @@ -39,6 +45,16 @@ "expression": "1.0.7", "define": "UNITY_ALEMBIC_1_0_7" }, + { + "name": "com.unity.render-pipelines.universal", + "expression": "10.5.0", + "define": "URP_10_5_0_OR_NEWER" + }, + { + "name": "com.unity.render-pipelines.universal", + "expression": "12.0.0", + "define": "URP_12_0_0_OR_NEWER" + }, { "name": "com.unity.render-pipelines.high-definition", "expression": "10.5.0", @@ -54,7 +70,7 @@ "expression": "12.0.0", "define": "HDRP_12_0_0_OR_NEWER" }, - { + { "name": "com.unity.demoteam.hair", "expression": "0.9.0-exp.1", "define": "HAS_PACKAGE_STRAND_HAIR" diff --git a/Scenes.meta b/HDRP/Preview Scene.meta similarity index 77% rename from Scenes.meta rename to HDRP/Preview Scene.meta index 99e76c5..fa71c7e 100644 --- a/Scenes.meta +++ b/HDRP/Preview Scene.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 217bf5dab25bcf2488d5f7f24adc79d5 +guid: e55f291b931fc4d448ad540d28a8a7d0 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Scenes/PreviewScene/Materials/floorSpot.mat b/HDRP/Preview Scene/RL_FloorSpot.mat similarity index 99% rename from Scenes/PreviewScene/Materials/floorSpot.mat rename to HDRP/Preview Scene/RL_FloorSpot.mat index 1799f15..9118bd4 100644 --- a/Scenes/PreviewScene/Materials/floorSpot.mat +++ b/HDRP/Preview Scene/RL_FloorSpot.mat @@ -7,7 +7,7 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: floorSpot + m_Name: RL_FloorSpot m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3} m_ShaderKeywords: _DISABLE_SSR_TRANSPARENT _NORMALMAP_TANGENT_SPACE m_LightmapFlags: 4 diff --git a/Scenes/PreviewScene/Materials/floorSpot.mat.meta b/HDRP/Preview Scene/RL_FloorSpot.mat.meta similarity index 100% rename from Scenes/PreviewScene/Materials/floorSpot.mat.meta rename to HDRP/Preview Scene/RL_FloorSpot.mat.meta diff --git a/Scenes/PreviewScene/floorSpot.png b/HDRP/Preview Scene/RL_FloorSpot.png similarity index 100% rename from Scenes/PreviewScene/floorSpot.png rename to HDRP/Preview Scene/RL_FloorSpot.png diff --git a/Scenes/PreviewScene/floorSpot.png.meta b/HDRP/Preview Scene/RL_FloorSpot.png.meta similarity index 100% rename from Scenes/PreviewScene/floorSpot.png.meta rename to HDRP/Preview Scene/RL_FloorSpot.png.meta diff --git a/Scenes/PreviewScene.unity b/HDRP/Preview Scene/RL_PreviewScene.unity similarity index 100% rename from Scenes/PreviewScene.unity rename to HDRP/Preview Scene/RL_PreviewScene.unity diff --git a/Scenes/PreviewScene.unity.meta b/HDRP/Preview Scene/RL_PreviewScene.unity.meta similarity index 100% rename from Scenes/PreviewScene.unity.meta rename to HDRP/Preview Scene/RL_PreviewScene.unity.meta diff --git a/Scenes/PreviewScenePrefab.prefab b/HDRP/Preview Scene/RL_PreviewScenePrefab.prefab similarity index 99% rename from Scenes/PreviewScenePrefab.prefab rename to HDRP/Preview Scene/RL_PreviewScenePrefab.prefab index 76d838d..045a9dc 100644 --- a/Scenes/PreviewScenePrefab.prefab +++ b/HDRP/Preview Scene/RL_PreviewScenePrefab.prefab @@ -933,7 +933,7 @@ GameObject: m_Component: - component: {fileID: 3737093066198893668} m_Layer: 0 - m_Name: PreviewScenePrefab + m_Name: RL_PreviewScenePrefab m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/Scenes/PreviewScenePrefab.prefab.meta b/HDRP/Preview Scene/RL_PreviewScenePrefab.prefab.meta similarity index 100% rename from Scenes/PreviewScenePrefab.prefab.meta rename to HDRP/Preview Scene/RL_PreviewScenePrefab.prefab.meta diff --git a/Scenes/PreviewScene/ReflectionProbe-0.exr b/HDRP/Preview Scene/RL_PreviewSceneReflectionProbe.exr similarity index 100% rename from Scenes/PreviewScene/ReflectionProbe-0.exr rename to HDRP/Preview Scene/RL_PreviewSceneReflectionProbe.exr diff --git a/Scenes/PreviewScene/ReflectionProbe-0.exr.meta b/HDRP/Preview Scene/RL_PreviewSceneReflectionProbe.exr.meta similarity index 100% rename from Scenes/PreviewScene/ReflectionProbe-0.exr.meta rename to HDRP/Preview Scene/RL_PreviewSceneReflectionProbe.exr.meta diff --git a/Scenes/PreviewScene/RL_previewGlobalProfile.asset b/HDRP/Preview Scene/RL_previewGlobalProfile.asset similarity index 99% rename from Scenes/PreviewScene/RL_previewGlobalProfile.asset rename to HDRP/Preview Scene/RL_previewGlobalProfile.asset index f8816c5..b4b9187 100644 --- a/Scenes/PreviewScene/RL_previewGlobalProfile.asset +++ b/HDRP/Preview Scene/RL_previewGlobalProfile.asset @@ -160,7 +160,7 @@ MonoBehaviour: max: 1 m_RayMaxIterations: m_OverrideState: 0 - m_Value: 32 + m_Value: 24 m_RayLength: m_OverrideState: 0 m_Value: 50 @@ -268,7 +268,7 @@ MonoBehaviour: max: 1 m_SampleCount: m_OverrideState: 1 - m_Value: 10 + m_Value: 8 min: 4 max: 64 --- !u!114 &-1355376055549233226 @@ -331,15 +331,15 @@ MonoBehaviour: m_Bits: 4294967295 m_StepCount: m_OverrideState: 1 - m_Value: 16 + m_Value: 6 min: 2 max: 32 m_FullResolution: m_OverrideState: 1 - m_Value: 1 + m_Value: 0 m_MaximumRadiusInPixels: m_OverrideState: 1 - m_Value: 80 + m_Value: 40 min: 16 max: 256 m_BilateralUpsample: @@ -347,7 +347,7 @@ MonoBehaviour: m_Value: 1 m_DirectionCount: m_OverrideState: 1 - m_Value: 4 + m_Value: 2 min: 1 max: 6 m_RayLength: diff --git a/Scenes/PreviewScene/RL_previewGlobalProfile.asset.meta b/HDRP/Preview Scene/RL_previewGlobalProfile.asset.meta similarity index 100% rename from Scenes/PreviewScene/RL_previewGlobalProfile.asset.meta rename to HDRP/Preview Scene/RL_previewGlobalProfile.asset.meta diff --git a/Scenes/PreviewScene/RL_previewGlobalProfile_DXR.asset b/HDRP/Preview Scene/RL_previewGlobalProfile_DXR.asset similarity index 100% rename from Scenes/PreviewScene/RL_previewGlobalProfile_DXR.asset rename to HDRP/Preview Scene/RL_previewGlobalProfile_DXR.asset diff --git a/Scenes/PreviewScene/RL_previewGlobalProfile_DXR.asset.meta b/HDRP/Preview Scene/RL_previewGlobalProfile_DXR.asset.meta similarity index 100% rename from Scenes/PreviewScene/RL_previewGlobalProfile_DXR.asset.meta rename to HDRP/Preview Scene/RL_previewGlobalProfile_DXR.asset.meta diff --git a/Scenes/PreviewScene/RL_previewSkyAndFogProfile_1.asset b/HDRP/Preview Scene/RL_previewSkyAndFogProfile_1.asset similarity index 100% rename from Scenes/PreviewScene/RL_previewSkyAndFogProfile_1.asset rename to HDRP/Preview Scene/RL_previewSkyAndFogProfile_1.asset diff --git a/Scenes/PreviewScene/RL_previewSkyAndFogProfile_1.asset.meta b/HDRP/Preview Scene/RL_previewSkyAndFogProfile_1.asset.meta similarity index 100% rename from Scenes/PreviewScene/RL_previewSkyAndFogProfile_1.asset.meta rename to HDRP/Preview Scene/RL_previewSkyAndFogProfile_1.asset.meta diff --git a/Scenes/PreviewScene/RL_previewSkyAndFogProfile_2.asset b/HDRP/Preview Scene/RL_previewSkyAndFogProfile_2.asset similarity index 100% rename from Scenes/PreviewScene/RL_previewSkyAndFogProfile_2.asset rename to HDRP/Preview Scene/RL_previewSkyAndFogProfile_2.asset diff --git a/Scenes/PreviewScene/RL_previewSkyAndFogProfile_2.asset.meta b/HDRP/Preview Scene/RL_previewSkyAndFogProfile_2.asset.meta similarity index 100% rename from Scenes/PreviewScene/RL_previewSkyAndFogProfile_2.asset.meta rename to HDRP/Preview Scene/RL_previewSkyAndFogProfile_2.asset.meta diff --git a/Scenes/PreviewScene/RL_previewSkyAndFogProfile_3.asset b/HDRP/Preview Scene/RL_previewSkyAndFogProfile_3.asset similarity index 100% rename from Scenes/PreviewScene/RL_previewSkyAndFogProfile_3.asset rename to HDRP/Preview Scene/RL_previewSkyAndFogProfile_3.asset diff --git a/Scenes/PreviewScene/RL_previewSkyAndFogProfile_3.asset.meta b/HDRP/Preview Scene/RL_previewSkyAndFogProfile_3.asset.meta similarity index 100% rename from Scenes/PreviewScene/RL_previewSkyAndFogProfile_3.asset.meta rename to HDRP/Preview Scene/RL_previewSkyAndFogProfile_3.asset.meta diff --git a/Scenes/PreviewScene.meta b/Packages.meta similarity index 77% rename from Scenes/PreviewScene.meta rename to Packages.meta index 64f48fd..605cc47 100644 --- a/Scenes/PreviewScene.meta +++ b/Packages.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d53465a993fbb9e42a3a5a9ed32e54c3 +guid: be4c1bd1e2556e54cb19644b7a3eccac folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Packages/RL_ShaderPackage_3D.unitypackage b/Packages/RL_ShaderPackage_3D.unitypackage new file mode 100644 index 0000000..5139f87 Binary files /dev/null and b/Packages/RL_ShaderPackage_3D.unitypackage differ diff --git a/Scenes/PreviewScene/Materials.meta b/Packages/RL_ShaderPackage_3D.unitypackage.meta similarity index 67% rename from Scenes/PreviewScene/Materials.meta rename to Packages/RL_ShaderPackage_3D.unitypackage.meta index 92e709c..9c03215 100644 --- a/Scenes/PreviewScene/Materials.meta +++ b/Packages/RL_ShaderPackage_3D.unitypackage.meta @@ -1,6 +1,5 @@ fileFormatVersion: 2 -guid: e40e0a020dea9934f8fd3f3f29533fc5 -folderAsset: yes +guid: bb0033482f21aca428935ae427801441 DefaultImporter: externalObjects: {} userData: diff --git a/Packages/RL_ShaderPackage_HDRP10.unitypackage b/Packages/RL_ShaderPackage_HDRP10.unitypackage new file mode 100644 index 0000000..96315bc Binary files /dev/null and b/Packages/RL_ShaderPackage_HDRP10.unitypackage differ diff --git a/Packages/RL_ShaderPackage_HDRP10.unitypackage.meta b/Packages/RL_ShaderPackage_HDRP10.unitypackage.meta new file mode 100644 index 0000000..c81c512 --- /dev/null +++ b/Packages/RL_ShaderPackage_HDRP10.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ac3c47e6d2a7bc840be841aa1783fad9 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/RL_ShaderPackage_HDRP12.unitypackage b/Packages/RL_ShaderPackage_HDRP12.unitypackage new file mode 100644 index 0000000..62a7544 Binary files /dev/null and b/Packages/RL_ShaderPackage_HDRP12.unitypackage differ diff --git a/Packages/RL_ShaderPackage_HDRP12.unitypackage.meta b/Packages/RL_ShaderPackage_HDRP12.unitypackage.meta new file mode 100644 index 0000000..7d8a806 --- /dev/null +++ b/Packages/RL_ShaderPackage_HDRP12.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7752b315a58f7ef4489dd777221f3432 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/RL_ShaderPackage_URP10.unitypackage b/Packages/RL_ShaderPackage_URP10.unitypackage new file mode 100644 index 0000000..729fa3a Binary files /dev/null and b/Packages/RL_ShaderPackage_URP10.unitypackage differ diff --git a/Packages/RL_ShaderPackage_URP10.unitypackage.meta b/Packages/RL_ShaderPackage_URP10.unitypackage.meta new file mode 100644 index 0000000..ecb7fcc --- /dev/null +++ b/Packages/RL_ShaderPackage_URP10.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 262039ac86a922246b86ddb4223895f0 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/RL_ShaderPackage_URP12.unitypackage b/Packages/RL_ShaderPackage_URP12.unitypackage new file mode 100644 index 0000000..41eb80a Binary files /dev/null and b/Packages/RL_ShaderPackage_URP12.unitypackage differ diff --git a/Packages/RL_ShaderPackage_URP12.unitypackage.meta b/Packages/RL_ShaderPackage_URP12.unitypackage.meta new file mode 100644 index 0000000..33693d9 --- /dev/null +++ b/Packages/RL_ShaderPackage_URP12.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c071ccb632d0d9e42a46d20aa5f82ebd +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/com.soupday.cc3_unity_tools.runtime.asmdef b/Runtime/com.soupday.cc3_unity_tools.runtime.asmdef index 703f9a3..28084ca 100644 --- a/Runtime/com.soupday.cc3_unity_tools.runtime.asmdef +++ b/Runtime/com.soupday.cc3_unity_tools.runtime.asmdef @@ -1,12 +1,7 @@ { "name": "soupday.cc3_unity_tools.runtime", "rootNamespace": "Reallusion.Import", - "references": [ - "GUID:3eae0364be2026648bf74846acb8a731", - "GUID:df380645f10b7bc4b97d4f5eb6303d95", - "GUID:78bd2ddd6e276394a9615c203e574844", - "GUID:457756d89b35d2941b3e7b37b4ece6f1" - ], + "references": [], "includePlatforms": [], "excludePlatforms": [], "allowUnsafeCode": false, @@ -16,37 +11,6 @@ ], "autoReferenced": true, "defineConstraints": [], - "versionDefines": [ - { - "name": "com.unity.render-pipelines.high-definition", - "expression": "12.0.0", - "define": "HDRP_12_0_0_OR_NEWER" - }, - { - "name": "Unity", - "expression": "2021.2.0a17", - "define": "SCENEVIEW_OVERLAY_COMPATIBLE" - }, - { - "name": "com.unity.formats.alembic", - "expression": "1.0.7", - "define": "UNITY_ALEMBIC_1_0_7" - }, - { - "name": "com.unity.render-pipelines.high-definition", - "expression": "10.5.0", - "define": "HDRP_10_5_0_OR_NEWER" - }, - { - "name": "com.unity.render-pipelines.high-definition", - "expression": "11.0.0", - "define": "HDRP_11_0_0_OR_NEWER" - }, - { - "name": "com.unity.render-pipelines.high-definition", - "expression": "12.0.0", - "define": "HDRP_12_0_0_OR_NEWER" - } - ], + "versionDefines": [], "noEngineReferences": false } \ No newline at end of file diff --git a/package.json b/package.json index 0198f38..189f9f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.soupday.cc3_unity_tools", - "version": "1.4.2", + "version": "1.4.3", "displayName": "CC/iC Unity Tools HDRP", "description": "Unity importer for Character Creator 3 & 4 and iClone 7 and 8.", "unity": "2020.3",