Skip to content

Commit

Permalink
Custom material settings supported
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiinaManatsu committed Jun 18, 2019
1 parent 4983a7a commit 1915215
Show file tree
Hide file tree
Showing 19 changed files with 702 additions and 127 deletions.
33 changes: 33 additions & 0 deletions .collabignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# ===========================
# Default Collab Ignore Rules
# ===========================

# OS Generated
# ============
.DS_Store
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
[Tt]humbs.db
[Dd]esktop.ini

# Visual Studio / MonoDevelop generated
# =====================================
[Ee]xported[Oo]bj/
*.userprefs
*.csproj
*.pidb
*.suo
*.sln
*.user
*.unityproj
*.booproj

# Unity generated
# ===============
[Oo]bj/
[Bb]uild
sysinfo.txt
*.stackdump
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
# Custom folder
Recordings/
Backup/
Build/

# Gradle cache directory
.gradle/
Expand Down
12 changes: 10 additions & 2 deletions Assets/PreviewBuilder/Editor/Test.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using MMD;
using MaterialExceptionXML;
using MMD;
using PreviewBuilder.Xmls;
using System;
using System.IO;
Expand Down Expand Up @@ -92,7 +93,8 @@ public static void Load()
[ExecuteInEditMode]
public static void LoadT()
{
var model_agent = new ModelAgent(@"D:\Backup_OneDrive_Swifties\MMD\++++++++Model+++++++++\2019 04\TDA 洛天依 汉煌矜女 Ver 1.00\TDA 洛天依 汉煌矜女 Ver 1.00.pmx");
CleanAssetDatabase();
var model_agent = new ModelAgent(@"D:\Backup_OneDrive_Swifties\MMD\++++++++Model+++++++++\2019 06\YYB式 花精灵miku\yyb式 花精灵miku by小雪球.pmx");

MMD.PMX.PMXFormat pmx_format;
try
Expand All @@ -115,6 +117,12 @@ public static void LoadT()

}

[MenuItem("MMM/XmlTest")]
public static void XmlTest()
{
Debug.Log(Application.dataPath);
}

[MenuItem("MMM/CleanAssetDatabase")]
public static void CleanAssetDatabase()
{
Expand Down
7 changes: 6 additions & 1 deletion Assets/PreviewBuilder/Scripts/PreviewBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using MaterialUI;
using MaterialExceptionXML;
using MaterialUI;
using System;
using System.Collections;
using System.Collections.Generic;
Expand Down Expand Up @@ -59,6 +60,8 @@ private void Start()

StartCoroutine(ShowTip(UIManager.TipText, 1));
StartCoroutine(ShowTip($"Max size of texture: {SystemInfo.maxTextureSize.ToString()} * {SystemInfo.maxTextureSize.ToString()}", 2));

MaterialExtraConfigurationList = MaterialException.CreateMaterialConfiguration(Path.Combine(Directory.GetCurrentDirectory(), "MaterialConfiguration.xml"));
}
#endregion

Expand All @@ -76,6 +79,8 @@ private void Start()
public Camera rtCamera;
public GameObject canvas;

public MaterialExtraConfigurationList MaterialExtraConfigurationList { get; set; }

public bool IsFolderCorrect
{
set
Expand Down
18 changes: 10 additions & 8 deletions Assets/Resources/Transparent.mat
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Material:
m_Name: Transparent
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
m_ShaderKeywords: _ALPHATEST_ON _BLENDMODE_ALPHA _BLENDMODE_PRESERVE_SPECULAR_LIGHTING
_DOUBLESIDED_ON _ENABLE_FOG_ON_TRANSPARENT _ENABLE_GEOMETRIC_SPECULAR_AA _NORMALMAP_TANGENT_SPACE
_SURFACE_TYPE_TRANSPARENT
_DISABLE_DECALS _DOUBLESIDED_ON _ENABLE_FOG_ON_TRANSPARENT _ENABLE_GEOMETRIC_SPECULAR_AA
_NORMALMAP_TANGENT_SPACE _SURFACE_TYPE_TRANSPARENT
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 1
Expand All @@ -21,6 +21,7 @@ Material:
RenderType: Transparent
disabledShaderPasses:
- DistortionVectors
- TransparentDepthPostpass
- MOTIONVECTORS
m_SavedProperties:
serializedVersion: 3
Expand Down Expand Up @@ -114,15 +115,16 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- Vector1_1D23822D: 0.5
- _AORemapMax: 1
- _AORemapMin: 0
- _ATDistance: 1
- _AlbedoAffectEmissive: 0
- _Alpha: 1
- _AlphaCutoff: 0.01
- _AlphaCutoffEnable: 1
- _AlphaCutoffPostpass: 0.99
- _AlphaCutoffPrepass: 0.99
- _AlphaCutoffPostpass: 0
- _AlphaCutoffPrepass: 0.7
- _Anisotropy: 0
- _BlendMode: 0
- _CoatMask: 0
Expand Down Expand Up @@ -207,15 +209,15 @@ Material:
- _StencilWriteMaskMV: 128
- _Stiffness: 1
- _SubsurfaceMask: 1
- _SupportDecals: 1
- _SupportDecals: 0
- _SurfaceType: 1
- _TexWorldScale: 1
- _TexWorldScaleEmissive: 1
- _Thickness: 1
- _ThicknessMultiplier: 1
- _TransmissionEnable: 1
- _TransparentBackfaceEnable: 1
- _TransparentDepthPostpassEnable: 1
- _TransparentDepthPostpassEnable: 0
- _TransparentDepthPrepassEnable: 1
- _TransparentSortPriority: 0
- _UVBase: 0
Expand All @@ -227,8 +229,8 @@ Material:
- _ZWrite: 0
m_Colors:
- Vector2_92636EDA: {r: 1, g: -1, b: 0, a: 0}
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 1, g: 1, b: 1, a: 0.9882353}
- _Color: {r: 1, g: 1, b: 1, a: 0.9882353}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
Expand Down
32 changes: 31 additions & 1 deletion Assets/Resources/Transparent.shadergraph

Large diffs are not rendered by default.

Loading

0 comments on commit 1915215

Please sign in to comment.