diff --git a/Assets/AnimatedQuickhull/AnimatedQuickhull2D.cs b/Assets/AnimatedQuickhull/AnimatedQuickhull2D.cs index e69925a..77ab238 100644 --- a/Assets/AnimatedQuickhull/AnimatedQuickhull2D.cs +++ b/Assets/AnimatedQuickhull/AnimatedQuickhull2D.cs @@ -1,6 +1,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using System.Linq; using Unity.Mathematics; using static Unity.Mathematics.math; @@ -9,14 +10,52 @@ namespace kmty.geom.d2.animatedquickhull { using V2 = Vector2; using V3 = Vector3; - public class AnimatedQuickhull2D { + public abstract class AnimatedQuickhull2D { public Transform[] bones { get; protected set; } public Convex convex { get; protected set; } - public float[] distPerBone { get; } + public abstract void Execute(); + } + + public class AnimatedQuickhull2DIndex: AnimatedQuickhull2D { + protected IEnumerable vids; + protected Mesh mesh; + protected V3[] vrts; + protected int[] tris; + + public AnimatedQuickhull2DIndex(SkinnedMeshRenderer skin, IEnumerable tids) { + this.bones = skin.bones; + this.mesh = skin.sharedMesh; + this.vrts = mesh.vertices; + this.tris = mesh.triangles; + vids = tids.Select(tid => tris[tid * 3]); + } + + public override void Execute() { + var tgts = new List(); + var mtxs = new float4x4[bones.Length]; + for (var i = 0; i < bones.Length; i++) tgts.Add((V2)bones[i].position); + for (int i = 0; i < mtxs.Length; i++) mtxs[i] = bones[i].localToWorldMatrix * mesh.bindposes[i]; + foreach (var i in vids) { + var w = mesh.boneWeights[i]; + var m = mtxs[w.boneIndex0] * w.weight0 + + mtxs[w.boneIndex1] * w.weight1 + + mtxs[w.boneIndex2] * w.weight2 + + mtxs[w.boneIndex3] * w.weight3; + tgts.Add((V2)((Matrix4x4)m).MultiplyPoint3x4(vrts[i])); + } + convex = new Convex(tgts); + convex.ExpandLoop(); + } + } + + public class AnimatedQuickhull2DAprox: AnimatedQuickhull2D { + protected float[] distPerBone; + protected float distanceThold; - public AnimatedQuickhull2D(SkinnedMeshRenderer skin, float weightThreshold = 0.5f) { + public AnimatedQuickhull2DAprox(SkinnedMeshRenderer skin, float weightThold = 0.3f, float distanceThold = 0.3f) { this.bones = skin.bones; this.distPerBone = new float[bones.Length]; + this.distanceThold = distanceThold; var mesh = skin.sharedMesh; var vtcs = mesh.vertices; var bspv = mesh.GetBonesPerVertex(); @@ -26,7 +65,7 @@ public AnimatedQuickhull2D(SkinnedMeshRenderer skin, float weightThreshold = 0.5 for (var vi = 0; vi < vtcs.Length; vi++) { var bw = wgts[bwid]; - if (bw.weight > weightThreshold) { + if (bw.weight > weightThold) { var i = bw.boneIndex; var d1 = distPerBone[i]; var d2 = length(vtcs[vi] - (V3)(bindposes[i].inverse * new Vector4(0, 0, 0, 1))); @@ -36,12 +75,12 @@ public AnimatedQuickhull2D(SkinnedMeshRenderer skin, float weightThreshold = 0.5 } } - public void Execute(float distanceTheshold) { + public override void Execute() { var bps = new List(); for (var i = 0; i < bones.Length; i++) { var b = bones[i]; var d = distPerBone[i]; - if (d > distanceTheshold) { + if (d > distanceThold) { bps.Add((V2)b.position + new V2(-d, -d)); bps.Add((V2)b.position + new V2(+d, -d)); bps.Add((V2)b.position + new V2(-d, +d)); diff --git a/Assets/AnimatedQuickhull/AnimatedQuickhull3D.cs b/Assets/AnimatedQuickhull/AnimatedQuickhull3D.cs index 48b121d..c8aabea 100644 --- a/Assets/AnimatedQuickhull/AnimatedQuickhull3D.cs +++ b/Assets/AnimatedQuickhull/AnimatedQuickhull3D.cs @@ -9,24 +9,84 @@ namespace kmty.geom.d3.animatedquickhull { using f3 = float3; using V3 = Vector3; - public class AnimatedQuickhull3D { + public abstract class AnimatedQuickhull3D { public Transform[] bones { get; protected set; } public Convex convex { get; protected set; } + public abstract void Execute(int itr); + + public Mesh CreateMesh() { + var mesh = new Mesh(); + var nodes = convex.nodes; + var vs = new V3[nodes.Count * 3]; + var ts = new int[nodes.Count * 3]; + for(var i =0; i < nodes.Count; i++) { + var j = i * 3; + var n = nodes[i]; + var v = cross(n.t.b - n.t.a, n.t.c - n.t.a); + var f = dot(v, n.normal) < 0; + vs[j + 0] = (f3)n.t.a; + vs[j + 1] = f ? (f3)n.t.c : (f3)n.t.b; + vs[j + 2] = f ? (f3)n.t.b : (f3)n.t.c; + ts[j + 0] = j; + ts[j + 1] = j + 1; + ts[j + 2] = j + 2; + } + mesh.SetVertices(vs); + mesh.SetTriangles(ts, 0); + mesh.RecalculateNormals(); + return mesh; + } + } + + public class AnimatedQuickhull3DIndex: AnimatedQuickhull3D { + protected IEnumerable vids; + protected Mesh mesh; + protected V3[] vrts; + protected int[] tris; + + public AnimatedQuickhull3DIndex(SkinnedMeshRenderer skin, IEnumerable tids) { + this.bones = skin.bones; + this.mesh = skin.sharedMesh; + this.vrts = mesh.vertices; + this.tris = mesh.triangles; + vids = tids.Select(tid => tris[tid * 3]); + } + + public override void Execute(int itr) { + var tgts = new List(); + var mtxs = new float4x4[bones.Length]; + for (var i = 0; i < bones.Length; i++) tgts.Add(bones[i].position); + for (int i = 0; i < mtxs.Length; i++) mtxs[i] = bones[i].localToWorldMatrix * mesh.bindposes[i]; + foreach (var i in vids) { + var w = mesh.boneWeights[i]; + var m = mtxs[w.boneIndex0] * w.weight0 + + mtxs[w.boneIndex1] * w.weight1 + + mtxs[w.boneIndex2] * w.weight2 + + mtxs[w.boneIndex3] * w.weight3; + tgts.Add(((Matrix4x4)m).MultiplyPoint3x4(vrts[i])); + } + convex = new Convex(tgts); + convex.ExpandLoop(itr); + } + } + + public class AnimatedQuickhull3DAprox: AnimatedQuickhull3D { public float[] distPerBone { get; } + public float distanceThold; - public AnimatedQuickhull3D(SkinnedMeshRenderer skin, float weightThreshold) { + public AnimatedQuickhull3DAprox(SkinnedMeshRenderer skin, float weightThold, float distanceThold) { this.bones = skin.bones; this.distPerBone = new float[bones.Length]; + this.distanceThold = distanceThold; var mesh = skin.sharedMesh; var vtcs = mesh.vertices; var bspv = mesh.GetBonesPerVertex(); var wgts = mesh.GetAllBoneWeights(); var bwid = 0; var bindposes = mesh.bindposes; - for (var vi = 0; vi < vtcs.Length; vi++) { var bw = wgts[bwid]; - if (bw.weight > weightThreshold) { + if (bw.weight > weightThold) { var i = bw.boneIndex; var d1 = distPerBone[i]; var d2 = length(vtcs[vi] - (V3)(bindposes[i].inverse * new Vector4(0, 0, 0, 1))); @@ -36,12 +96,12 @@ public AnimatedQuickhull3D(SkinnedMeshRenderer skin, float weightThreshold) { } } - public void Execute(float distanceThreshold, int itr) { + public override void Execute(int itr) { var bps = new List(); for (var i = 0; i < bones.Length; i++) { var b = bones[i]; var d = distPerBone[i]; - if (d > distanceThreshold) { + if (d > distanceThold) { bps.Add(b.position + new V3(-d, -d, -d)); bps.Add(b.position + new V3(+d, +d, +d)); bps.Add(b.position + new V3(+d, -d, -d)); @@ -57,28 +117,5 @@ public void Execute(float distanceThreshold, int itr) { convex = new Convex(bps); convex.ExpandLoop(itr); } - - public Mesh CreateMesh() { - var mesh = new Mesh(); - var nodes = convex.nodes; - var vs = new V3[nodes.Count * 3]; - var ts = new int[nodes.Count * 3]; - for(var i =0; i < nodes.Count; i++) { - var j = i * 3; - var n = nodes[i]; - var v = cross(n.t.b - n.t.a, n.t.c - n.t.a); - var f = dot(v, n.normal) < 0; - vs[j + 0] = (f3)n.t.a; - vs[j + 1] = f ? (f3)n.t.c : (f3)n.t.b; - vs[j + 2] = f ? (f3)n.t.b : (f3)n.t.c; - ts[j + 0] = j; - ts[j + 1] = j + 1; - ts[j + 2] = j + 2; - } - mesh.SetVertices(vs); - mesh.SetTriangles(ts, 0); - mesh.RecalculateNormals(); - return mesh; - } } } diff --git a/Assets/Demo/Demo3D.mat b/Assets/Demo/Debug.mat similarity index 95% rename from Assets/Demo/Demo3D.mat rename to Assets/Demo/Debug.mat index fa97381..3c39c55 100644 --- a/Assets/Demo/Demo3D.mat +++ b/Assets/Demo/Debug.mat @@ -7,8 +7,8 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: Demo3D - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Name: Debug + m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0} m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 diff --git a/Assets/Demo/Demo3D.mat.meta b/Assets/Demo/Debug.mat.meta similarity index 79% rename from Assets/Demo/Demo3D.mat.meta rename to Assets/Demo/Debug.mat.meta index 8080b86..720dce0 100644 --- a/Assets/Demo/Demo3D.mat.meta +++ b/Assets/Demo/Debug.mat.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d378d88a89934a64db430fa36f396b77 +guid: 2f5480c7c60798d4794a8f41023d0e70 NativeFormatImporter: externalObjects: {} mainObjectFileID: 2100000 diff --git a/Assets/Demo/Demo.mat b/Assets/Demo/Demo.mat new file mode 100644 index 0000000..19ae580 --- /dev/null +++ b/Assets/Demo/Demo.mat @@ -0,0 +1,80 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Demo + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _ALPHAPREMULTIPLY_ON + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 3000 + stringTagMap: + RenderType: Transparent + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 10 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 3 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 0 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 0.39607844} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Demo/Demo.mat.meta b/Assets/Demo/Demo.mat.meta new file mode 100644 index 0000000..ab2c17f --- /dev/null +++ b/Assets/Demo/Demo.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bff5078e1173dd441bf9e52aefaad676 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Demo/Demo.unity b/Assets/Demo/Demo.unity index 6fb130e..c9f9e4b 100644 --- a/Assets/Demo/Demo.unity +++ b/Assets/Demo/Demo.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 705507994} - m_IndirectSpecularColor: {r: 0.44657856, g: 0.49641567, b: 0.57481915, a: 1} + m_IndirectSpecularColor: {r: 0.44657767, g: 0.4964127, b: 0.57481843, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -123,390 +123,41 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1 &183525662 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 183525663} - - component: {fileID: 183525666} - - component: {fileID: 183525665} - - component: {fileID: 183525664} - m_Layer: 0 - m_Name: Sphere (0) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &183525663 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 183525662} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} - m_Children: [] - m_Father: {fileID: 1144961574} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!135 &183525664 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 183525662} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &183525665 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 183525662} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &183525666 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 183525662} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &187413799 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 187413800} - - component: {fileID: 187413803} - - component: {fileID: 187413802} - - component: {fileID: 187413801} - m_Layer: 0 - m_Name: Sphere (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &187413800 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 187413799} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 1, y: 0, z: 0} - m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} - m_Children: [] - m_Father: {fileID: 1144961574} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!135 &187413801 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 187413799} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &187413802 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 187413799} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &187413803 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 187413799} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &272300239 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 272300240} - - component: {fileID: 272300243} - - component: {fileID: 272300242} - - component: {fileID: 272300241} - m_Layer: 0 - m_Name: Sphere (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &272300240 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 272300239} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: 0} - m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} - m_Children: [] - m_Father: {fileID: 1144961574} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!135 &272300241 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 272300239} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &272300242 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 272300239} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &272300243 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 272300239} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &572882425 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 572882426} - - component: {fileID: 572882429} - - component: {fileID: 572882428} - - component: {fileID: 572882427} - m_Layer: 0 - m_Name: Sphere (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &572882426 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 572882425} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 1} - m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} - m_Children: [] - m_Father: {fileID: 1144961574} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!135 &572882427 -SphereCollider: +--- !u!114 &315556830 +MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 572882425} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &572882428 -MeshRenderer: + m_GameObject: {fileID: 919132147587990586} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ba70d3844d1c8ab48882148be6c115ce, type: 3} + m_Name: + m_EditorClassIdentifier: + mat: {fileID: 2100000, guid: bff5078e1173dd441bf9e52aefaad676, type: 2} + dbg: {fileID: 2100000, guid: 2f5480c7c60798d4794a8f41023d0e70, type: 2} + itr: 15 + dstThreshold: 0.28 + wgtThreshold: 0.3 + speed: 0.8 +--- !u!114 &315556832 +MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 572882425} + m_GameObject: {fileID: 919132147587990586} m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &572882429 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 572882425} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3e329010bf2ddae41afed4185b24bf6d, type: 3} + m_Name: + m_EditorClassIdentifier: + mat: {fileID: 2100000, guid: bff5078e1173dd441bf9e52aefaad676, type: 2} + dbg: {fileID: 2100000, guid: 2f5480c7c60798d4794a8f41023d0e70, type: 2} + itr: 15 + speed: 0.7 + triangleIndices: e438000064380000763900006b3b000096200000aa1f00006c210000f52200007d21000013230000ee39000075360000553700005f3a0000f4610000d4620000 --- !u!1 &705507993 GameObject: m_ObjectHideFlags: 0 @@ -593,109 +244,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 705507993} - m_LocalRotation: {x: 0.1315429, y: 0.86128765, z: -0.401625, w: 0.2820947} + m_LocalRotation: {x: 0, y: 0.9063079, z: -0.42261827, w: 0} m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 50, y: 143.73, z: 0} ---- !u!1 &752735479 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 752735480} - - component: {fileID: 752735483} - - component: {fileID: 752735482} - - component: {fileID: 752735481} - m_Layer: 0 - m_Name: Sphere (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &752735480 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 752735479} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 1, y: 1, z: 0.717} - m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} - m_Children: [] - m_Father: {fileID: 1144961574} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!135 &752735481 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 752735479} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &752735482 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 752735479} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &752735483 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 752735479} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} + m_LocalEulerAnglesHint: {x: 50, y: 180, z: 0} --- !u!1 &963194225 GameObject: m_ObjectHideFlags: 0 @@ -707,6 +262,7 @@ GameObject: - component: {fileID: 963194228} - component: {fileID: 963194227} - component: {fileID: 963194226} + - component: {fileID: 963194229} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -732,7 +288,7 @@ Camera: m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 2 - m_BackGroundColor: {r: 0.4245283, g: 0.4245283, b: 0.4245283, a: 1} + m_BackGroundColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_projectionMatrixMode: 1 m_GateFitMode: 2 m_FOVAxisMode: 0 @@ -773,435 +329,136 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 963194225} m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} - m_LocalPosition: {x: 0, y: 0.6, z: 2} + m_LocalPosition: {x: 0, y: 0.75, z: 2} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} ---- !u!1001 &996615630 +--- !u!114 &963194229 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963194225} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c49b4cc203aa6414fae5c798d1d0e7d6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EventMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_MaxRayIntersections: 0 +--- !u!1001 &1653799275 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: m_TransformParent: {fileID: 0} m_Modifications: - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} propertyPath: m_RootOrder - value: 3 + value: 2 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} propertyPath: m_LocalPosition.x value: 0.75 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} propertyPath: m_LocalRotation.x value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} propertyPath: m_LocalRotation.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} propertyPath: m_LocalRotation.z value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 919132149155446097, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} + - target: {fileID: 464141968781854204, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: e7c3ac673e27f2d4f9d7ceff8921777d, type: 2} + - target: {fileID: 919132149155446097, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} propertyPath: m_Name - value: Capoeira_qh3d + value: Brooklyn Uprock objectReference: {fileID: 0} - - target: {fileID: 919132149155446097, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} + - target: {fileID: 919132149155446097, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} propertyPath: m_IsActive - value: 0 + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5866666021909216657, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + propertyPath: m_Enabled + value: 1 objectReference: {fileID: 0} - - target: {fileID: 5866666021909216657, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} + - target: {fileID: 5866666021909216657, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} propertyPath: m_Controller value: - objectReference: {fileID: 9100000, guid: 885586b879400d94685b08a296ad507d, type: 2} - - target: {fileID: 5866666021909216657, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} + objectReference: {fileID: 9100000, guid: 73bb74b32a75a774a8012289a8815c67, type: 2} + - target: {fileID: 5866666021909216657, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} propertyPath: m_ApplyRootMotion value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} ---- !u!1 &996615631 stripped + m_SourcePrefab: {fileID: 100100000, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} +--- !u!1 &919132147587990586 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} - m_PrefabInstance: {fileID: 996615630} + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + m_PrefabInstance: {fileID: 1653799275} m_PrefabAsset: {fileID: 0} ---- !u!114 &996615632 +--- !u!114 &919132147587990587 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 996615631} - m_Enabled: 1 + m_GameObject: {fileID: 919132147587990586} + m_Enabled: 0 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ba70d3844d1c8ab48882148be6c115ce, type: 3} + m_Script: {fileID: 11500000, guid: 2049050be3c58674f8c87bcad6d1f5e4, type: 3} m_Name: m_EditorClassIdentifier: - mat: {fileID: 2100000, guid: d378d88a89934a64db430fa36f396b77, type: 2} - itr: 20 - dstThreshold: 1 - wgtThreshold: 0.3 - speed: 1 ---- !u!1 &1008665276 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} - m_PrefabInstance: {fileID: 1816980160} - m_PrefabAsset: {fileID: 0} ---- !u!114 &1008665277 + dbg: {fileID: 2100000, guid: 2f5480c7c60798d4794a8f41023d0e70, type: 2} + speed: 0.7 + triangleIndices: e438000064380000763900006b3b000096200000aa1f00006c210000f52200007d21000013230000ee39000075360000553700005f3a0000f4610000d4620000 +--- !u!114 &919132147587990588 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1008665276} - m_Enabled: 1 + m_GameObject: {fileID: 919132147587990586} + m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 7f7aad26dbbea7240b2648245140934e, type: 3} m_Name: m_EditorClassIdentifier: wgtThreshold: 0.3 dstThreshold: 0.3 ---- !u!1 &1144961573 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1144961574} - - component: {fileID: 1144961575} - m_Layer: 0 - m_Name: Tester - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1144961574 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1144961573} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 183525663} - - {fileID: 187413800} - - {fileID: 272300240} - - {fileID: 572882426} - - {fileID: 752735480} - - {fileID: 1947185764} - - {fileID: 1394809897} - m_Father: {fileID: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1144961575 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1144961573} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a5d7705b2c8d1af42852baf8c17c9c74, type: 3} - m_Name: - m_EditorClassIdentifier: - num: 50 - dst: 2 - showNormal: 0 - showOthers: 0 - currId: 0 ---- !u!1 &1394809893 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1394809897} - - component: {fileID: 1394809896} - - component: {fileID: 1394809895} - - component: {fileID: 1394809894} - m_Layer: 0 - m_Name: Sphere (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!135 &1394809894 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1394809893} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1394809895 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1394809893} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1394809896 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1394809893} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1394809897 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1394809893} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 1, y: 0, z: 1} - m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} - m_Children: [] - m_Father: {fileID: 1144961574} - m_RootOrder: 6 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &1816980160 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} - propertyPath: m_RootOrder - value: 2 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 919132149155446097, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} - propertyPath: m_Name - value: Capoeira_qh2d - objectReference: {fileID: 0} - - target: {fileID: 919132149155446097, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5866666021909216657, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} - propertyPath: m_Controller - value: - objectReference: {fileID: 9100000, guid: 885586b879400d94685b08a296ad507d, type: 2} - - target: {fileID: 5866666021909216657, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} - propertyPath: m_ApplyRootMotion - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: f6879293c3354534aaaf9aad34f5cfe2, type: 3} ---- !u!1 &1947185763 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1947185764} - - component: {fileID: 1947185767} - - component: {fileID: 1947185766} - - component: {fileID: 1947185765} - m_Layer: 0 - m_Name: Sphere (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1947185764 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1947185763} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.1, y: 0.1, z: 0.1} - m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} - m_Children: [] - m_Father: {fileID: 1144961574} - m_RootOrder: 5 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!135 &1947185765 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1947185763} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1947185766 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1947185763} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1947185767 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1947185763} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/Demo/Demo2D.cs b/Assets/Demo/Demo2D_Aprox.cs similarity index 89% rename from Assets/Demo/Demo2D.cs rename to Assets/Demo/Demo2D_Aprox.cs index 7ff8f8a..f36247f 100644 --- a/Assets/Demo/Demo2D.cs +++ b/Assets/Demo/Demo2D_Aprox.cs @@ -6,7 +6,7 @@ namespace kmty.geom.d2.animatedquickhull { using f2 = float2; - public class Demo2D : MonoBehaviour { + public class Demo2D_Aprox : MonoBehaviour { [SerializeField, Range(0, 1)] protected float wgtThreshold = 0.3f; [SerializeField, Range(0, 1)] protected float dstThreshold = 0.3f; protected AnimatedQuickhull2D aqh; @@ -17,13 +17,13 @@ public class Demo2D : MonoBehaviour { void Start() { skin = GetComponentInChildren(); - aqh = new AnimatedQuickhull2D(skin, wgtThreshold); + aqh = new AnimatedQuickhull2DAprox(skin, wgtThreshold, dstThreshold); style = new GUIStyle(); style.fontSize = 20; } void Update() { - aqh.Execute(dstThreshold); + aqh.Execute(); transform.rotation = Quaternion.AngleAxis(0.3f, Vector3.up) * transform.rotation; } diff --git a/Assets/Demo/Demo2D.cs.meta b/Assets/Demo/Demo2D_Aprox.cs.meta similarity index 100% rename from Assets/Demo/Demo2D.cs.meta rename to Assets/Demo/Demo2D_Aprox.cs.meta diff --git a/Assets/Demo/Demo2D_Index.cs b/Assets/Demo/Demo2D_Index.cs new file mode 100644 index 0000000..59a638e --- /dev/null +++ b/Assets/Demo/Demo2D_Index.cs @@ -0,0 +1,48 @@ +using System.Collections; +using System.Collections.Generic; +using Unity.Mathematics; +using UnityEngine; + +namespace kmty.geom.d2.animatedquickhull { + using f2 = float2; + + public class Demo2D_Index : MonoBehaviour { + [SerializeField] protected Material dbg; + [SerializeField, Range(0, 1)] protected float speed = 1; + [SerializeField] int[] triangleIndices; + protected AnimatedQuickhull2D aqh; + protected SkinnedMeshRenderer skin; + protected Animator anim; + protected Convex cvx; + protected f2[] points; + protected GUIStyle style; + + void Start() { + skin = GetComponentInChildren(); + anim = GetComponent(); + aqh = new AnimatedQuickhull2DIndex(skin, triangleIndices); + style = new GUIStyle(); + style.fontSize = 20; + } + + void Update() { + aqh.Execute(); + anim.speed = speed; + transform.rotation = Quaternion.AngleAxis(0.3f, Vector3.up) * transform.rotation; + } + + void OnGUI() { + GUI.Label(new Rect(10, 10, 300, 30), $"xmin:{aqh.convex.aabb.min.x}", style); + GUI.Label(new Rect(10, 90, 300, 30), $"ymin:{aqh.convex.aabb.min.y}", style); + GUI.Label(new Rect(10, 50, 300, 30), $"xmax:{aqh.convex.aabb.max.x}", style); + GUI.Label(new Rect(10, 130, 300, 30), $"ymax:{aqh.convex.aabb.max.y}", style); + } + + void OnRenderObject() { + dbg.SetPass(0); + GL.PushMatrix(); + aqh.convex.Draw(); + GL.PopMatrix(); + } + } +} diff --git a/Assets/Demo/Test3D.cs.meta b/Assets/Demo/Demo2D_Index.cs.meta similarity index 83% rename from Assets/Demo/Test3D.cs.meta rename to Assets/Demo/Demo2D_Index.cs.meta index 37d679f..ca074a2 100644 --- a/Assets/Demo/Test3D.cs.meta +++ b/Assets/Demo/Demo2D_Index.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a5d7705b2c8d1af42852baf8c17c9c74 +guid: 2049050be3c58674f8c87bcad6d1f5e4 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Demo/Demo3D.shader b/Assets/Demo/Demo3D.shader deleted file mode 100644 index 7409daa..0000000 --- a/Assets/Demo/Demo3D.shader +++ /dev/null @@ -1,55 +0,0 @@ -Shader "Custom/Demo3D" -{ - Properties - { - _Color ("Color", Color) = (1,1,1,1) - _MainTex ("Albedo (RGB)", 2D) = "white" {} - _Glossiness ("Smoothness", Range(0,1)) = 0.5 - _Metallic ("Metallic", Range(0,1)) = 0.0 - } - SubShader - { - Tags { "RenderType"="Opaque" } - LOD 200 - //Cull Off - //ZWrite On - - CGPROGRAM - // Physically based Standard lighting model, and enable shadows on all light types - #pragma surface surf Standard fullforwardshadows - - // Use shader model 3.0 target, to get nicer looking lighting - #pragma target 3.0 - - sampler2D _MainTex; - - struct Input - { - float2 uv_MainTex; - }; - - half _Glossiness; - half _Metallic; - fixed4 _Color; - - // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. - // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. - // #pragma instancing_options assumeuniformscaling - UNITY_INSTANCING_BUFFER_START(Props) - // put more per-instance properties here - UNITY_INSTANCING_BUFFER_END(Props) - - void surf (Input IN, inout SurfaceOutputStandard o) - { - // Albedo comes from a texture tinted by color - fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; - o.Albedo = c.rgb; - // Metallic and smoothness come from slider variables - o.Metallic = _Metallic; - o.Smoothness = _Glossiness; - o.Alpha = c.a; - } - ENDCG - } - FallBack "Diffuse" -} diff --git a/Assets/Demo/Demo3D.shader.meta b/Assets/Demo/Demo3D.shader.meta deleted file mode 100644 index f0d14f4..0000000 --- a/Assets/Demo/Demo3D.shader.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 2e53920aa0d0cc04d8142382d55783af -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - preprocessorOverride: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Demo/Demo3D.cs b/Assets/Demo/Demo3D_Aprox.cs similarity index 81% rename from Assets/Demo/Demo3D.cs rename to Assets/Demo/Demo3D_Aprox.cs index cff6735..407fc64 100644 --- a/Assets/Demo/Demo3D.cs +++ b/Assets/Demo/Demo3D_Aprox.cs @@ -1,13 +1,12 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; namespace kmty.geom.d3.animatedquickhull { using f3 = Unity.Mathematics.float3; using V3 = Vector3; - public class Demo3D : MonoBehaviour { + public class Demo3D_Aprox: MonoBehaviour { [SerializeField] protected Material mat; + [SerializeField] protected Material dbg; [SerializeField, Range(1, 20)] protected int itr = 15; [SerializeField, Range(0, 1)] protected float dstThreshold = 0.3f; [SerializeField, Range(0, 1)] protected float wgtThreshold = 0.3f; @@ -16,27 +15,23 @@ public class Demo3D : MonoBehaviour { protected Animator anim; protected SkinnedMeshRenderer skin; protected Convex cvx; - protected GUIStyle style; void Start() { skin = GetComponentInChildren(); anim = GetComponent(); - aqh = new AnimatedQuickhull3D(skin, wgtThreshold); - style = new GUIStyle(); - style.fontSize = 20; - + aqh = new AnimatedQuickhull3DAprox(skin, wgtThreshold, dstThreshold); } void Update() { transform.rotation = Quaternion.AngleAxis(0.3f, V3.up) * transform.rotation; anim.speed = speed; - aqh.Execute(dstThreshold, itr); + aqh.Execute(itr); Graphics.DrawMesh(aqh.CreateMesh(), V3.left * 1.5f, Quaternion.identity, mat, 0); } void OnRenderObject() { + dbg.SetPass(0); GL.PushMatrix(); - GL.Color(Color.white); aqh.convex.Draw(); GL.PopMatrix(); } @@ -48,7 +43,7 @@ void OnDrawGizmos() { var n = nodes[i]; Gizmos.DrawLine( (f3)n.t.GetGravityCenter(), - (f3)n.t.GetGravityCenter() + (f3)n.normal * 0.3f + (f3)n.t.GetGravityCenter() + (f3)n.normal * 0.2f ); } } diff --git a/Assets/Demo/Demo3D.cs.meta b/Assets/Demo/Demo3D_Aprox.cs.meta similarity index 100% rename from Assets/Demo/Demo3D.cs.meta rename to Assets/Demo/Demo3D_Aprox.cs.meta diff --git a/Assets/Demo/Demo3D_Index.cs b/Assets/Demo/Demo3D_Index.cs new file mode 100644 index 0000000..f56101d --- /dev/null +++ b/Assets/Demo/Demo3D_Index.cs @@ -0,0 +1,51 @@ +using UnityEngine; + +namespace kmty.geom.d3.animatedquickhull { + using f3 = Unity.Mathematics.float3; + using V3 = Vector3; + + public class Demo3D_Index: MonoBehaviour { + [SerializeField] protected Material mat; + [SerializeField] protected Material dbg; + [SerializeField, Range(1, 30)] protected int itr = 15; + [SerializeField, Range(0, 1)] protected float speed = 1; + [SerializeField] int[] triangleIndices; + protected AnimatedQuickhull3D aqh; + protected Animator anim; + protected SkinnedMeshRenderer skin; + protected Convex cvx; + + void Start() { + skin = GetComponentInChildren(); + anim = GetComponent(); + aqh = new AnimatedQuickhull3DIndex(skin, triangleIndices); + } + + void Update() { + transform.rotation = Quaternion.AngleAxis(0.3f, V3.up) * transform.rotation; + anim.speed = speed; + aqh.Execute(itr); + Graphics.DrawMesh(aqh.CreateMesh(), V3.left * 1.5f, Quaternion.identity, mat, 0); + //Graphics.DrawMesh(aqh.CreateMesh(), V3.zero, Quaternion.identity, mat, 0); + } + + void OnRenderObject() { + dbg.SetPass(0); + GL.PushMatrix(); + aqh.convex.Draw(); + GL.PopMatrix(); + } + + void OnDrawGizmos() { + if (!Application.isPlaying) return; + var nodes = aqh.convex.nodes; + for (int i = 0; i < nodes.Count; i++) { + var n = nodes[i]; + Gizmos.DrawLine( + (f3)n.t.GetGravityCenter(), + (f3)n.t.GetGravityCenter() + (f3)n.normal * 0.2f + ); + } + } + } +} diff --git a/Assets/Demo/Demo3D_Index.cs.meta b/Assets/Demo/Demo3D_Index.cs.meta new file mode 100644 index 0000000..abaec26 --- /dev/null +++ b/Assets/Demo/Demo3D_Index.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3e329010bf2ddae41afed4185b24bf6d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models.meta b/Assets/Demo/Models.meta similarity index 100% rename from Assets/Models.meta rename to Assets/Demo/Models.meta diff --git a/Assets/Demo/Models/Brooklyn Uprock.meta b/Assets/Demo/Models/Brooklyn Uprock.meta new file mode 100644 index 0000000..3abadd9 --- /dev/null +++ b/Assets/Demo/Models/Brooklyn Uprock.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cfc58fc3fb1aea04ba83d8151a4f07cb +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Demo/Models/Brooklyn Uprock/Brooklyn Uprock.controller b/Assets/Demo/Models/Brooklyn Uprock/Brooklyn Uprock.controller new file mode 100644 index 0000000..1f908d2 --- /dev/null +++ b/Assets/Demo/Models/Brooklyn Uprock/Brooklyn Uprock.controller @@ -0,0 +1,110 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1109 &-2026637696250245624 +AnimatorTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: [] + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: -1836020998132377891} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 1 +--- !u!1102 &-1836020998132377891 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: mixamo_com + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: + - {fileID: 4631983980434200357} + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: -203655887218126122, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Brooklyn Uprock + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 7352781584909931893} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1101 &4631983980434200357 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: [] + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: -1836020998132377891} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0.25 + m_TransitionOffset: 0 + m_ExitTime: 0.94863015 + m_HasExitTime: 1 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1107 &7352781584909931893 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: -1836020998132377891} + m_Position: {x: 340, y: 110, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: + - {fileID: -2026637696250245624} + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: -1836020998132377891} diff --git a/Assets/Demo/Models/Brooklyn Uprock/Brooklyn Uprock.controller.meta b/Assets/Demo/Models/Brooklyn Uprock/Brooklyn Uprock.controller.meta new file mode 100644 index 0000000..60c3315 --- /dev/null +++ b/Assets/Demo/Models/Brooklyn Uprock/Brooklyn Uprock.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 73bb74b32a75a774a8012289a8815c67 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Recordings/output2d.gif b/Assets/Demo/Models/Brooklyn Uprock/Brooklyn Uprock.fbx similarity index 52% rename from Recordings/output2d.gif rename to Assets/Demo/Models/Brooklyn Uprock/Brooklyn Uprock.fbx index f4e2d07..cd33e4d 100644 Binary files a/Recordings/output2d.gif and b/Assets/Demo/Models/Brooklyn Uprock/Brooklyn Uprock.fbx differ diff --git a/Assets/Demo/Models/Brooklyn Uprock/Brooklyn Uprock.fbx.meta b/Assets/Demo/Models/Brooklyn Uprock/Brooklyn Uprock.fbx.meta new file mode 100644 index 0000000..c96e665 --- /dev/null +++ b/Assets/Demo/Models/Brooklyn Uprock/Brooklyn Uprock.fbx.meta @@ -0,0 +1,910 @@ +fileFormatVersion: 2 +guid: 65a8c4c5edba5ad49ac0250b38fe8b98 +ModelImporter: + serializedVersion: 21100 + internalIDToNameTable: + - first: + 74: -203655887218126122 + second: mixamo.com + externalObjects: + - first: + type: UnityEngine:Material + assembly: UnityEngine.CoreModule + name: Ch03_Body + second: {fileID: 2100000, guid: e7c3ac673e27f2d4f9d7ceff8921777d, type: 2} + - first: + type: UnityEngine:Texture2D + assembly: UnityEngine.CoreModule + name: Ch03_1001_Diffuse + second: {fileID: 2800000, guid: c8e91ab87befb474ab4f0c4d39f4c471, type: 3} + - first: + type: UnityEngine:Texture2D + assembly: UnityEngine.CoreModule + name: Ch03_1001_Glossiness + second: {fileID: 2800000, guid: 6a17f5b3038060e45a992b7a7a8c09d1, type: 3} + - first: + type: UnityEngine:Texture2D + assembly: UnityEngine.CoreModule + name: Ch03_1001_Normal + second: {fileID: 2800000, guid: e1e0f938c1acaf34a99652580aff0563, type: 3} + - first: + type: UnityEngine:Texture2D + assembly: UnityEngine.CoreModule + name: Ch03_1001_Specular + second: {fileID: 2800000, guid: 01947247fb462d746a1606ffa479e915, type: 3} + materials: + materialImportMode: 2 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 3 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: + - serializedVersion: 16 + name: mixamo.com + takeName: mixamo.com + internalID: 0 + firstFrame: 0 + lastFrame: 146 + wrapMode: 0 + orientationOffsetY: 0 + level: 0 + cycleOffset: 0 + loop: 0 + hasAdditiveReferencePose: 0 + loopTime: 0 + loopBlend: 0 + loopBlendOrientation: 0 + loopBlendPositionY: 1 + loopBlendPositionXZ: 0 + keepOriginalOrientation: 0 + keepOriginalPositionY: 1 + keepOriginalPositionXZ: 0 + heightFromFeet: 0 + mirror: 0 + bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 + curves: [] + events: [] + transformMask: [] + maskType: 3 + maskSource: {instanceID: 0} + additiveReferencePoseFrame: 0 + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + bakeAxisConversion: 0 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 1 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 + secondaryUVPackMargin: 4 + useFileScale: 1 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 1 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: + - boneName: mixamorig:Hips + humanName: Hips + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftUpLeg + humanName: LeftUpperLeg + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightUpLeg + humanName: RightUpperLeg + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftLeg + humanName: LeftLowerLeg + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightLeg + humanName: RightLowerLeg + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftFoot + humanName: LeftFoot + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightFoot + humanName: RightFoot + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:Spine + humanName: Spine + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:Spine1 + humanName: Chest + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:Neck + humanName: Neck + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:Head + humanName: Head + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftShoulder + humanName: LeftShoulder + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightShoulder + humanName: RightShoulder + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftArm + humanName: LeftUpperArm + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightArm + humanName: RightUpperArm + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftForeArm + humanName: LeftLowerArm + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightForeArm + humanName: RightLowerArm + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftHand + humanName: LeftHand + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightHand + humanName: RightHand + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftToeBase + humanName: LeftToes + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightToeBase + humanName: RightToes + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftHandThumb1 + humanName: Left Thumb Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftHandThumb2 + humanName: Left Thumb Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftHandThumb3 + humanName: Left Thumb Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftHandIndex1 + humanName: Left Index Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftHandIndex2 + humanName: Left Index Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftHandIndex3 + humanName: Left Index Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftHandMiddle1 + humanName: Left Middle Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftHandMiddle2 + humanName: Left Middle Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftHandMiddle3 + humanName: Left Middle Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftHandRing1 + humanName: Left Ring Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftHandRing2 + humanName: Left Ring Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftHandRing3 + humanName: Left Ring Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftHandPinky1 + humanName: Left Little Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftHandPinky2 + humanName: Left Little Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:LeftHandPinky3 + humanName: Left Little Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightHandThumb1 + humanName: Right Thumb Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightHandThumb2 + humanName: Right Thumb Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightHandThumb3 + humanName: Right Thumb Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightHandIndex1 + humanName: Right Index Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightHandIndex2 + humanName: Right Index Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightHandIndex3 + humanName: Right Index Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightHandMiddle1 + humanName: Right Middle Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightHandMiddle2 + humanName: Right Middle Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightHandMiddle3 + humanName: Right Middle Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightHandRing1 + humanName: Right Ring Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightHandRing2 + humanName: Right Ring Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightHandRing3 + humanName: Right Ring Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightHandPinky1 + humanName: Right Little Proximal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightHandPinky2 + humanName: Right Little Intermediate + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:RightHandPinky3 + humanName: Right Little Distal + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + - boneName: mixamorig:Spine2 + humanName: UpperChest + limit: + min: {x: 0, y: 0, z: 0} + max: {x: 0, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} + length: 0 + modified: 0 + skeleton: + - name: Brooklyn Uprock(Clone) + parentName: + position: {x: 0, y: 0, z: 0} + rotation: {x: 0, y: 0, z: 0, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: Ch03 + parentName: Brooklyn Uprock(Clone) + position: {x: -0, y: 0, z: 0} + rotation: {x: 0, y: -0, z: -0, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: mixamorig:Hips + parentName: Brooklyn Uprock(Clone) + position: {x: 0, y: 1.0429418, z: -0.026871275} + rotation: {x: 1.3552526e-16, y: -0.000000011641532, z: 1.5777216e-24, w: 1} + scale: {x: 0.99999994, y: 1, z: 1} + - name: mixamorig:Spine + parentName: mixamorig:Hips + position: {x: -0, y: 0.056457214, z: -0.00031929315} + rotation: {x: -0.002827716, y: 0.000000005832059, z: -0.000000003985301, w: 0.999996} + scale: {x: 1.0000001, y: 1, z: 1} + - name: mixamorig:Spine1 + parentName: mixamorig:Spine + position: {x: -0, y: 0.06586783, z: -5.6211745e-12} + rotation: {x: 0.000000008381903, y: 0.0000000057761818, z: 0.000000007899922, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: mixamorig:Spine2 + parentName: mixamorig:Spine1 + position: {x: -0, y: 0.07527754, z: -3.2164848e-12} + rotation: {x: 2.3283064e-10, y: 0.0000000015613829, z: -0.000000018772536, w: 1} + scale: {x: 1, y: 0.99999994, z: 1} + - name: mixamorig:Neck + parentName: mixamorig:Spine2 + position: {x: -0, y: 0.08468717, z: -0.0000000010722686} + rotation: {x: 0.002827706, y: -0.0000000015587648, z: 0.00000003662564, w: 0.999996} + scale: {x: 1.0000001, y: 1.0000001, z: 1} + - name: mixamorig:Head + parentName: mixamorig:Neck + position: {x: -0, y: 0.059989013, z: -0.011589574} + rotation: {x: 0.000000007275958, y: 0.00000001164153, z: -0.000000014438231, w: 1} + scale: {x: 0.9999999, y: 0.9999999, z: 0.9999999} + - name: mixamorig:HeadTop_End + parentName: mixamorig:Head + position: {x: -0, y: 0.2174881, z: -0.0420176} + rotation: {x: 6.938894e-18, y: -0, z: -0, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: mixamorig:LeftShoulder + parentName: mixamorig:Spine2 + position: {x: -0.03414665, y: 0.073433705, z: -0.00017398552} + rotation: {x: 0.5713627, y: -0.41563013, z: 0.57428014, w: 0.4135198} + scale: {x: 1.0000005, y: 1.0000007, z: 1.0000005} + - name: mixamorig:LeftArm + parentName: mixamorig:LeftShoulder + position: {x: 8.603784e-14, y: 0.07189681, z: 0.0000000010090115} + rotation: {x: -0.14953554, y: 0.0012244284, z: -0.008095771, w: 0.9887225} + scale: {x: 1.0000001, y: 0.99999994, z: 1.0000004} + - name: mixamorig:LeftForeArm + parentName: mixamorig:LeftArm + position: {x: 3.231037e-11, y: 0.24203573, z: 1.7166471e-10} + rotation: {x: -0.008596017, y: 0.000088403795, z: -0.010274136, w: 0.99991024} + scale: {x: 1.0000001, y: 1.0000006, z: 1.0000005} + - name: mixamorig:LeftHand + parentName: mixamorig:LeftForeArm + position: {x: -6.8747494e-11, y: 0.215951, z: -4.274625e-13} + rotation: {x: 0.017204838, y: 0.0617328, z: -0.028357053, w: -0.9975415} + scale: {x: 1.0000001, y: 1, z: 1} + - name: mixamorig:LeftHandPinky1 + parentName: mixamorig:LeftHand + position: {x: -0.0249819, y: 0.07361747, z: 0.0002872289} + rotation: {x: 0.0045586163, y: 0.0002466663, z: 0.025984913, w: 0.9996519} + scale: {x: 0.9999996, y: 1, z: 1} + - name: mixamorig:LeftHandPinky2 + parentName: mixamorig:LeftHandPinky1 + position: {x: -0.0000052446476, y: 0.02480185, z: -5.0656437e-11} + rotation: {x: 0.010998076, y: -0.000000065047054, z: -0.0000000851337, w: 0.99993956} + scale: {x: 1.0000005, y: 1.0000005, z: 1.0000007} + - name: mixamorig:LeftHandPinky3 + parentName: mixamorig:LeftHandPinky2 + position: {x: -0.000013815116, y: 0.019510984, z: -4.026546e-11} + rotation: {x: -0.041063987, y: -0.00000014651559, z: 0.00000013117996, w: 0.99915653} + scale: {x: 1.0000001, y: 1.0000002, z: 1.0000001} + - name: mixamorig:LeftHandPinky4 + parentName: mixamorig:LeftHandPinky3 + position: {x: 0.000019060173, y: 0.016595453, z: 4.0817977e-11} + rotation: {x: 0, y: -0, z: -0, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: mixamorig:LeftHandMiddle1 + parentName: mixamorig:LeftHand + position: {x: 0.008249274, y: 0.07382679, z: -0.0010472892} + rotation: {x: -0.005258814, y: 0.000055491928, z: -0.010605068, w: 0.99992996} + scale: {x: 1, y: 1, z: 1} + - name: mixamorig:LeftHandMiddle2 + parentName: mixamorig:LeftHandMiddle1 + position: {x: 0.000018941806, y: 0.033795662, z: 5.779398e-11} + rotation: {x: -0.04100816, y: 0.0000060722814, z: 0.00024335283, w: -0.99915886} + scale: {x: 1.0000002, y: 1.0000006, z: 1.0000006} + - name: mixamorig:LeftHandMiddle3 + parentName: mixamorig:LeftHandMiddle2 + position: {x: -0.000055141572, y: 0.031907894, z: 1.0537775e-10} + rotation: {x: 0.04009252, y: -0.0000060614975, z: -0.0006549992, w: -0.9991958} + scale: {x: 1, y: 0.99999994, z: 0.9999998} + - name: mixamorig:LeftHandMiddle4 + parentName: mixamorig:LeftHandMiddle3 + position: {x: 0.000036199785, y: 0.027520403, z: 2.1196342e-11} + rotation: {x: 0, y: -0, z: -0, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: mixamorig:LeftHandRing1 + parentName: mixamorig:LeftHand + position: {x: -0.008877625, y: 0.075375415, z: 0.00096350734} + rotation: {x: -0.03502153, y: -0.0008456409, z: 0.0241251, w: 0.99909496} + scale: {x: 1.0000002, y: 1.0000004, z: 1.0000002} + - name: mixamorig:LeftHandRing2 + parentName: mixamorig:LeftHandRing1 + position: {x: 0.00004293377, y: 0.028452307, z: -3.1688513e-10} + rotation: {x: 0.039821588, y: -0.00000021996672, z: 0.000000115288444, w: 0.9992068} + scale: {x: 1, y: 0.99999994, z: 1} + - name: mixamorig:LeftHandRing3 + parentName: mixamorig:LeftHandRing2 + position: {x: -0.0000074501077, y: 0.026810085, z: 6.4119374e-12} + rotation: {x: 0.028468203, y: 0.0000003296207, z: 0.0000000018504098, w: 0.99959475} + scale: {x: 1.0000002, y: 1.0000004, z: 1.0000002} + - name: mixamorig:LeftHandRing4 + parentName: mixamorig:LeftHandRing3 + position: {x: -0.00003548392, y: 0.022807121, z: 8.0285646e-11} + rotation: {x: 0, y: -0, z: -0, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: mixamorig:LeftHandThumb1 + parentName: mixamorig:LeftHand + position: {x: 0.021452617, y: 0.020982353, z: 0.0110668} + rotation: {x: -0.044706695, y: -0.019625396, z: 0.33623475, w: -0.9405118} + scale: {x: 1.0000002, y: 1.0000007, z: 1.0000008} + - name: mixamorig:LeftHandThumb2 + parentName: mixamorig:LeftHandThumb1 + position: {x: 0.0044221953, y: 0.025201807, z: -7.304379e-14} + rotation: {x: -0.011968741, y: -0.0014754512, z: -0.05808878, w: 0.99823856} + scale: {x: 1.0000001, y: 1.0000005, z: 1.0000005} + - name: mixamorig:LeftHandThumb3 + parentName: mixamorig:LeftHandThumb2 + position: {x: -0.0005009757, y: 0.031055419, z: -4.539811e-10} + rotation: {x: -0.011830983, y: 0.0006449195, z: -0.026145004, w: 0.999588} + scale: {x: 1, y: 1.0000001, z: 1.0000001} + - name: mixamorig:LeftHandThumb4 + parentName: mixamorig:LeftHandThumb3 + position: {x: -0.003921216, y: 0.026770787, z: 6.240268e-10} + rotation: {x: 0, y: -0, z: -0, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: mixamorig:LeftHandIndex1 + parentName: mixamorig:LeftHand + position: {x: 0.025610246, y: 0.07100104, z: 0.0004859041} + rotation: {x: -0.0150380265, y: 0.00082739815, z: 0.054914977, w: -0.9983775} + scale: {x: 1.0000004, y: 1.0000005, z: 1.0000006} + - name: mixamorig:LeftHandIndex2 + parentName: mixamorig:LeftHandIndex1 + position: {x: 0.0000056504696, y: 0.030000962, z: 4.2981865e-11} + rotation: {x: 0.008165918, y: -0.000000042608004, z: 0.000000023295794, w: 0.99996674} + scale: {x: 1.0000002, y: 1.0000008, z: 1.0000007} + - name: mixamorig:LeftHandIndex3 + parentName: mixamorig:LeftHandIndex2 + position: {x: -0.0000047409167, y: 0.027485795, z: -1.9026202e-11} + rotation: {x: -0.0037712478, y: 0.00000013824327, z: 0.00000004574878, w: 0.9999929} + scale: {x: 1, y: 1.0000001, z: 1} + - name: mixamorig:LeftHandIndex4 + parentName: mixamorig:LeftHandIndex3 + position: {x: -0.00000091003477, y: 0.023343477, z: -4.3468163e-12} + rotation: {x: 0, y: -0, z: -0, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: mixamorig:RightShoulder + parentName: mixamorig:Spine2 + position: {x: 0.03414665, y: 0.07343246, z: 0.0000466882} + rotation: {x: -0.57322264, y: -0.4142818, z: 0.5724383, w: -0.41485047} + scale: {x: 1, y: 1.0000001, z: 0.9999998} + - name: mixamorig:RightArm + parentName: mixamorig:RightShoulder + position: {x: 1.2103093e-11, y: 0.07189681, z: 0.0000000010089389} + rotation: {x: -0.149585, y: -0.00039839745, z: 0.0026332736, w: 0.98874533} + scale: {x: 0.9999999, y: 0.9999999, z: 1.0000001} + - name: mixamorig:RightForeArm + parentName: mixamorig:RightArm + position: {x: -2.5905004e-11, y: 0.24202721, z: -5.676185e-11} + rotation: {x: 0.008613244, y: 0.00010929254, z: -0.012692851, w: -0.9998824} + scale: {x: 1.0000001, y: 1, z: 1} + - name: mixamorig:RightHand + parentName: mixamorig:RightForeArm + position: {x: 2.9722025e-10, y: 0.21595645, z: -3.1816683e-12} + rotation: {x: -0.019531146, y: 0.054955408, z: -0.029693276, w: 0.99785614} + scale: {x: 1.0000001, y: 1.0000002, z: 1.0000006} + - name: mixamorig:RightHandMiddle1 + parentName: mixamorig:RightHand + position: {x: -0.008360951, y: 0.07262776, z: -0.0011012207} + rotation: {x: 0.0051678163, y: 0.00008792428, z: 0.017025897, w: 0.9998417} + scale: {x: 1.0000001, y: 1.0000008, z: 1.0000002} + - name: mixamorig:RightHandMiddle2 + parentName: mixamorig:RightHandMiddle1 + position: {x: -0.00009278475, y: 0.033110876, z: 2.0578738e-11} + rotation: {x: 0.033363555, y: -0.0000000048021316, z: -0.000000092769355, w: 0.99944335} + scale: {x: 1.0000001, y: 0.99999994, z: 1} + - name: mixamorig:RightHandMiddle3 + parentName: mixamorig:RightHandMiddle2 + position: {x: 0.0000004939979, y: 0.03189107, z: 1.0237869e-10} + rotation: {x: 0.04123007, y: 0.00000018951707, z: 0.00000007140042, w: 0.99914974} + scale: {x: 1.0000001, y: 1.0000006, z: 1.0000005} + - name: mixamorig:RightHandMiddle4 + parentName: mixamorig:RightHandMiddle3 + position: {x: 0.00009229077, y: 0.02691511, z: 2.4407427e-11} + rotation: {x: 0, y: -0, z: -0, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: mixamorig:RightHandRing1 + parentName: mixamorig:RightHand + position: {x: 0.009853345, y: 0.07492675, z: -0.0001888804} + rotation: {x: -0.0077591976, y: 0.00007173791, z: -0.0092129065, w: 0.99992746} + scale: {x: 1.0000002, y: 1.0000008, z: 1.0000004} + - name: mixamorig:RightHandRing2 + parentName: mixamorig:RightHandRing1 + position: {x: -0.00001495633, y: 0.028155075, z: 9.423928e-11} + rotation: {x: 0.006187952, y: -0.0000000599466, z: -0.00000014231367, w: 0.9999809} + scale: {x: 0.9999998, y: 0.9999996, z: 0.9999997} + - name: mixamorig:RightHandRing3 + parentName: mixamorig:RightHandRing2 + position: {x: 0.000000629551, y: 0.02735684, z: -1.1235101e-11} + rotation: {x: 0.0068011577, y: 0.00000025165485, z: 0.000000077233516, w: 0.99997693} + scale: {x: 1.0000001, y: 1.0000007, z: 1.0000005} + - name: mixamorig:RightHandRing4 + parentName: mixamorig:RightHandRing3 + position: {x: 0.000014326656, y: 0.023531796, z: 3.2169396e-11} + rotation: {x: 0, y: -0, z: -0, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: mixamorig:RightHandPinky1 + parentName: mixamorig:RightHand + position: {x: 0.024177428, y: 0.07441803, z: 0.0009101358} + rotation: {x: -0.010412102, y: 0.00057623873, z: -0.024928544, w: 0.99963486} + scale: {x: 1.0000001, y: 1.0000005, z: 0.99999994} + - name: mixamorig:RightHandPinky2 + parentName: mixamorig:RightHandPinky1 + position: {x: 0.0000070261453, y: 0.024493195, z: 1.0709882e-10} + rotation: {x: 0.03406677, y: -0.0000001497974, z: -0.00000010699476, w: 0.9994196} + scale: {x: 1.0000001, y: 0.99999994, z: 0.99999994} + - name: mixamorig:RightHandPinky3 + parentName: mixamorig:RightHandPinky2 + position: {x: 0.000064022686, y: 0.01966047, z: 2.6402915e-11} + rotation: {x: -0.039324835, y: 0.000026511465, z: -0.0020621966, w: 0.9992244} + scale: {x: 1.0000002, y: 1.0000001, z: 1.0000004} + - name: mixamorig:RightHandPinky4 + parentName: mixamorig:RightHandPinky3 + position: {x: -0.000071049304, y: 0.016121032, z: -1.5345293e-10} + rotation: {x: 0, y: -0, z: -0, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: mixamorig:RightHandIndex1 + parentName: mixamorig:RightHand + position: {x: -0.025669824, y: 0.07104994, z: 0.00039442003} + rotation: {x: 0.017197354, y: 0.0011009312, z: 0.06386082, w: 0.99781007} + scale: {x: 1.0000002, y: 1.0000007, z: 1.0000002} + - name: mixamorig:RightHandIndex2 + parentName: mixamorig:RightHandIndex1 + position: {x: 0.000010054917, y: 0.029493302, z: -1.6901395e-11} + rotation: {x: 0.020511452, y: -0.0000002572778, z: -0.00000004829052, w: 0.99978966} + scale: {x: 1.0000001, y: 1.0000006, z: 1.0000002} + - name: mixamorig:RightHandIndex3 + parentName: mixamorig:RightHandIndex2 + position: {x: 0.000055375094, y: 0.028015709, z: -9.608073e-11} + rotation: {x: -0.040617928, y: 0.000007511895, z: -0.0007529916, w: 0.9991745} + scale: {x: 1.0000002, y: 1.0000006, z: 1.0000006} + - name: mixamorig:RightHandIndex4 + parentName: mixamorig:RightHandIndex3 + position: {x: -0.000065430344, y: 0.023635458, z: 2.466338e-10} + rotation: {x: 0, y: -0, z: -0, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: mixamorig:RightHandThumb1 + parentName: mixamorig:RightHand + position: {x: -0.021653892, y: 0.021352429, z: 0.011744985} + rotation: {x: 0.047820076, y: -0.019718152, z: 0.33944482, w: 0.93920267} + scale: {x: 1.0000001, y: 1.0000004, z: 1.0000004} + - name: mixamorig:RightHandThumb2 + parentName: mixamorig:RightHandThumb1 + position: {x: -0.0043806303, y: 0.025709493, z: -8.3908785e-10} + rotation: {x: -0.0144943, y: 0.0017326263, z: 0.05698218, w: 0.99826854} + scale: {x: 1.0000001, y: 1.0000006, z: 1.0000005} + - name: mixamorig:RightHandThumb3 + parentName: mixamorig:RightHandThumb2 + position: {x: 0.00052068767, y: 0.030593134, z: 5.0527604e-10} + rotation: {x: -0.005777096, y: -0.00028751537, z: 0.024512889, w: 0.9996828} + scale: {x: 1.0000002, y: 1.0000007, z: 1.0000002} + - name: mixamorig:RightHandThumb4 + parentName: mixamorig:RightHandThumb3 + position: {x: 0.0038599425, y: 0.026252195, z: -4.3490786e-10} + rotation: {x: 0, y: -0, z: -0, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: mixamorig:LeftUpLeg + parentName: mixamorig:Hips + position: {x: -0.06620178, y: -0.08816846, z: -0.0044718278} + rotation: {x: -0.00025622372, y: 0.0077912505, z: 0.9994293, w: 0.03286915} + scale: {x: 1.0000006, y: 1.0000006, z: 1.0000001} + - name: mixamorig:LeftLeg + parentName: mixamorig:LeftUpLeg + position: {x: 0.0037225636, y: 0.361852, z: 0.0008833976} + rotation: {x: 0.003220564, y: 0.000067974965, z: 0.021100113, w: 0.99977225} + scale: {x: 1.0000001, y: 0.99999994, z: 1.0000005} + - name: mixamorig:LeftFoot + parentName: mixamorig:LeftLeg + position: {x: -5.085549e-10, y: 0.4626306, z: -7.346706e-10} + rotation: {x: 0.41800094, y: -0.022655133, z: 0.010428135, w: 0.9081042} + scale: {x: 1.0000004, y: 1.0000005, z: 1} + - name: mixamorig:LeftToeBase + parentName: mixamorig:LeftFoot + position: {x: -2.7044297e-10, y: 0.16368599, z: -0.0000000066870074} + rotation: {x: 0.32843024, y: 0.026533363, z: -0.009230223, w: 0.94411045} + scale: {x: 1.0000006, y: 1, z: 1.0000008} + - name: mixamorig:LeftToe_End + parentName: mixamorig:LeftToeBase + position: {x: -1.8163835e-11, y: 0.06665022, z: 4.8907482e-11} + rotation: {x: 0, y: -0, z: -0, w: 1} + scale: {x: 1, y: 1, z: 1} + - name: mixamorig:RightUpLeg + parentName: mixamorig:Hips + position: {x: 0.06620178, y: -0.08816849, z: -0.0044718278} + rotation: {x: 0.00011730493, y: 0.0035659976, z: 0.9994532, w: -0.03287312} + scale: {x: 1.0000004, y: 1.0000001, z: 1.0000001} + - name: mixamorig:RightLeg + parentName: mixamorig:RightUpLeg + position: {x: -0.0037211438, y: 0.36183897, z: 0.0049615745} + rotation: {x: 0.0004555857, y: -0.000009613472, z: -0.0211012, w: 0.9997773} + scale: {x: 1.0000004, y: 1.0000006, z: 1} + - name: mixamorig:RightFoot + parentName: mixamorig:RightLeg + position: {x: 6.815706e-10, y: 0.46253347, z: -3.5159417e-10} + rotation: {x: 0.43508103, y: 0.021047628, z: -0.010173867, w: 0.90008783} + scale: {x: 1.0000004, y: 1.0000006, z: 0.99999994} + - name: mixamorig:RightToeBase + parentName: mixamorig:RightFoot + position: {x: -3.030145e-12, y: 0.1686341, z: -0.0000000029002587} + rotation: {x: 0.3171749, y: -0.02520875, z: 0.008434208, w: 0.9479944} + scale: {x: 1.0000005, y: 0.99999994, z: 1.0000001} + - name: mixamorig:RightToe_End + parentName: mixamorig:RightToeBase + position: {x: -3.188056e-11, y: 0.06677563, z: 5.6875376e-11} + rotation: {x: 0, y: -0, z: -0, w: 1} + scale: {x: 1, y: 1, z: 1} + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 1 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 3 + humanoidOversampling: 1 + avatarSetup: 1 + addHumanoidExtraRootOnlyWhenUsingAvatar: 1 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Diffuse.png b/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Diffuse.png new file mode 100644 index 0000000..e6556d8 Binary files /dev/null and b/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Diffuse.png differ diff --git a/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Diffuse.png.meta b/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Diffuse.png.meta new file mode 100644 index 0000000..e4626b6 --- /dev/null +++ b/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Diffuse.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: c8e91ab87befb474ab4f0c4d39f4c471 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Glossiness.png b/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Glossiness.png new file mode 100644 index 0000000..c4268a3 Binary files /dev/null and b/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Glossiness.png differ diff --git a/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Glossiness.png.meta b/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Glossiness.png.meta new file mode 100644 index 0000000..b256469 --- /dev/null +++ b/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Glossiness.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 6a17f5b3038060e45a992b7a7a8c09d1 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Normal.png b/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Normal.png new file mode 100644 index 0000000..4a3c5af Binary files /dev/null and b/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Normal.png differ diff --git a/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Normal.png.meta b/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Normal.png.meta new file mode 100644 index 0000000..7944f1c --- /dev/null +++ b/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Normal.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: e1e0f938c1acaf34a99652580aff0563 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 1 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Specular.png b/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Specular.png new file mode 100644 index 0000000..fa309c8 Binary files /dev/null and b/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Specular.png differ diff --git a/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Specular.png.meta b/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Specular.png.meta new file mode 100644 index 0000000..dadf781 --- /dev/null +++ b/Assets/Demo/Models/Brooklyn Uprock/Ch03_1001_Specular.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 01947247fb462d746a1606ffa479e915 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Demo/Models/Brooklyn Uprock/Ch03_Body.mat b/Assets/Demo/Models/Brooklyn Uprock/Ch03_Body.mat new file mode 100644 index 0000000..5f89dd4 --- /dev/null +++ b/Assets/Demo/Models/Brooklyn Uprock/Ch03_Body.mat @@ -0,0 +1,79 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Ch03_Body + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _NORMALMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 2800000, guid: e1e0f938c1acaf34a99652580aff0563, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: c8e91ab87befb474ab4f0c4d39f4c471, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0.9063317, g: 0.9063317, b: 0.9063317, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Demo/Models/Brooklyn Uprock/Ch03_Body.mat.meta b/Assets/Demo/Models/Brooklyn Uprock/Ch03_Body.mat.meta new file mode 100644 index 0000000..b7d9338 --- /dev/null +++ b/Assets/Demo/Models/Brooklyn Uprock/Ch03_Body.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e7c3ac673e27f2d4f9d7ceff8921777d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Demo/Models/Capoeria.meta b/Assets/Demo/Models/Capoeria.meta new file mode 100644 index 0000000..86144af --- /dev/null +++ b/Assets/Demo/Models/Capoeria.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2d4222720e04ded4f9fdf752a2a1b662 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models/Capeeira.controller b/Assets/Demo/Models/Capoeria/Capeeira.controller similarity index 100% rename from Assets/Models/Capeeira.controller rename to Assets/Demo/Models/Capoeria/Capeeira.controller diff --git a/Assets/Models/Capeeira.controller.meta b/Assets/Demo/Models/Capoeria/Capeeira.controller.meta similarity index 100% rename from Assets/Models/Capeeira.controller.meta rename to Assets/Demo/Models/Capoeria/Capeeira.controller.meta diff --git a/Assets/Models/Capoeira.fbx b/Assets/Demo/Models/Capoeria/Capoeira.fbx similarity index 100% rename from Assets/Models/Capoeira.fbx rename to Assets/Demo/Models/Capoeria/Capoeira.fbx diff --git a/Assets/Models/Capoeira.fbx.meta b/Assets/Demo/Models/Capoeria/Capoeira.fbx.meta similarity index 99% rename from Assets/Models/Capoeira.fbx.meta rename to Assets/Demo/Models/Capoeria/Capoeira.fbx.meta index 980b27b..057438b 100644 --- a/Assets/Models/Capoeira.fbx.meta +++ b/Assets/Demo/Models/Capoeria/Capoeira.fbx.meta @@ -41,7 +41,7 @@ ModelImporter: legacyGenerateAnimations: 4 bakeSimulation: 0 resampleCurves: 1 - optimizeGameObjects: 0 + optimizeGameObjects: 1 motionNodeName: rigImportErrors: rigImportWarnings: diff --git a/Assets/Models/Ch46_1001_Diffuse.png b/Assets/Demo/Models/Capoeria/Ch46_1001_Diffuse.png similarity index 100% rename from Assets/Models/Ch46_1001_Diffuse.png rename to Assets/Demo/Models/Capoeria/Ch46_1001_Diffuse.png diff --git a/Assets/Models/Ch46_1001_Diffuse.png.meta b/Assets/Demo/Models/Capoeria/Ch46_1001_Diffuse.png.meta similarity index 100% rename from Assets/Models/Ch46_1001_Diffuse.png.meta rename to Assets/Demo/Models/Capoeria/Ch46_1001_Diffuse.png.meta diff --git a/Assets/Models/Ch46_1001_Glossiness.png b/Assets/Demo/Models/Capoeria/Ch46_1001_Glossiness.png similarity index 100% rename from Assets/Models/Ch46_1001_Glossiness.png rename to Assets/Demo/Models/Capoeria/Ch46_1001_Glossiness.png diff --git a/Assets/Models/Ch46_1001_Glossiness.png.meta b/Assets/Demo/Models/Capoeria/Ch46_1001_Glossiness.png.meta similarity index 100% rename from Assets/Models/Ch46_1001_Glossiness.png.meta rename to Assets/Demo/Models/Capoeria/Ch46_1001_Glossiness.png.meta diff --git a/Assets/Models/Ch46_1001_Normal.png b/Assets/Demo/Models/Capoeria/Ch46_1001_Normal.png similarity index 100% rename from Assets/Models/Ch46_1001_Normal.png rename to Assets/Demo/Models/Capoeria/Ch46_1001_Normal.png diff --git a/Assets/Models/Ch46_1001_Normal.png.meta b/Assets/Demo/Models/Capoeria/Ch46_1001_Normal.png.meta similarity index 100% rename from Assets/Models/Ch46_1001_Normal.png.meta rename to Assets/Demo/Models/Capoeria/Ch46_1001_Normal.png.meta diff --git a/Assets/Models/Ch46_1001_Specular.png b/Assets/Demo/Models/Capoeria/Ch46_1001_Specular.png similarity index 100% rename from Assets/Models/Ch46_1001_Specular.png rename to Assets/Demo/Models/Capoeria/Ch46_1001_Specular.png diff --git a/Assets/Models/Ch46_1001_Specular.png.meta b/Assets/Demo/Models/Capoeria/Ch46_1001_Specular.png.meta similarity index 100% rename from Assets/Models/Ch46_1001_Specular.png.meta rename to Assets/Demo/Models/Capoeria/Ch46_1001_Specular.png.meta diff --git a/Assets/Models/Ch46_body.mat b/Assets/Demo/Models/Capoeria/Ch46_body.mat similarity index 100% rename from Assets/Models/Ch46_body.mat rename to Assets/Demo/Models/Capoeria/Ch46_body.mat diff --git a/Assets/Models/Ch46_body.mat.meta b/Assets/Demo/Models/Capoeria/Ch46_body.mat.meta similarity index 100% rename from Assets/Models/Ch46_body.mat.meta rename to Assets/Demo/Models/Capoeria/Ch46_body.mat.meta diff --git a/Assets/Demo/Test3D.cs b/Assets/Demo/Test3D.cs deleted file mode 100644 index 6823bfe..0000000 --- a/Assets/Demo/Test3D.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using Unity.Mathematics; -using kmty.geom.d3; -using kmty.geom.d3.animatedquickhull; -using f3 = Unity.Mathematics.float3; - -public class Test3D : MonoBehaviour { - [SerializeField, Range(0, 100)] protected int num; - [SerializeField, Range(0, 2)] protected float dst; - [SerializeField] protected bool showNormal; - [SerializeField] protected bool showOthers; - [SerializeField, Range(0, 10)] protected int currId; - Convex convex; - - void Start() { - for (int i = 0; i < num; i++) { - var g = GameObject.CreatePrimitive(PrimitiveType.Sphere); - g.transform.localScale *= 0.1f; - g.transform.position = UnityEngine.Random.onUnitSphere * dst; - g.transform.SetParent(this.transform); - } - } - - void Update() { - var l = new List(); - foreach (Transform c in transform) { l.Add(c.position); } - convex = new Convex(l); - convex.ExpandLoop(); - } - - void OnRenderObject() { - GL.PushMatrix(); - GL.Color(Color.white); - convex.Draw(); - GL.PopMatrix(); - } - - void OnDrawGizmos() { - if (!Application.isPlaying) return; - var nodes = convex.nodes; - if (showOthers) { - for (int i = 0; i < nodes.Count; i++) { - var n = nodes[i]; - Gizmos.DrawLine((f3)n.t.a, (f3)n.t.b); - Gizmos.DrawLine((f3)n.t.b, (f3)n.t.c); - Gizmos.DrawLine((f3)n.t.c, (f3)n.t.a); - if (showNormal) { - Gizmos.DrawLine( - (f3)n.t.GetGravityCenter(), - (f3)n.t.GetGravityCenter() + (f3)n.normal * 0.5f - ); - } - } - } - - for (int i = 0; i < nodes.Count; i++) { - var n = nodes[i]; - if (i == currId && n.neighbors.Count > 3) { - Gizmos.color = Color.cyan; - n.neighbors.ForEach(nei => { - Gizmos.DrawLine((f3)nei.t.a, (f3)nei.t.b); - Gizmos.DrawLine((f3)nei.t.b, (f3)nei.t.c); - Gizmos.DrawLine((f3)nei.t.c, (f3)nei.t.a); - }); - Gizmos.color = Color.red; - Gizmos.DrawLine((f3)n.t.a, (f3)n.t.b); - Gizmos.DrawLine((f3)n.t.b, (f3)n.t.c); - Gizmos.DrawLine((f3)n.t.c, (f3)n.t.a); - } - } - } - -} diff --git a/Assets/IndexFinder.meta b/Assets/IndexFinder.meta new file mode 100644 index 0000000..7ce8889 --- /dev/null +++ b/Assets/IndexFinder.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4ba9aaef6b2971e4c876d2d65c293a6c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/IndexFinder/BindposeSample.cs b/Assets/IndexFinder/BindposeSample.cs new file mode 100644 index 0000000..034b526 --- /dev/null +++ b/Assets/IndexFinder/BindposeSample.cs @@ -0,0 +1,98 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using Unity.Mathematics; + +public class BindposeSample : MonoBehaviour { + protected SkinnedMeshRenderer skin; + protected Transform[] bones; + protected Mesh mesh; + [SerializeField] protected bool showTpose; + [SerializeField] protected int tid; + internal Vector3 vrt; + internal Vector3 nrm; + + void Start() { + skin = GetComponentInChildren(); + this.bones = skin.bones; + this.mesh = skin.sharedMesh; + var vtcs = new List(); + var tris = new List(); + mesh.GetVertices(vtcs); + mesh.GetTriangles(tris, 0); + + // get bindpose position + if (showTpose) { + var bindposes = mesh.bindposes; + for (var i = 0; i < bones.Length; i++) { + var p = bindposes[i].inverse * new Vector4(0, 0, 0, 1); + var g = GameObject.CreatePrimitive(PrimitiveType.Sphere); + g.transform.localScale *= 0.03f; + g.transform.position = p; + } + } + } + + void Update() { + var vtcs = new List(); + var nrms = new List(); + var tris = new List(); + + mesh.GetNormals(nrms); + mesh.GetVertices(vtcs); + mesh.GetTriangles(tris, 0); + + int vid = tris[tid * 3]; + var _vrt = vtcs[vid]; + var _nrm = nrms[vid]; + var _mtx = GetMatrixFromCompact(vid); + //var _mtx = GetMatrixFromUniform(vid); + + vrt = _mtx.MultiplyPoint3x4(_vrt); + nrm = _mtx.MultiplyVector(_nrm); + } + + + void OnDrawGizmos() { + Gizmos.color = Color.green; + Gizmos.DrawWireCube(vrt, 0.05f * Vector3.one); + Gizmos.DrawRay(vrt, nrm); + } + + Matrix4x4 GetMatrixFromCompact(int vid) { + var bspv = mesh.GetBonesPerVertex(); + var wgts = mesh.GetAllBoneWeights(); + var bwid = 0; + var bindposes = mesh.bindposes; + var mtx = new float4x4(); + for (var vi = 0; vi < mesh.vertexCount; vi++) { + for (var i = 0; i < bspv[vi]; i++) { + if (vi == vid) { + var bw = wgts[bwid]; + var bi = bw.boneIndex; + var mx = (float4x4)(bones[bi].localToWorldMatrix * bindposes[i]); + mtx += mx * bw.weight; + } + bwid++; + } + } + return mtx; + } + + Matrix4x4 GetMatrixFromUniform(int vid) { + var boneMatrices = new float4x4[skin.bones.Length]; + for (int i = 0; i < boneMatrices.Length; i++) + boneMatrices[i] = skin.bones[i].localToWorldMatrix * mesh.bindposes[i]; + + var weight = mesh.boneWeights[vid]; + var bm0 = boneMatrices[weight.boneIndex0]; + var bm1 = boneMatrices[weight.boneIndex1]; + var bm2 = boneMatrices[weight.boneIndex2]; + var bm3 = boneMatrices[weight.boneIndex3]; + var mtx = bm0 * weight.weight0 + + bm1 * weight.weight1 + + bm2 * weight.weight2 + + bm3 * weight.weight3; + return mtx; + } +} diff --git a/Assets/IndexFinder/BindposeSample.cs.meta b/Assets/IndexFinder/BindposeSample.cs.meta new file mode 100644 index 0000000..819f9ec --- /dev/null +++ b/Assets/IndexFinder/BindposeSample.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a78b158f23aa3cd4d9675c36b49222af +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/IndexFinder/BindposeSample.unity b/Assets/IndexFinder/BindposeSample.unity new file mode 100644 index 0000000..f97059f --- /dev/null +++ b/Assets/IndexFinder/BindposeSample.unity @@ -0,0 +1,393 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.44180414, g: 0.49073142, b: 0.57070124, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &355232247 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 355232250} + - component: {fileID: 355232249} + - component: {fileID: 355232248} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &355232248 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 355232247} + m_Enabled: 1 +--- !u!20 &355232249 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 355232247} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &355232250 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 355232247} + m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} + m_LocalPosition: {x: 0, y: 1, z: 3} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} +--- !u!1 &881920850 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 881920852} + - component: {fileID: 881920851} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &881920851 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 881920850} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &881920852 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 881920850} + m_LocalRotation: {x: 0.8215102, y: -0.13613658, z: 0.22012295, w: 0.5080687} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 116.53, y: -30, z: 0} +--- !u!1001 &1848737681 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + propertyPath: m_Name + value: Brooklyn Uprock + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5866666021909216657, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5866666021909216657, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + propertyPath: m_Controller + value: + objectReference: {fileID: 9100000, guid: 73bb74b32a75a774a8012289a8815c67, type: 2} + - target: {fileID: 5866666021909216657, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + propertyPath: m_ApplyRootMotion + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} +--- !u!1 &1848737682 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} + m_PrefabInstance: {fileID: 1848737681} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1848737683 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1848737682} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a78b158f23aa3cd4d9675c36b49222af, type: 3} + m_Name: + m_EditorClassIdentifier: + showTpose: 0 + tid: 14710 diff --git a/Assets/IndexFinder/BindposeSample.unity.meta b/Assets/IndexFinder/BindposeSample.unity.meta new file mode 100644 index 0000000..f55bb6e --- /dev/null +++ b/Assets/IndexFinder/BindposeSample.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e1dc9f59e74c89242befd3beaf2780fb +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/IndexFinder/IndexFinder.unity b/Assets/IndexFinder/IndexFinder.unity new file mode 100644 index 0000000..486b4cd --- /dev/null +++ b/Assets/IndexFinder/IndexFinder.unity @@ -0,0 +1,431 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 705507994} + m_IndirectSpecularColor: {r: 0.44657767, g: 0.4964127, b: 0.57481843, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &705507993 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 705507995} + - component: {fileID: 705507994} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &705507994 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 705507993} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 1 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &705507995 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 705507993} + m_LocalRotation: {x: 0, y: 0.9063079, z: -0.42261827, w: 0} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 50, y: 180, z: 0} +--- !u!1 &877564026 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 877564027} + - component: {fileID: 877564032} + - component: {fileID: 877564031} + - component: {fileID: 877564028} + - component: {fileID: 877564029} + m_Layer: 0 + m_Name: Target + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &877564027 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 877564026} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!64 &877564028 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 877564026} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 2147483647 + m_Mesh: {fileID: 7027127929025406325, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} +--- !u!114 &877564029 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 877564026} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 24dd4d5aad4496c45afb5a211eebbb24, type: 3} + m_Name: + m_EditorClassIdentifier: + filt: {fileID: 877564032} + tid: 10418 + tids: e438000064380000763900006b3b000096200000aa1f00006c210000f52200005921000013230000ee39000075360000553700005f3a0000f4610000d4620000 +--- !u!23 &877564031 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 877564026} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: e7c3ac673e27f2d4f9d7ceff8921777d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &877564032 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 877564026} + m_Mesh: {fileID: 7027127929025406325, guid: 65a8c4c5edba5ad49ac0250b38fe8b98, type: 3} +--- !u!1 &963194225 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 963194228} + - component: {fileID: 963194227} + - component: {fileID: 963194226} + - component: {fileID: 963194229} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &963194226 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963194225} + m_Enabled: 1 +--- !u!20 &963194227 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963194225} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 1.02 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &963194228 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963194225} + m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} + m_LocalPosition: {x: 0, y: 0.75, z: 2} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} +--- !u!114 &963194229 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963194225} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c49b4cc203aa6414fae5c798d1d0e7d6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EventMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_MaxRayIntersections: 0 diff --git a/Assets/IndexFinder/IndexFinder.unity.meta b/Assets/IndexFinder/IndexFinder.unity.meta new file mode 100644 index 0000000..21e0a8a --- /dev/null +++ b/Assets/IndexFinder/IndexFinder.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 37146f76e26d0fd4298c1fe1618a6c9f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/IndexFinder/RaycastGetIndices.cs b/Assets/IndexFinder/RaycastGetIndices.cs new file mode 100644 index 0000000..e507bdd --- /dev/null +++ b/Assets/IndexFinder/RaycastGetIndices.cs @@ -0,0 +1,10 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class RaycastGetIndices : MonoBehaviour { + public MeshFilter filt; + public int tid = - 1; + public List tids; + public void OnClickMesh() { tids.Add(tid); } +} diff --git a/Assets/IndexFinder/RaycastGetIndices.cs.meta b/Assets/IndexFinder/RaycastGetIndices.cs.meta new file mode 100644 index 0000000..5d77ea2 --- /dev/null +++ b/Assets/IndexFinder/RaycastGetIndices.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 24dd4d5aad4496c45afb5a211eebbb24 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/IndexFinder/RaycastGetIndicesEditor.cs b/Assets/IndexFinder/RaycastGetIndicesEditor.cs new file mode 100644 index 0000000..a5dfd3a --- /dev/null +++ b/Assets/IndexFinder/RaycastGetIndicesEditor.cs @@ -0,0 +1,62 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + +[CustomEditor(typeof(RaycastGetIndices))] +public class RaycastGetIndicesEditor : Editor { + List vrts = new List(); + List nrms = new List(); + List tris = new List(); + + void OnSceneGUI() { + var t = (RaycastGetIndices)target; + + var f = t.filt; + if (f != null) { + var m = f.sharedMesh; + m.GetVertices(vrts); + m.GetNormals(nrms); + m.GetTriangles(tris, 0); + } + + Handles.color = Color.red; + foreach (var tid in t.tids) { + var v1 = vrts[tris[tid * 3 + 0]]; + var v2 = vrts[tris[tid * 3 + 1]]; + var v3 = vrts[tris[tid * 3 + 2]]; + var n1 = nrms[tris[tid * 3 + 0]]; + var n2 = nrms[tris[tid * 3 + 1]]; + var n3 = nrms[tris[tid * 3 + 2]]; + Handles.DrawLines(new Vector3[] { + v1 + n1 * 0.0f, + v2 + n2 * 0.0f, + v2 + n2 * 0.0f, + v3 + n3 * 0.0f, + v3 + n3 * 0.0f, + v1 + n1 * 0.0f + }); + } + + var r = HandleUtility.GUIPointToWorldRay(Event.current.mousePosition); + if (!Physics.Raycast(r, out RaycastHit hit)) return; + + var c = (MeshCollider)hit.collider; + if (c == null || c.sharedMesh == null) return; + + t.tid = hit.triangleIndex; + + + + var e = Event.current; + var i = GUIUtility.GetControlID(FocusType.Passive); + switch (e.GetTypeForControl(i)) { + case EventType.MouseDown: + GUIUtility.hotControl = i; + if (e.button == 0) { t.OnClickMesh(); } + e.Use(); + break; + } + + } +} diff --git a/Assets/IndexFinder/RaycastGetIndicesEditor.cs.meta b/Assets/IndexFinder/RaycastGetIndicesEditor.cs.meta new file mode 100644 index 0000000..04aaf51 --- /dev/null +++ b/Assets/IndexFinder/RaycastGetIndicesEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b4a09dfbd909a39469d7289323fb1df7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages/unity-simplex-geometry b/Assets/Packages/unity-simplex-geometry index a8007b0..c656796 160000 --- a/Assets/Packages/unity-simplex-geometry +++ b/Assets/Packages/unity-simplex-geometry @@ -1 +1 @@ -Subproject commit a8007b0f0f7cd194b9c46073a26796439e6aa3d4 +Subproject commit c6567961b29d61ae3fd79cf3d2f0442d0e56485c diff --git a/README.md b/README.md index 19fd831..3d83f3d 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,16 @@ Realtime Fast convex generator for Unity. - +## 2D Convexhull + - +## 3D Convexhull + ## Usage +You can assign specific vertex on scene view to include convex calculation. + + using a [simplex geom submodule](https://github.com/komietty/unity-simplex-geometry), so update submodule first. diff --git a/Recordings/2d.gif b/Recordings/2d.gif new file mode 100644 index 0000000..49f62ac Binary files /dev/null and b/Recordings/2d.gif differ diff --git a/Recordings/3d.gif b/Recordings/3d.gif new file mode 100644 index 0000000..236f2ae Binary files /dev/null and b/Recordings/3d.gif differ diff --git a/Recordings/cap1.PNG b/Recordings/cap1.PNG new file mode 100644 index 0000000..bc83eec Binary files /dev/null and b/Recordings/cap1.PNG differ diff --git a/Recordings/cap2.PNG b/Recordings/cap2.PNG new file mode 100644 index 0000000..bd6f4f6 Binary files /dev/null and b/Recordings/cap2.PNG differ diff --git a/Recordings/capture3d.PNG b/Recordings/capture3d.PNG deleted file mode 100644 index d47aa19..0000000 Binary files a/Recordings/capture3d.PNG and /dev/null differ diff --git a/Recordings/output3d.gif b/Recordings/output3d.gif deleted file mode 100644 index 9f0663a..0000000 Binary files a/Recordings/output3d.gif and /dev/null differ diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index b543455..0a394b6 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -8,6 +8,27 @@ EditorUserSettings: RecentlyUsedScenePath-0: value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d flags: 0 + RecentlyUsedScenePath-1: + value: 2242470311464676020a092e036c7d0219181326352666053d3b1230e9af1a3df5a705eae2343a722c0ce6281d + flags: 0 + RecentlyUsedScenePath-2: + value: 2242470311464679040008321f305a23171a0826296708353a692e30e7ee3176f7e93ffdfe + flags: 0 + RecentlyUsedScenePath-3: + value: 224247031146467f0803036d3d2c5b151a0457083e27293b21301373d7f02637e1ec79c7e22d7f0f3a07e1394a2b0f36e613 + flags: 0 + RecentlyUsedScenePath-4: + value: 2242470311464679040008321f305a23171a082629670439232d0d3cf1e50739eff73aeca92f31352d1b + flags: 0 + RecentlyUsedScenePath-5: + value: 2242470311464672030a093a362a51141305571e3e21273e2a25181ae6f81231ece333fba92f31352d1b + flags: 0 + RecentlyUsedScenePath-6: + value: 2242470311464672030a093a362a511413055703222c23280b201337e7f27a2decee22f0 + flags: 0 + RecentlyUsedScenePath-7: + value: 224247031146467f0803036d3426521f580216233831 + flags: 0 vcSharedLogLevel: value: 0d5e400f0650 flags: 0