├── .gitignore
├── Assets
├── CTModeler.meta
├── CTModeler
│ ├── Editors.meta
│ ├── Editors
│ │ ├── LabelDrawer.cs
│ │ ├── LabelDrawer.cs.meta
│ │ ├── PolyhedronTriangleDrawer.cs
│ │ ├── PolyhedronTriangleDrawer.cs.meta
│ │ ├── ShapeEditor.cs
│ │ └── ShapeEditor.cs.meta
│ ├── Extra.meta
│ ├── Extra
│ │ ├── Default Shape Material.mat
│ │ ├── Default Shape Material.mat.meta
│ │ ├── Double Sided Standard.shader
│ │ └── Double Sided Standard.shader.meta
│ ├── Shapes.meta
│ ├── Shapes
│ │ ├── Base Classes.meta
│ │ ├── Base Classes
│ │ │ ├── Extruded.cs
│ │ │ ├── Extruded.cs.meta
│ │ │ ├── Parametric.cs
│ │ │ ├── Parametric.cs.meta
│ │ │ ├── Revolved.cs
│ │ │ ├── Revolved.cs.meta
│ │ │ ├── Shape.cs
│ │ │ └── Shape.cs.meta
│ │ ├── Concrete Shapes.meta
│ │ └── Concrete Shapes
│ │ │ ├── Cube.cs
│ │ │ ├── Cube.cs.meta
│ │ │ ├── Cup.cs
│ │ │ ├── Cup.cs.meta
│ │ │ ├── Disk.cs
│ │ │ ├── Disk.cs.meta
│ │ │ ├── Knot.cs
│ │ │ ├── Knot.cs.meta
│ │ │ ├── NoisySquare.cs
│ │ │ ├── NoisySquare.cs.meta
│ │ │ ├── OpenCylinder.cs
│ │ │ ├── OpenCylinder.cs.meta
│ │ │ ├── Polyhedron.cs
│ │ │ ├── Polyhedron.cs.meta
│ │ │ ├── Sphere.cs
│ │ │ ├── Sphere.cs.meta
│ │ │ ├── Square.cs
│ │ │ ├── Square.cs.meta
│ │ │ ├── Torus.cs
│ │ │ └── Torus.cs.meta
│ ├── Utilities.meta
│ └── Utilities
│ │ ├── EditorDrawNormals.cs
│ │ ├── EditorDrawNormals.cs.meta
│ │ ├── Noise.cs
│ │ ├── Noise.cs.meta
│ │ ├── SplineUtils.cs
│ │ └── SplineUtils.cs.meta
├── Example Scene.unity
├── Example Scene.unity.meta
├── Misc. Materials.meta
└── Misc. Materials
│ ├── Axes.mat
│ ├── Axes.mat.meta
│ ├── Blue Plastic.mat
│ ├── Blue Plastic.mat.meta
│ ├── Bricks.mat
│ ├── Bricks.mat.meta
│ ├── Bronze.mat
│ ├── Bronze.mat.meta
│ ├── Brown Plastic.mat
│ ├── Brown Plastic.mat.meta
│ ├── Bumpy Surface.mat
│ ├── Bumpy Surface.mat.meta
│ ├── Glossy Red.mat
│ ├── Glossy Red.mat.meta
│ ├── This is not a bagel.mat
│ ├── This is not a bagel.mat.meta
│ ├── This_is_not_a_bagel.jpg
│ ├── This_is_not_a_bagel.jpg.meta
│ ├── brick.png
│ ├── brick.png.meta
│ ├── normal_map_1.png
│ ├── normal_map_1.png.meta
│ ├── normal_map_2.jpg
│ ├── normal_map_2.jpg.meta
│ ├── xy.png
│ └── xy.png.meta
├── LICENSE.txt
├── ProjectSettings
├── AudioManager.asset
├── ClusterInputManager.asset
├── DynamicsManager.asset
├── EditorBuildSettings.asset
├── EditorSettings.asset
├── GraphicsSettings.asset
├── InputManager.asset
├── NavMeshAreas.asset
├── NetworkManager.asset
├── Physics2DSettings.asset
├── ProjectSettings.asset
├── ProjectVersion.txt
├── QualitySettings.asset
├── TagManager.asset
├── TimeManager.asset
├── UnityAdsSettings.asset
└── UnityConnectSettings.asset
├── README.md
└── README_media
├── cup.png
├── inspector.png
├── knot.png
├── noisy.png
├── polyhedron.png
└── thegang.png
/.gitignore:
--------------------------------------------------------------------------------
1 | /[Ll]ibrary/
2 | /[Tt]emp/
3 | /[Oo]bj/
4 | /[Bb]uild/
5 | /[Bb]uilds/
6 | /Assets/AssetStoreTools*
7 |
8 | # Autogenerated VS/MD/Consulo solution and project files
9 | ExportedObj/
10 | .consulo/
11 | *.csproj
12 | *.unityproj
13 | *.sln
14 | *.suo
15 | *.tmp
16 | *.user
17 | *.userprefs
18 | *.pidb
19 | *.booproj
20 | *.svd
21 |
22 |
23 | # Unity3D generated meta files
24 | *.pidb.meta
25 |
26 | # Unity3D Generated File On Crash Reports
27 | sysinfo.txt
28 |
29 | # Builds
30 | *.apk
31 | *.unitypackage
32 | *.swp
33 |
--------------------------------------------------------------------------------
/Assets/CTModeler.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 847482cdb13984639ba043e275fa695c
3 | folderAsset: yes
4 | timeCreated: 1478377360
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Editors.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8f5757bf34e84446890107899aa298e3
3 | folderAsset: yes
4 | timeCreated: 1480019492
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Editors/LabelDrawer.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEditor;
3 | using System.Collections;
4 |
5 | namespace CT {
6 | ///
7 | /// Add this attribute to a public variable on a MonoBehaviour to allow for text to be
8 | /// printed above the variable in the Unity inspector. Supports Unity's limited rich text
9 | /// subset of HTML.
10 | ///
11 | /// Example usage:
12 | ///
13 | /// [Label("This text will be shown above Num Things in the inspector")]
14 | /// public int numThings;
15 | ///
16 | public class Label : PropertyAttribute {
17 | public string text;
18 |
19 | public Label(string text) {
20 | this.text = text;
21 | }
22 | }
23 |
24 | ///
25 | /// Decorator drawer that takes care of actually drawing the text from the above Label attribute.
26 | ///
27 | [CustomPropertyDrawer(typeof(Label))]
28 | public class LabelDrawer : DecoratorDrawer {
29 |
30 | string text { get { return ((Label)attribute).text; } }
31 |
32 | GUIStyle richTextStyle = new GUIStyle();
33 |
34 | public LabelDrawer() {
35 | richTextStyle.richText = true;
36 | }
37 |
38 | public override float GetHeight() {
39 | return base.GetHeight() * text.Split('\n').Length;
40 | }
41 |
42 | public override void OnGUI(Rect position) {
43 | EditorGUI.LabelField(position, text, richTextStyle);
44 | }
45 | }
46 | }
--------------------------------------------------------------------------------
/Assets/CTModeler/Editors/LabelDrawer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2f1ba9c1b525f495a86440c11b9b181d
3 | timeCreated: 1480030953
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Editors/PolyhedronTriangleDrawer.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEditor;
3 | using System.Collections;
4 |
5 | namespace CT {
6 | ///
7 | /// Custom editor that draws the Triangles in a polyhedron a bit nicer and all in one line in the
8 | /// inspector, similar to the way Unity draws Vector3s.
9 | ///
10 | [CustomPropertyDrawer(typeof(Polyhedron.Triangle))]
11 | public class PolyhedronTriangleDrawer : PropertyDrawer {
12 | public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) {
13 | using(var pScope = new EditorGUI.PropertyScope(position, label, property)) {
14 | position = EditorGUI.PrefixLabel(
15 | position, GUIUtility.GetControlID(FocusType.Passive), label);
16 |
17 | int indentLevel = EditorGUI.indentLevel;
18 | EditorGUI.indentLevel = 0;
19 |
20 | float width = position.width / 3f;
21 | float labelWidth = 20f;
22 |
23 | FieldWithLabel(new Rect(position.x, position.y, width, position.height),
24 | "V1", labelWidth, property.FindPropertyRelative("v1"));
25 |
26 | FieldWithLabel(new Rect(position.x + width, position.y, width, position.height),
27 | "V2", labelWidth, property.FindPropertyRelative("v2"));
28 |
29 | FieldWithLabel(new Rect(position.x + width * 2, position.y, width, position.height),
30 | "V3", labelWidth, property.FindPropertyRelative("v3"));
31 |
32 | EditorGUI.indentLevel = indentLevel;
33 | }
34 | }
35 |
36 | private void FieldWithLabel(Rect position, string label, float labelWidth,
37 | SerializedProperty property)
38 | {
39 | EditorGUI.HandlePrefixLabel(
40 | position,
41 | new Rect(position.x, position.y, labelWidth, position.height),
42 | new GUIContent(label));
43 |
44 | EditorGUI.PropertyField(
45 | new Rect(position.x + labelWidth, position.y,
46 | position.width - labelWidth - 5, position.height),
47 | property,
48 | GUIContent.none);
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/Assets/CTModeler/Editors/PolyhedronTriangleDrawer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 04e06af8a1b3740c580985932e1dfdc9
3 | timeCreated: 1480019691
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Editors/ShapeEditor.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEditor;
3 | using System.Collections;
4 |
5 | namespace CT {
6 | ///
7 | /// Custom inspector interface for all CT Shapes. Keeps most everything the same, but adds
8 | /// a "Regenerate Mesh" button to the bottom of the inspector to allow you to manually regenerate
9 | /// the mesh for any shape when needed.
10 | ///
11 | [CustomEditor(typeof(Shape), true)]
12 | [CanEditMultipleObjects]
13 | public class ShapeEditor : Editor {
14 | public override void OnInspectorGUI() {
15 | serializedObject.Update();
16 | DrawDefaultInspector();
17 |
18 | Shape s = (Shape)target;
19 | if(GUILayout.Button("Regenerate Mesh")) {
20 | s.RegenerateMesh();
21 | }
22 | serializedObject.ApplyModifiedProperties();
23 | }
24 | }
25 |
26 | }
--------------------------------------------------------------------------------
/Assets/CTModeler/Editors/ShapeEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c276d836da06b45acb5377b0ac17d586
3 | timeCreated: 1480019507
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Extra.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: efce02d49c89b48f9a1012285635c860
3 | folderAsset: yes
4 | timeCreated: 1479760435
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Extra/Default Shape Material.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_PrefabParentObject: {fileID: 0}
8 | m_PrefabInternal: {fileID: 0}
9 | m_Name: Default Shape Material
10 | m_Shader: {fileID: 4800000, guid: 02615e2c055b647eab1fd224d086601a, type: 3}
11 | m_ShaderKeywords: _EMISSION
12 | m_LightmapFlags: 1
13 | m_CustomRenderQueue: -1
14 | stringTagMap: {}
15 | m_SavedProperties:
16 | serializedVersion: 2
17 | m_TexEnvs:
18 | - first:
19 | name: _BumpMap
20 | second:
21 | m_Texture: {fileID: 0}
22 | m_Scale: {x: 1, y: 1}
23 | m_Offset: {x: 0, y: 0}
24 | - first:
25 | name: _DetailAlbedoMap
26 | second:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - first:
31 | name: _DetailMask
32 | second:
33 | m_Texture: {fileID: 0}
34 | m_Scale: {x: 1, y: 1}
35 | m_Offset: {x: 0, y: 0}
36 | - first:
37 | name: _DetailNormalMap
38 | second:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - first:
43 | name: _EmissionMap
44 | second:
45 | m_Texture: {fileID: 0}
46 | m_Scale: {x: 1, y: 1}
47 | m_Offset: {x: 0, y: 0}
48 | - first:
49 | name: _MainTex
50 | second:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - first:
55 | name: _MetallicGlossMap
56 | second:
57 | m_Texture: {fileID: 0}
58 | m_Scale: {x: 1, y: 1}
59 | m_Offset: {x: 0, y: 0}
60 | - first:
61 | name: _OcclusionMap
62 | second:
63 | m_Texture: {fileID: 0}
64 | m_Scale: {x: 1, y: 1}
65 | m_Offset: {x: 0, y: 0}
66 | - first:
67 | name: _ParallaxMap
68 | second:
69 | m_Texture: {fileID: 0}
70 | m_Scale: {x: 1, y: 1}
71 | m_Offset: {x: 0, y: 0}
72 | m_Floats:
73 | - first:
74 | name: _BumpScale
75 | second: 1
76 | - first:
77 | name: _Cutoff
78 | second: 0.5
79 | - first:
80 | name: _DetailNormalMapScale
81 | second: 1
82 | - first:
83 | name: _DstBlend
84 | second: 0
85 | - first:
86 | name: _GlossMapScale
87 | second: 1
88 | - first:
89 | name: _Glossiness
90 | second: 0.5
91 | - first:
92 | name: _GlossyReflections
93 | second: 1
94 | - first:
95 | name: _Metallic
96 | second: 0
97 | - first:
98 | name: _Mode
99 | second: 0
100 | - first:
101 | name: _OcclusionStrength
102 | second: 1
103 | - first:
104 | name: _Parallax
105 | second: 0.02
106 | - first:
107 | name: _SmoothnessTextureChannel
108 | second: 0
109 | - first:
110 | name: _SpecularHighlights
111 | second: 1
112 | - first:
113 | name: _SrcBlend
114 | second: 1
115 | - first:
116 | name: _UVSec
117 | second: 0
118 | - first:
119 | name: _ZWrite
120 | second: 1
121 | m_Colors:
122 | - first:
123 | name: _Color
124 | second: {r: 1, g: 1, b: 1, a: 1}
125 | - first:
126 | name: _EmissionColor
127 | second: {r: 0, g: 0, b: 0, a: 1}
128 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Extra/Default Shape Material.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ef3ea4f181dd54fb8aeeb205431f3c1c
3 | timeCreated: 1479760226
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Extra/Double Sided Standard.shader:
--------------------------------------------------------------------------------
1 | Shader "CTModeler/Double Sided Standard"
2 | {
3 | Properties
4 | {
5 | _Color("Color", Color) = (1,1,1,1)
6 | _MainTex("Albedo", 2D) = "white" {}
7 |
8 | _Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
9 |
10 | _Glossiness("Smoothness", Range(0.0, 1.0)) = 0.5
11 | _GlossMapScale("Smoothness Scale", Range(0.0, 1.0)) = 1.0
12 | [Enum(Metallic Alpha,0,Albedo Alpha,1)] _SmoothnessTextureChannel ("Smoothness texture channel", Float) = 0
13 |
14 | [Gamma] _Metallic("Metallic", Range(0.0, 1.0)) = 0.0
15 | _MetallicGlossMap("Metallic", 2D) = "white" {}
16 |
17 | [ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 1.0
18 | [ToggleOff] _GlossyReflections("Glossy Reflections", Float) = 1.0
19 |
20 | _BumpScale("Scale", Float) = 1.0
21 | _BumpMap("Normal Map", 2D) = "bump" {}
22 |
23 | _Parallax ("Height Scale", Range (0.005, 0.08)) = 0.02
24 | _ParallaxMap ("Height Map", 2D) = "black" {}
25 |
26 | _OcclusionStrength("Strength", Range(0.0, 1.0)) = 1.0
27 | _OcclusionMap("Occlusion", 2D) = "white" {}
28 |
29 | _EmissionColor("Color", Color) = (0,0,0)
30 | _EmissionMap("Emission", 2D) = "white" {}
31 |
32 | _DetailMask("Detail Mask", 2D) = "white" {}
33 |
34 | _DetailAlbedoMap("Detail Albedo x2", 2D) = "grey" {}
35 | _DetailNormalMapScale("Scale", Float) = 1.0
36 | _DetailNormalMap("Normal Map", 2D) = "bump" {}
37 |
38 | [Enum(UV0,0,UV1,1)] _UVSec ("UV Set for secondary textures", Float) = 0
39 |
40 |
41 | // Blending state
42 | [HideInInspector] _Mode ("__mode", Float) = 0.0
43 | [HideInInspector] _SrcBlend ("__src", Float) = 1.0
44 | [HideInInspector] _DstBlend ("__dst", Float) = 0.0
45 | [HideInInspector] _ZWrite ("__zw", Float) = 1.0
46 | }
47 |
48 | CGINCLUDE
49 | #define UNITY_SETUP_BRDF_INPUT MetallicSetup
50 | ENDCG
51 |
52 | SubShader
53 | {
54 | Tags { "RenderType"="Opaque" "PerformanceChecks"="False" }
55 | LOD 300
56 | Cull Off
57 |
58 | // ------------------------------------------------------------------
59 | // Base forward pass (directional light, emission, lightmaps, ...)
60 | Pass
61 | {
62 | Name "FORWARD"
63 | Tags { "LightMode" = "ForwardBase" }
64 |
65 | Blend [_SrcBlend] [_DstBlend]
66 | ZWrite [_ZWrite]
67 |
68 | CGPROGRAM
69 | #pragma target 3.0
70 |
71 | // -------------------------------------
72 |
73 | #pragma shader_feature _NORMALMAP
74 | #pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
75 | #pragma shader_feature _EMISSION
76 | #pragma shader_feature _METALLICGLOSSMAP
77 | #pragma shader_feature ___ _DETAIL_MULX2
78 | #pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
79 | #pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
80 | #pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
81 | #pragma shader_feature _PARALLAXMAP
82 |
83 | #pragma multi_compile_fwdbase
84 | #pragma multi_compile_fog
85 |
86 | #pragma vertex vertBase
87 | #pragma fragment fragBase
88 | #include "UnityStandardCoreForward.cginc"
89 |
90 | ENDCG
91 | }
92 | // ------------------------------------------------------------------
93 | // Additive forward pass (one light per pass)
94 | Pass
95 | {
96 | Name "FORWARD_DELTA"
97 | Tags { "LightMode" = "ForwardAdd" }
98 | Blend [_SrcBlend] One
99 | Fog { Color (0,0,0,0) } // in additive pass fog should be black
100 | ZWrite Off
101 | ZTest LEqual
102 |
103 | CGPROGRAM
104 | #pragma target 3.0
105 |
106 | // -------------------------------------
107 |
108 |
109 | #pragma shader_feature _NORMALMAP
110 | #pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
111 | #pragma shader_feature _METALLICGLOSSMAP
112 | #pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
113 | #pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
114 | #pragma shader_feature ___ _DETAIL_MULX2
115 | #pragma shader_feature _PARALLAXMAP
116 |
117 | #pragma multi_compile_fwdadd_fullshadows
118 | #pragma multi_compile_fog
119 |
120 |
121 | #pragma vertex vertAdd
122 | #pragma fragment fragAdd
123 | #include "UnityStandardCoreForward.cginc"
124 |
125 | ENDCG
126 | }
127 | // ------------------------------------------------------------------
128 | // Shadow rendering pass
129 | Pass {
130 | Name "ShadowCaster"
131 | Tags { "LightMode" = "ShadowCaster" }
132 |
133 | ZWrite On ZTest LEqual
134 |
135 | CGPROGRAM
136 | #pragma target 3.0
137 |
138 | // -------------------------------------
139 |
140 |
141 | #pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
142 | #pragma multi_compile_shadowcaster
143 |
144 | #pragma vertex vertShadowCaster
145 | #pragma fragment fragShadowCaster
146 |
147 | #include "UnityStandardShadow.cginc"
148 |
149 | ENDCG
150 | }
151 | // ------------------------------------------------------------------
152 | // Deferred pass
153 | Pass
154 | {
155 | Name "DEFERRED"
156 | Tags { "LightMode" = "Deferred" }
157 |
158 | CGPROGRAM
159 | #pragma target 3.0
160 | #pragma exclude_renderers nomrt
161 |
162 |
163 | // -------------------------------------
164 |
165 | #pragma shader_feature _NORMALMAP
166 | #pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
167 | #pragma shader_feature _EMISSION
168 | #pragma shader_feature _METALLICGLOSSMAP
169 | #pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
170 | #pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
171 | #pragma shader_feature ___ _DETAIL_MULX2
172 | #pragma shader_feature _PARALLAXMAP
173 |
174 | #pragma multi_compile ___ UNITY_HDR_ON
175 | #pragma multi_compile LIGHTMAP_OFF LIGHTMAP_ON
176 | #pragma multi_compile ___ DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE
177 | #pragma multi_compile DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON
178 |
179 | #pragma vertex vertDeferred
180 | #pragma fragment fragDeferred
181 |
182 | #include "UnityStandardCore.cginc"
183 |
184 | ENDCG
185 | }
186 |
187 | // ------------------------------------------------------------------
188 | // Extracts information for lightmapping, GI (emission, albedo, ...)
189 | // This pass it not used during regular rendering.
190 | Pass
191 | {
192 | Name "META"
193 | Tags { "LightMode"="Meta" }
194 |
195 | Cull Off
196 |
197 | CGPROGRAM
198 | #pragma vertex vert_meta
199 | #pragma fragment frag_meta
200 |
201 | #pragma shader_feature _EMISSION
202 | #pragma shader_feature _METALLICGLOSSMAP
203 | #pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
204 | #pragma shader_feature ___ _DETAIL_MULX2
205 |
206 | #include "UnityStandardMeta.cginc"
207 | ENDCG
208 | }
209 | }
210 |
211 | SubShader
212 | {
213 | Tags { "RenderType"="Opaque" "PerformanceChecks"="False" }
214 | LOD 150
215 |
216 | // ------------------------------------------------------------------
217 | // Base forward pass (directional light, emission, lightmaps, ...)
218 | Pass
219 | {
220 | Name "FORWARD"
221 | Tags { "LightMode" = "ForwardBase" }
222 |
223 | Blend [_SrcBlend] [_DstBlend]
224 | ZWrite [_ZWrite]
225 |
226 | CGPROGRAM
227 | #pragma target 2.0
228 |
229 | #pragma shader_feature _NORMALMAP
230 | #pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
231 | #pragma shader_feature _EMISSION
232 | #pragma shader_feature _METALLICGLOSSMAP
233 | #pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
234 | #pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
235 | #pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
236 | // SM2.0: NOT SUPPORTED shader_feature ___ _DETAIL_MULX2
237 | // SM2.0: NOT SUPPORTED shader_feature _PARALLAXMAP
238 |
239 | #pragma skip_variants SHADOWS_SOFT DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE
240 |
241 | #pragma multi_compile_fwdbase
242 | #pragma multi_compile_fog
243 |
244 | #pragma vertex vertBase
245 | #pragma fragment fragBase
246 | #include "UnityStandardCoreForward.cginc"
247 |
248 | ENDCG
249 | }
250 | // ------------------------------------------------------------------
251 | // Additive forward pass (one light per pass)
252 | Pass
253 | {
254 | Name "FORWARD_DELTA"
255 | Tags { "LightMode" = "ForwardAdd" }
256 | Blend [_SrcBlend] One
257 | Fog { Color (0,0,0,0) } // in additive pass fog should be black
258 | ZWrite Off
259 | ZTest LEqual
260 |
261 | CGPROGRAM
262 | #pragma target 2.0
263 |
264 | #pragma shader_feature _NORMALMAP
265 | #pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
266 | #pragma shader_feature _METALLICGLOSSMAP
267 | #pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
268 | #pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
269 | #pragma shader_feature ___ _DETAIL_MULX2
270 | // SM2.0: NOT SUPPORTED shader_feature _PARALLAXMAP
271 | #pragma skip_variants SHADOWS_SOFT
272 |
273 | #pragma multi_compile_fwdadd_fullshadows
274 | #pragma multi_compile_fog
275 |
276 | #pragma vertex vertAdd
277 | #pragma fragment fragAdd
278 | #include "UnityStandardCoreForward.cginc"
279 |
280 | ENDCG
281 | }
282 | // ------------------------------------------------------------------
283 | // Shadow rendering pass
284 | Pass {
285 | Name "ShadowCaster"
286 | Tags { "LightMode" = "ShadowCaster" }
287 |
288 | ZWrite On ZTest LEqual
289 |
290 | CGPROGRAM
291 | #pragma target 2.0
292 |
293 | #pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
294 | #pragma skip_variants SHADOWS_SOFT
295 | #pragma multi_compile_shadowcaster
296 |
297 | #pragma vertex vertShadowCaster
298 | #pragma fragment fragShadowCaster
299 |
300 | #include "UnityStandardShadow.cginc"
301 |
302 | ENDCG
303 | }
304 |
305 | // ------------------------------------------------------------------
306 | // Extracts information for lightmapping, GI (emission, albedo, ...)
307 | // This pass it not used during regular rendering.
308 | Pass
309 | {
310 | Name "META"
311 | Tags { "LightMode"="Meta" }
312 |
313 | Cull Off
314 |
315 | CGPROGRAM
316 | #pragma vertex vert_meta
317 | #pragma fragment frag_meta
318 |
319 | #pragma shader_feature _EMISSION
320 | #pragma shader_feature _METALLICGLOSSMAP
321 | #pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
322 | #pragma shader_feature ___ _DETAIL_MULX2
323 |
324 | #include "UnityStandardMeta.cginc"
325 | ENDCG
326 | }
327 | }
328 |
329 |
330 | FallBack "VertexLit"
331 | CustomEditor "StandardShaderGUI"
332 | }
333 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Extra/Double Sided Standard.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 02615e2c055b647eab1fd224d086601a
3 | timeCreated: 1479761695
4 | licenseType: Free
5 | ShaderImporter:
6 | defaultTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4e762714925ed41db810b831b96527f1
3 | folderAsset: yes
4 | timeCreated: 1479760386
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Base Classes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b07a9f7dbb4524680982fe4764f78fd0
3 | folderAsset: yes
4 | timeCreated: 1479847566
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Base Classes/Extruded.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | namespace CT {
5 | ///
6 | /// Class for parametric objects defined by extruding a shape along a path.
7 | ///
8 | public abstract class Extruded : Parametric {
9 |
10 | ///
11 | /// This function should be overriden to define the 2D profile of the shape being extruded.
12 | ///
13 | /// For example, a simple circle would just be returning (cos(2pi*u), sin(2pi*u)).
14 | ///
15 | /// A position on the XY plane for the given u and v parameters.
16 | /// Goes from 0 to 1 perpendicular to the path.
17 | /// Goes from 0 at the beginning of the path to 1 at the end of the path.
18 | ///
19 | protected abstract Vector2 ExtrusionProfileFunction(float u, float v);
20 |
21 | ///
22 | /// This function should be overriden to define the path the shape is being extruded along.
23 | ///
24 | /// The point in 3D space where the path would be at a given v.
25 | /// Goes from 0 at the beginning of the path to 1 at the end of it.
26 | protected abstract Vector3 ExtrusionPathFunction(float v);
27 |
28 | protected sealed override Vector3 ParametricFunction(float u, float v) {
29 | Vector2 xy = ExtrusionProfileFunction(u, v);
30 | Vector3 path = ExtrusionPathFunction(v);
31 | Vector3 path2 = ExtrusionPathFunction(v + 0.001f);
32 | Vector3 dz = (path2 - path).normalized;
33 | Vector3 dx = Vector3.right;
34 | Vector3 dy = Vector3.Cross(dx, dz).normalized;
35 | return new Vector3(path.x + xy.x * dx.x + xy.y * dy.x,
36 | path.y + xy.x * dx.y + xy.y * dy.y,
37 | path.z + xy.x * dx.z + xy.y * dy.z);
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Base Classes/Extruded.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9844468e6d1674c9ea2b723aec6abac3
3 | timeCreated: 1478644575
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Base Classes/Parametric.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System;
3 | using System.Collections;
4 |
5 | namespace CT {
6 | ///
7 | /// Base class for a shape defined by a parametric function.
8 | ///
9 | public abstract class Parametric : Shape {
10 | ///
11 | /// The number of triangles to have along the direction of the U parameter.
12 | ///
13 | public int numU = 30;
14 | ///
15 | /// The number of triangles to have along the direction of the V parameter.
16 | ///
17 | public int numV = 30;
18 |
19 | ///
20 | /// Override this function to implement the parametric function that defines this mesh.
21 | ///
22 | /// The surface of the mesh at the given U and V parametric coordinates.
23 | /// The first parametric coordinate, varies between 0 and 1.
24 | /// The second parametric coordinate, varies between 0 and 1.
25 | protected abstract Vector3 ParametricFunction(float u, float v);
26 |
27 | protected sealed override Mesh CreateMesh() {
28 | float divU = 1.0f / numU;
29 | float divV = 1.0f / numV;
30 |
31 | int numVertices = (numU + 1) * 2 * numV + numV;
32 | Vector3[] vertices = new Vector3[numVertices];
33 | Vector4[] tangents = new Vector4[numVertices];
34 | Vector3[] normals = new Vector3[numVertices];
35 | Vector2[] uvs = new Vector2[numVertices];
36 | int[] triangles = GenerateTriangleStripIndices(numVertices - 2);
37 |
38 | int currVertIndex = 0;
39 |
40 | Action addVertex = (float inU, float inV) => {
41 | // Compute parametric vertex
42 | vertices[currVertIndex] = ParametricFunction(Mathf.Clamp01(inU), Mathf.Clamp01(inV));
43 |
44 | Vector3 uTangent = Vector3.zero;
45 | Vector3 vTangent = Vector3.zero;
46 | Vector3 normal = Vector3.zero;
47 | GetNormalAndTangents(inU, inV, divU, divV, out uTangent, out vTangent, out normal);
48 |
49 | if(normal == Vector3.zero) {
50 | // We're likely at a singularity or pole in the model.
51 | normal = GetNormalAtSingularity(inU, inV, divU, divV);
52 | }
53 |
54 | tangents[currVertIndex] = uTangent;
55 | normals[currVertIndex] = normal;
56 | uvs[currVertIndex] = new Vector2(inU, inV);
57 |
58 | currVertIndex++;
59 | };
60 |
61 | float u = 0;
62 | float d = divU;
63 | // Zigzag across rows to form a triangle strip.
64 | for(int j = 0; j < numV; j++) {
65 | float v = j * divV;
66 | for(int i = 0; i <= numU; i++) {
67 | addVertex(u, v);
68 | addVertex(u, v + divV);
69 | if(i < numU) {
70 | u += d;
71 | }
72 | else {
73 | addVertex(u, v);
74 | }
75 | }
76 | d = -d;
77 | }
78 |
79 | Mesh mesh = new Mesh();
80 | mesh.vertices = vertices;
81 | mesh.tangents = tangents;
82 | mesh.normals = normals;
83 | mesh.uv = uvs;
84 | mesh.triangles = triangles;
85 |
86 | return mesh;
87 | }
88 |
89 | ///
90 | /// If you're at a pole in the model, like the ends of a sphere, you can't take the
91 | /// cross product of the two tangents to get the normal, because varying one of the
92 | /// parametric directions leaves you at the same location in 3D space, leading one of
93 | /// the tangents to be zero when attempting to calculate them by finite differencing.
94 | /// To remedy this, we take the normals at 4 points near the pole and average them, to try
95 | /// and get an approximation of the normal.
96 | ///
97 | /// An approximation of the normal at the singularity.
98 | /// U parametric coordinate.
99 | /// V parametric coordinate.
100 | /// The spacing between vertices along the U axis.
101 | /// The spacing between vertices along the V axis.
102 | private Vector3 GetNormalAtSingularity(float inU, float inV, float divU, float divV)
103 | {
104 | // Take the normal at four different points nearby this vertex, then average them.
105 | Vector2[] nearbyPoints = {
106 | new Vector2(Mathf.Clamp01(inU + divU / 100), Mathf.Clamp01(inV + divV / 100)),
107 | new Vector2(Mathf.Clamp01(inU + divU / 100), Mathf.Clamp01(inV - divV / 100)),
108 | new Vector2(Mathf.Clamp01(inU - divU / 100), Mathf.Clamp01(inV - divV / 100)),
109 | new Vector2(Mathf.Clamp01(inU - divU / 100), Mathf.Clamp01(inV + divV / 100))
110 | };
111 |
112 | Vector3 averageNormal = Vector3.zero;
113 | for(int i = 0; i < nearbyPoints.Length; i++) {
114 | float currU = nearbyPoints[i].x;
115 | float currV = nearbyPoints[i].y;
116 |
117 | Vector3 uTangent = Vector3.zero;
118 | Vector3 vTangent = Vector3.zero;
119 | Vector3 normal = Vector3.zero;
120 | GetNormalAndTangents(currU, currV, divU, divV, out uTangent, out vTangent, out normal);
121 |
122 | averageNormal = averageNormal * i / (i + 1) + normal / (i + 1);
123 | }
124 |
125 | return averageNormal.normalized;
126 | }
127 |
128 | ///
129 | /// Gets the normal and tangents of the surface at the given parametric coordinates.
130 | ///
131 | /// U parametric coordinate.
132 | /// V parametric coordinate.
133 | /// The spacing between vertices along the U axis.
134 | /// The spacing between vertices along the V axis.
135 | /// Gets set to the tangent in the u direction.
136 | /// Gets set to the tangent in the v direction.
137 | /// Gets set to the normal vector.
138 | private void GetNormalAndTangents(float inU, float inV, float divU, float divV,
139 | out Vector3 uTangent, out Vector3 vTangent,
140 | out Vector3 normal)
141 | {
142 | // Approximate tangents via finite differencing
143 | Vector3 pu = ParametricFunction(inU + divU / 200, inV);
144 | Vector3 nu = ParametricFunction(inU - divU / 200, inV);
145 | Vector3 pv = ParametricFunction(inU, inV + divV / 200);
146 | Vector3 nv = ParametricFunction(inU, inV - divV / 200);
147 |
148 | uTangent = (pu - nu).normalized;
149 | vTangent = (pv - nv).normalized;
150 | normal = Vector3.Cross(vTangent, uTangent).normalized;
151 | }
152 | }
153 | }
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Base Classes/Parametric.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 90da71d84706d490ba11268fe3dd882c
3 | timeCreated: 1478396373
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Base Classes/Revolved.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | namespace CT {
5 | ///
6 | /// This implements support for a mesh defined by a surface of revolution around the Z axis.
7 | ///
8 | public abstract class Revolved : Parametric {
9 |
10 | ///
11 | /// Override this function to define the shape of the revolved surface.
12 | ///
13 | /// The point on the XY plane that will be revolved around the axis.
14 | /// The parameter, which varies from 0 to 1.
15 | protected abstract Vector2 RevolutionFunction(float t);
16 |
17 | protected sealed override Vector3 ParametricFunction(float u, float v) {
18 | float theta = 2 * Mathf.PI * -u;
19 | Vector2 xz = RevolutionFunction(v);
20 | return new Vector3(xz.x * Mathf.Cos(theta),
21 | xz.x * Mathf.Sin(theta),
22 | xz.y);
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Base Classes/Revolved.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a59be0361e8804e1fac3e156f87d69fe
3 | timeCreated: 1478557622
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Base Classes/Shape.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | namespace CT {
5 | ///
6 | /// This is the base class for all shapes in the CT modeler.
7 | ///
8 | [RequireComponent(typeof(MeshFilter))]
9 | [RequireComponent(typeof(MeshRenderer))]
10 | public abstract class Shape : MonoBehaviour {
11 |
12 | ///
13 | /// Turn this on in the inspector to allow the mesh to be regenerated every time a variable
14 | /// is changed in the inspector. If turned off, the shape waits for you to click "Regenerate
15 | /// mesh" first.
16 | ///
17 | public bool liveUpdatingInEditor = true;
18 |
19 | ///
20 | /// This function is called whenever this object needs to regenerate its mesh.
21 | /// You should override this in your derived classes and return a mesh with the correct
22 | /// vertices, normals, UVs, and so on.
23 | ///
24 | /// The mesh you want this object to have.
25 | protected abstract Mesh CreateMesh();
26 |
27 | ///
28 | /// Standard initialization function.
29 | ///
30 | public virtual void Start() {
31 | RegenerateMesh();
32 | }
33 |
34 | ///
35 | /// Standard update function.
36 | ///
37 | public virtual void Update() {
38 | }
39 |
40 | ///
41 | /// Generates a set of indices that are suitable for assigning to the mesh.triangles array
42 | /// for any object that has its vertices in a triangle strip.
43 | ///
44 | /// The full list of indices for all triangles.
45 | /// The number of triangles you have.
46 | protected int[] GenerateTriangleStripIndices(int numTris) {
47 | int[] tris = new int[numTris * 3];
48 | for(int i = 0; i < numTris; i++) {
49 | if(i % 2 == 0) {
50 | tris[i * 3] = i;
51 | tris[i * 3 + 1] = i + 1;
52 | tris[i * 3 + 2] = i + 2;
53 | }
54 | else {
55 | tris[i * 3] = i + 1;
56 | tris[i * 3 + 1] = i;
57 | tris[i * 3 + 2] = i + 2;
58 | }
59 | }
60 | return tris;
61 | }
62 |
63 | ///
64 | /// This is called every time a value is changed in the inspector.
65 | ///
66 | public virtual void OnValidate() {
67 | if(liveUpdatingInEditor) {
68 | RegenerateMesh();
69 | }
70 | }
71 |
72 | ///
73 | /// Recalculates and regenerates the mesh for this shape.
74 | ///
75 | public void RegenerateMesh() {
76 | MeshFilter meshFilter = GetComponent();
77 | meshFilter.mesh = CreateMesh();
78 | }
79 | }
80 | }
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Base Classes/Shape.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 82dcd187eb15946d0ac2df3716d1884f
3 | timeCreated: 1478380953
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5e8cc8c50159c42728158d5541934b68
3 | folderAsset: yes
4 | timeCreated: 1479847610
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/Cube.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | namespace CT {
5 | ///
6 | /// A basic 2x2x2 axis-aligned cube.
7 | ///
8 | public class Cube : Shape {
9 | protected override Mesh CreateMesh() {
10 | Vector3[] vertices = new Vector3[6 * 4];
11 | Vector4[] tangents = new Vector4[6 * 4];
12 | Vector3[] normals = new Vector3[6 * 4];
13 | Vector2[] uvs = new Vector2[6 * 4];
14 | int[] triangles = new int[6 * 2 * 3];
15 |
16 | Vector3[,] faces = new Vector3[6, 3] {
17 | { new Vector3(1, 0, 0), new Vector3(0, 1, 0), new Vector3(0, 0, 1) },
18 | { new Vector3(0, 1, 0), new Vector3(0, 0, 1), new Vector3(1, 0, 0) },
19 | { new Vector3(0, 0, 1), new Vector3(1, 0, 0), new Vector3(0, 1, 0) },
20 | { new Vector3(0, 0, -1), new Vector3(-1, 0, 0), new Vector3(0, 1, 0) },
21 | { new Vector3(0, -1, 0), new Vector3(0, 0, -1), new Vector3(1, 0, 0) },
22 | { new Vector3(-1, 0, 0), new Vector3(0, -1, 0), new Vector3(0, 0, 1) },
23 | };
24 |
25 | Mesh mesh = new Mesh();
26 |
27 | for(int i = 0; i < 6; i++) {
28 | vertices[i * 4 + 0] = faces[i, 0] - faces[i, 1] - faces[i, 2];
29 | vertices[i * 4 + 1] = faces[i, 0] + faces[i, 1] - faces[i, 2];
30 | vertices[i * 4 + 2] = faces[i, 0] + faces[i, 1] + faces[i, 2];
31 | vertices[i * 4 + 3] = faces[i, 0] - faces[i, 1] + faces[i, 2];
32 |
33 | triangles[i * 6 + 0] = i * 4 + 0;
34 | triangles[i * 6 + 1] = i * 4 + 1;
35 | triangles[i * 6 + 2] = i * 4 + 2;
36 |
37 | triangles[i * 6 + 3] = i * 4 + 3;
38 | triangles[i * 6 + 4] = i * 4 + 0;
39 | triangles[i * 6 + 5] = i * 4 + 2;
40 |
41 | tangents[i * 4 + 0] = faces[i, 1];
42 | tangents[i * 4 + 1] = faces[i, 1];
43 | tangents[i * 4 + 2] = faces[i, 1];
44 | tangents[i * 4 + 3] = faces[i, 1];
45 |
46 | normals[i * 4 + 0] = faces[i, 0];
47 | normals[i * 4 + 1] = faces[i, 0];
48 | normals[i * 4 + 2] = faces[i, 0];
49 | normals[i * 4 + 3] = faces[i, 0];
50 |
51 | uvs[i * 4 + 0] = new Vector2(0, 0);
52 | uvs[i * 4 + 1] = new Vector2(1, 0);
53 | uvs[i * 4 + 2] = new Vector2(1, 1);
54 | uvs[i * 4 + 3] = new Vector2(0, 1);
55 | }
56 |
57 | mesh.vertices = vertices;
58 | mesh.tangents = tangents;
59 | mesh.normals = normals;
60 | mesh.uv = uvs;
61 | mesh.triangles = triangles;
62 |
63 | return mesh;
64 | }
65 | }
66 | }
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/Cube.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b26c28b2ddcb344e985d464dab276cd9
3 | timeCreated: 1478382970
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/Cup.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 |
5 | namespace CT {
6 | ///
7 | /// A wine-glass shape created from a spline surface. Also an example of how you can use
8 | /// SplineUtils to make a revolved object.
9 | ///
10 | public class Cup : Revolved {
11 | private List spline = SplineUtils.MakeSpline(
12 | new List {
13 | new Vector3(.001f, -1f),
14 | new Vector3(.5f, -1f),
15 | new Vector3(.45f, -.95f),
16 | new Vector3(.15f, -.9f),
17 | new Vector3(.09f, -.85f),
18 | new Vector3(.05f, -.6f),
19 | new Vector3(.1f, 0f),
20 | new Vector3(.2f, .1f),
21 | new Vector3(.4f, .2f),
22 | new Vector3(.6f, .5f),
23 | new Vector3(.5f, .98f),
24 | new Vector3(.48f, 1f),
25 | new Vector3(.46f, .98f),
26 | new Vector3(.55f, .5f),
27 | new Vector3(.35f, .3f),
28 | new Vector3(.001f, .2f)
29 | }
30 | );
31 |
32 | protected override Vector2 RevolutionFunction(float t) {
33 | return SplineUtils.Sample(spline, t);
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/Cup.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b023f1c539a9e46c4a885ff0e791cd1b
3 | timeCreated: 1479762042
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/Disk.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | namespace CT {
5 | ///
6 | /// A simple, flat, circular disk.
7 | ///
8 | public class Disk : Revolved {
9 |
10 | [Label("NOTE: Don't change Num U and Num V above.\n" +
11 | "This object will automatically set them to\n" +
12 | "appropriate values based on Num Segments.")]
13 | ///
14 | /// The number of triangles/wedges this disk should be built of.
15 | ///
16 | public int numSegments = 10;
17 |
18 | public override void Start() {
19 | base.Start();
20 | }
21 |
22 | protected override Vector2 RevolutionFunction(float t) {
23 | return new Vector2(t + 0.001f, 0);
24 | }
25 |
26 | public override void OnValidate() {
27 | numU = numSegments;
28 | numV = 1;
29 | base.OnValidate();
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/Disk.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: adf1bf1b9be2c4211948cdc4b7524538
3 | timeCreated: 1478646893
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/Knot.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | namespace CT {
5 | ///
6 | /// A fancy-looking loopy extruded surface.
7 | ///
8 | public class Knot : Extruded {
9 |
10 | private const float TAU = 2 * Mathf.PI;
11 |
12 | protected override Vector3 ExtrusionPathFunction(float v) {
13 | v *= 2 * TAU;
14 | float r = 1 + Mathf.Cos(1.5f * v) / 5;
15 | return new Vector3(Mathf.Sin(1.5f * v) / 2,
16 | r * Mathf.Cos(v),
17 | r * Mathf.Sin(v));
18 | }
19 |
20 | protected override Vector2 ExtrusionProfileFunction(float u, float v) {
21 | v = 0.15f + 0.06f * Mathf.Cos(3 * TAU * v);
22 | u *= TAU;
23 | return new Vector2(v*Mathf.Cos(u), v*Mathf.Sin(u));
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/Knot.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0fe34fb39945d4d53882ba56780ec94e
3 | timeCreated: 1478645280
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/NoisySquare.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | namespace CT {
5 | ///
6 | /// A flat square in the XY plane distorted by some random noise in the Z direction.
7 | ///
8 | public class NoisySquare : Parametric {
9 | protected override Vector3 ParametricFunction(float u, float v) {
10 | return new Vector3(2 * u - 1,
11 | 2 * v - 1,
12 | 0.5f * Noise.GetNoise(new Vector3(3 * u, 3 * v, 0.5f)));
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/NoisySquare.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 25fff81f6ee3e4d5da6ac136f2fae00e
3 | timeCreated: 1479780371
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/OpenCylinder.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | namespace CT {
5 | ///
6 | /// A cylinder shape that's open at both ends (i.e. uncapped).
7 | ///
8 | public class OpenCylinder : Revolved {
9 |
10 | [Label("NOTE: Don't change Num U and Num V above.\n" +
11 | "This object will automatically set them to\n" +
12 | "appropriate values based on Num Segments.")]
13 | ///
14 | /// The number of segments around the circle used to make this cylinder.
15 | ///
16 | public int numSegments = 10;
17 |
18 | public override void Start() {
19 | base.Start();
20 | }
21 |
22 | protected override Vector2 RevolutionFunction(float t) {
23 | return new Vector2(1, 2 * t - 1);
24 | }
25 |
26 | public override void OnValidate() {
27 | numU = numSegments;
28 | numV = 1;
29 | base.OnValidate();
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/OpenCylinder.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1a92d0ad84db641df871ecc2017d40e0
3 | timeCreated: 1478646005
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/Polyhedron.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System;
3 | using System.Collections;
4 | using System.Collections.Generic;
5 |
6 | namespace CT {
7 | ///
8 | /// This class implements a polyhedron shape, defined by a set of manually-specified vertices.
9 | /// This is somewhat analogous to Unity's Mesh class, except that this does the benefit of
10 | /// automatically generating some sensible UVs and optionally generating normals for the mesh.
11 | ///
12 | public class Polyhedron : Shape {
13 | ///
14 | /// A helper class that defines a triangle as three vertex indices.
15 | ///
16 | [Serializable]
17 | public class Triangle {
18 | public int v1;
19 | public int v2;
20 | public int v3;
21 | }
22 |
23 | ///
24 | /// The list of all vertices in the mesh.
25 | ///
26 | public Vector3[] vertices;
27 | ///
28 | /// All triangles in the mesh, specified as the indices of all the vertices.
29 | ///
30 | public Triangle[] triangles;
31 |
32 | [Label("Note: The Normals array is optional.\n"+
33 | "If no normals are supplied, they will be auto-generated.")]
34 | ///
35 | /// An array containing the normals of all the vertices. Note that these correspond to the
36 | /// order they're in on the triangles array, not the vertices array, so that you can, for
37 | /// example, only enter 8 vertices for a cube but still have each face of the cube have distinct
38 | /// normals. Thus, the size of this array should be three times the size of the triangles array.
39 | /// If this array is empty this class will attempt to generate normals for the mesh.
40 | ///
41 | public Vector3[] normals;
42 |
43 | protected override Mesh CreateMesh() {
44 | List finalVertexList = new List();
45 | List finalNormalList = new List();
46 | List finalTangentList = new List();
47 | List finalUVList = new List();
48 | int parity = 1;
49 |
50 | foreach(Triangle tri in triangles) {
51 | AddTriangle(tri, parity, finalVertexList, finalNormalList,
52 | finalTangentList, finalUVList);
53 | parity = 1 - parity;
54 | }
55 |
56 | Mesh mesh = new Mesh();
57 |
58 | mesh.vertices = finalVertexList.ToArray();
59 | mesh.normals = finalNormalList.ToArray();
60 | mesh.tangents = finalTangentList.ToArray();
61 | mesh.uv = finalUVList.ToArray();
62 |
63 | int[] indexList = new int[triangles.Length*3];
64 | for (int i = 0; i < indexList.Length; i++) {
65 | indexList[i] = i;
66 | }
67 | mesh.triangles = indexList;
68 |
69 | return mesh;
70 | }
71 |
72 | private void AddTriangle(Triangle t, int parity,
73 | List vertexListToAddTo, List normalListToAddTo,
74 | List tangentListToAddTo, List uvListToAddTo)
75 | {
76 | Vector3 a = vertices[t.v1];
77 | Vector3 b = vertices[t.v2];
78 | Vector3 c = vertices[t.v3];
79 | Vector4 tangent = (b - a).normalized;
80 | Vector3 genNormal = Vector3.Cross(tangent, c - b).normalized;
81 |
82 | vertexListToAddTo.Add(a);
83 | vertexListToAddTo.Add(b);
84 | vertexListToAddTo.Add(c);
85 |
86 | int n = normalListToAddTo.Count;
87 | normalListToAddTo.Add(normals.Length > n ? normals[n].normalized : genNormal);
88 | normalListToAddTo.Add(normals.Length > n+1 ? normals[n+1].normalized : genNormal);
89 | normalListToAddTo.Add(normals.Length > n+2 ? normals[n+2].normalized : genNormal);
90 |
91 | tangentListToAddTo.Add(tangent);
92 | tangentListToAddTo.Add(tangent);
93 | tangentListToAddTo.Add(tangent);
94 |
95 | uvListToAddTo.Add(new Vector2(parity, parity));
96 | uvListToAddTo.Add(new Vector2(parity, 1 - parity));
97 | uvListToAddTo.Add(new Vector2(1 - parity, 1 - parity));
98 | }
99 | }
100 | }
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/Polyhedron.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 79c085e568137465ba1a2b5e5c62d889
3 | timeCreated: 1479849981
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/Sphere.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | namespace CT {
5 | ///
6 | /// Generates a full or partial sphere.
7 | ///
8 | public class Sphere : Revolved {
9 |
10 | ///
11 | /// Increase this to cut away part of the sphere starting at one of the poles, allowing you
12 | /// to have domes, half-spheres, and so on.
13 | ///
14 | [Range(0.0f, 1.0f)]
15 | public float amountToCutOff = 0.0f;
16 |
17 | protected override Vector2 RevolutionFunction(float t) {
18 | float phi = Mathf.PI * (Mathf.Max(amountToCutOff, t) - 0.5f);
19 | return new Vector2(Mathf.Cos(phi), Mathf.Sin(phi));
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/Sphere.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 22574e06ff8fe466497072276040ee31
3 | timeCreated: 1478559357
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/Square.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | namespace CT {
5 | ///
6 | /// A simple flat 2x2 square.
7 | ///
8 | public class Square : Parametric {
9 | protected override Vector3 ParametricFunction(float u, float v) {
10 | return new Vector3(2 * u - 1, 2 * v - 1, 0);
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/Square.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 74286a55cf6ee4be8966ae4ad09a46c0
3 | timeCreated: 1478399205
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/Torus.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | namespace CT {
5 | ///
6 | /// Generates a torus, or donut shape.
7 | ///
8 | public class Torus : Revolved {
9 | ///
10 | /// The minor radius of the torus, i.e. the radius of the "tube".
11 | ///
12 | public float radius = 0.3f;
13 |
14 | protected override Vector2 RevolutionFunction(float t) {
15 | float phi = 2 * Mathf.PI * t;
16 | return new Vector2(1 - radius * Mathf.Cos(phi), -radius * Mathf.Sin(phi));
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/Assets/CTModeler/Shapes/Concrete Shapes/Torus.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 98b35f8fad1f24cd0bbb3f40f4d6c19d
3 | timeCreated: 1478560076
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Utilities.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 82155ec3bcdc94fec9ad27d3bcb9ddd4
3 | folderAsset: yes
4 | timeCreated: 1479760423
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Utilities/EditorDrawNormals.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | namespace CT {
5 | ///
6 | /// Utility class that draws normals for an object in the editor when selected.
7 | /// Meant for debugging. Can be pretty slow, so be careful.
8 | ///
9 | public class EditorDrawNormals : MonoBehaviour {
10 | ///
11 | /// Turns normal drawing on or off.
12 | ///
13 | public bool shouldDraw = true;
14 |
15 | private MeshFilter meshFilter;
16 |
17 | public void OnDrawGizmosSelected() {
18 | if(shouldDraw) {
19 | Gizmos.color = Color.red;
20 | if (meshFilter == null) {
21 | meshFilter = GetComponent();
22 | }
23 | if(meshFilter != null
24 | && meshFilter.sharedMesh != null
25 | && meshFilter.sharedMesh.normals != null
26 | && meshFilter.sharedMesh.vertices != null
27 | && meshFilter.sharedMesh.normals.Length == meshFilter.sharedMesh.vertices.Length)
28 | {
29 | for(int i = 0; i < meshFilter.sharedMesh.vertices.Length; i++) {
30 | Vector3 vertexPos = transform.TransformPoint(meshFilter.sharedMesh.vertices[i]);
31 | Gizmos.DrawLine(
32 | vertexPos,
33 | vertexPos + transform.TransformVector(meshFilter.sharedMesh.normals[i]));
34 | }
35 | }
36 | }
37 | }
38 |
39 | public void OnValidate() {
40 | meshFilter = GetComponent();
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/Assets/CTModeler/Utilities/EditorDrawNormals.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 793f47cd60e514b8ba3d122a9d214f47
3 | timeCreated: 1479712594
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Utilities/Noise.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System;
3 | using System.Collections;
4 |
5 | namespace CT {
6 | ///
7 | /// Random noise utility.
8 | ///
9 | public static class Noise {
10 | ///
11 | /// Gets smooth noise in 3D space.
12 | ///
13 | /// The value of the noise at the given location.
14 | /// The position in 3D space that you want to sample the noise values at.
15 | ///
16 | public static float GetNoise(Vector3 P) {
17 | Func floor = v => MapV4(v, Mathf.Floor);
18 | Func mod289 = v => MapV4(v, x => x % 289.0f);
19 | Func fract = v => MapV4(v, x => x - Mathf.Floor(x));
20 | Func fade = v => MapV4(v, x => x * x * x * (x * (x * 6 - 15) + 10));
21 |
22 | Vector4 i0 = mod289(floor(P));
23 | Vector4 i1 = mod289(i0 + Vector4.one);
24 | Vector4 f0 = fract(P);
25 | Vector4 f1 = f0 - Vector4.one;
26 | Vector4 f = fade(f0);
27 |
28 | Vector4 ix = new Vector4(i0.x, i1.x, i0.x, i1.x);
29 | Vector4 iy = new Vector4(i0.y, i0.y, i1.y, i1.y);
30 | Vector4 iz0 = new Vector4(i0.z, i0.z, i0.z, i0.z);
31 | Vector4 iz1 = new Vector4(i1.z, i1.z, i1.z, i1.z);
32 |
33 | Func permute = v => mod289(MapV4(v, x => (x * 34 + 1) * x));
34 |
35 | Vector4 ixy = permute(ix) + iy;
36 | Vector4 ixy0 = ixy + iz0;
37 | Vector4 ixy1 = ixy + iz1;
38 |
39 | Func abs = v => MapV4(v, Mathf.Abs);
40 | Vector4 HALF4 = Vector4.one * 0.5f;
41 |
42 | Vector4 gx0 = ixy0 / 7f;
43 | Vector4 gx1 = ixy1 / 7f;
44 | Vector4 gy0 = fract(floor(gx0) / 7f) - HALF4;
45 | Vector4 gy1 = fract(floor(gx1) / 7f) - HALF4;
46 | gx0 = fract(gx0);
47 | gx1 = fract(gx1);
48 | Vector4 gz0 = HALF4 - abs(gx0) - abs(gy0);
49 | Vector4 gz1 = HALF4 - abs(gx1) - abs(gy1);
50 |
51 | Func gt0 = v => MapV4(v, x => x > 0 ? 1 : 0);
52 | Func lt0 = v => MapV4(v, x => x < 0 ? 1 : 0);
53 |
54 | Vector4 sz0 = gt0(gz0);
55 | Vector4 sz1 = gt0(gz1);
56 |
57 | gx0 = gx0 - Vector4.Scale(sz0, (lt0(gx0) - HALF4));
58 | gy0 = gy0 - Vector4.Scale(sz0, (lt0(gy0) - HALF4));
59 | gx1 = gx1 - Vector4.Scale(sz1, (lt0(gx1) - HALF4));
60 | gy1 = gy1 - Vector4.Scale(sz1, (lt0(gy1) - HALF4));
61 |
62 | Vector3 g0 = new Vector3(gx0.x, gy0.x, gz0.x);
63 | Vector3 g1 = new Vector3(gx0.y, gy0.y, gz0.y);
64 | Vector3 g2 = new Vector3(gx0.z, gy0.z, gz0.z);
65 | Vector3 g3 = new Vector3(gx0.w, gy0.w, gz0.w);
66 | Vector3 g4 = new Vector3(gx1.x, gy1.x, gz1.x);
67 | Vector3 g5 = new Vector3(gx1.y, gy1.y, gz1.y);
68 | Vector3 g6 = new Vector3(gx1.z, gy1.z, gz1.z);
69 | Vector3 g7 = new Vector3(gx1.w, gy1.w, gz1.w);
70 |
71 | Vector4 norm0 = new Vector4(
72 | g0.magnitude,
73 | g1.magnitude,
74 | g2.magnitude,
75 | g3.magnitude);
76 | Vector4 norm1 = new Vector4(
77 | g4.magnitude,
78 | g5.magnitude,
79 | g6.magnitude,
80 | g7.magnitude);
81 |
82 | g0 *= norm0.x;
83 | g1 *= norm0.y;
84 | g2 *= norm0.z;
85 | g3 *= norm0.w;
86 |
87 | g4 *= norm1.x;
88 | g5 *= norm1.y;
89 | g6 *= norm1.z;
90 | g7 *= norm1.w;
91 |
92 | Vector4 nz = Vector4.Lerp(
93 | new Vector4(
94 | g0.x * f0.x + g0.y * f0.y + g0.z * f0.z,
95 | g1.x * f1.x + g1.y * f0.y + g2.z * f0.z,
96 | g2.x * f0.x + g2.y * f1.y + g2.z * f0.z,
97 | g3.x * f1.x + g3.y * f1.y + g3.z * f0.z),
98 | new Vector4(
99 | g4.x * f0.x + g4.y * f0.y + g4.z * f1.z,
100 | g5.x * f1.x + g5.y * f0.y + g5.z * f1.z,
101 | g6.x * f0.x + g6.y * f1.y + g6.z * f1.z,
102 | g7.x * f1.x + g7.y * f1.y + g7.z * f1.z),
103 | f.z);
104 |
105 | return 2.2f * Mathf.Lerp(
106 | Mathf.Lerp(nz.x, nz.z, f.y), Mathf.Lerp(nz.y, nz.w, f.y), f.x);
107 | }
108 |
109 | private static Vector4 MapV4(Vector4 input, Func transformation) {
110 | return new Vector4(
111 | transformation(input.x),
112 | transformation(input.y),
113 | transformation(input.z),
114 | transformation(input.w));
115 | }
116 |
117 | private static Vector3 MapV3(Vector3 input, Func transformation) {
118 | return new Vector3(
119 | transformation(input.x),
120 | transformation(input.y),
121 | transformation(input.z));
122 | }
123 | }
124 | }
--------------------------------------------------------------------------------
/Assets/CTModeler/Utilities/Noise.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: affb81679827a4b2981edf8eacc5cb12
3 | timeCreated: 1479761957
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/CTModeler/Utilities/SplineUtils.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System;
3 | using System.Collections;
4 | using System.Collections.Generic;
5 |
6 | namespace CT {
7 | ///
8 | /// A utility for creating, and sampling from, spline curves.
9 | ///
10 | public static class SplineUtils {
11 |
12 | ///
13 | /// Given a list of control points, generates a smooth path that passes through them.
14 | ///
15 | /// An array of Vector3s that trace the path of the spline.
16 | /// A list of key points that the spline should pass through in order.
17 | public static List MakeSpline(List keys) {
18 | List spline = new List();
19 |
20 | int segmentsPerKey = 10;
21 | if(keys.Count < 2) {
22 | return new List(keys);
23 | }
24 | else if(keys.Count == 2) {
25 | for(int i = 0; i <= segmentsPerKey; i++) {
26 | spline.Add(Vector3.Lerp(keys[0], keys[1], (float)i / segmentsPerKey));
27 | }
28 | }
29 |
30 | List lengths = new List();
31 | for(int n = 0; n < keys.Count - 1; n++) {
32 | lengths.Add((keys[n + 1] - keys[n]).magnitude);
33 | }
34 |
35 | List D = new List();
36 | for(int n = 0; n < keys.Count; n++) {
37 | if(n == 0) {
38 | D.Add((3 * keys[n + 1] - 2 * keys[n] - keys[n + 2]) / 3);
39 | }
40 | else if(n < keys.Count - 1) {
41 | D.Add(
42 | (lengths[n] * (keys[n] - keys[n - 1])
43 | + lengths[n - 1] * (keys[n + 1] - keys[n]))
44 | / (lengths[n - 1] + lengths[n]));
45 | }
46 | else {
47 | D.Add((2 * keys[n] - 3 * keys[n - 1] + keys[n - 2]) / 3);
48 | }
49 | }
50 |
51 | if(keys[0] == keys[keys.Count - 1]) {
52 | Vector3 average = (D[0] + D[keys.Count - 1]) / 2;
53 | D[0] = average;
54 | D[keys.Count - 1] = average;
55 | }
56 |
57 | for(int n = 0; n < keys.Count - 1; n++) {
58 | for(int i = 0; i < segmentsPerKey; i++) {
59 | spline.Add(Hermite(keys[n], D[n] * 0.9f, keys[n + 1], D[n + 1] * 0.9f,
60 | (float)i / segmentsPerKey));
61 | }
62 | }
63 | spline.Add(keys[keys.Count - 1]);
64 |
65 | return spline;
66 | }
67 |
68 | ///
69 | /// Samples a value from a curve.
70 | ///
71 | /// Either the closest point from the input array, or a linear interpolation
72 | /// between the two closest points.
73 | /// A set of points defining a curve. The more points there are,
74 | /// the smoother the sampling will be. All points are assumed to be equal "distance" apart in
75 | /// the parametric axis t.
76 | /// The parameter for how far along the curve we are.
77 | /// Must be between 0 and 1, with 0 being the beginning of the curve and 1 being the end.
78 | ///
79 | public static Vector3 Sample(List points, float t) {
80 | t = Mathf.Clamp(t, 0, 0.999f);
81 | if(points.Count < 1) {
82 | return Vector3.zero;
83 | }
84 | else if(points.Count == 1) {
85 | return points[0];
86 | }
87 |
88 | int intPart = Mathf.FloorToInt((points.Count - 1) * t);
89 | float fractPart = (points.Count - 1) * t - intPart;
90 | return Vector3.Lerp(points[intPart], points[intPart + 1], fractPart);
91 | }
92 |
93 | private static Vector3 Hermite(Vector3 a, Vector3 da, Vector3 b, Vector3 db, float t) {
94 | float tt = t * t;
95 | float ttt = tt * t;
96 | return a * (2 * ttt - 3 * tt + 1)
97 | + da * (ttt - 2 * tt + t)
98 | + b * (-2 * ttt + 3 * tt)
99 | + db * (ttt - tt);
100 | }
101 | }
102 | }
--------------------------------------------------------------------------------
/Assets/CTModeler/Utilities/SplineUtils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8c7ab72d94be24898bf1f18ab39e3787
3 | timeCreated: 1479762329
4 | licenseType: Free
5 | MonoImporter:
6 | serializedVersion: 2
7 | defaultReferences: []
8 | executionOrder: 0
9 | icon: {instanceID: 0}
10 | userData:
11 | assetBundleName:
12 | assetBundleVariant:
13 |
--------------------------------------------------------------------------------
/Assets/Example Scene.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a3875f7f187254f07b6a2d64ea6c0948
3 | timeCreated: 1478377160
4 | licenseType: Free
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 309c9c8f1342f470088c05cc234a33ee
3 | folderAsset: yes
4 | timeCreated: 1479761300
5 | licenseType: Free
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/Axes.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_PrefabParentObject: {fileID: 0}
8 | m_PrefabInternal: {fileID: 0}
9 | m_Name: Axes
10 | m_Shader: {fileID: 4800000, guid: 02615e2c055b647eab1fd224d086601a, type: 3}
11 | m_ShaderKeywords: _EMISSION
12 | m_LightmapFlags: 1
13 | m_CustomRenderQueue: -1
14 | stringTagMap: {}
15 | m_SavedProperties:
16 | serializedVersion: 2
17 | m_TexEnvs:
18 | - first:
19 | name: _BumpMap
20 | second:
21 | m_Texture: {fileID: 0}
22 | m_Scale: {x: 1, y: 1}
23 | m_Offset: {x: 0, y: 0}
24 | - first:
25 | name: _DetailAlbedoMap
26 | second:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - first:
31 | name: _DetailMask
32 | second:
33 | m_Texture: {fileID: 0}
34 | m_Scale: {x: 1, y: 1}
35 | m_Offset: {x: 0, y: 0}
36 | - first:
37 | name: _DetailNormalMap
38 | second:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - first:
43 | name: _EmissionMap
44 | second:
45 | m_Texture: {fileID: 0}
46 | m_Scale: {x: 1, y: 1}
47 | m_Offset: {x: 0, y: 0}
48 | - first:
49 | name: _MainTex
50 | second:
51 | m_Texture: {fileID: 2800000, guid: dea5fec435f17452298ba8519bce8d3a, type: 3}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - first:
55 | name: _MetallicGlossMap
56 | second:
57 | m_Texture: {fileID: 0}
58 | m_Scale: {x: 1, y: 1}
59 | m_Offset: {x: 0, y: 0}
60 | - first:
61 | name: _OcclusionMap
62 | second:
63 | m_Texture: {fileID: 0}
64 | m_Scale: {x: 1, y: 1}
65 | m_Offset: {x: 0, y: 0}
66 | - first:
67 | name: _ParallaxMap
68 | second:
69 | m_Texture: {fileID: 0}
70 | m_Scale: {x: 1, y: 1}
71 | m_Offset: {x: 0, y: 0}
72 | m_Floats:
73 | - first:
74 | name: _BumpScale
75 | second: 1
76 | - first:
77 | name: _Cutoff
78 | second: 0.5
79 | - first:
80 | name: _DetailNormalMapScale
81 | second: 1
82 | - first:
83 | name: _DstBlend
84 | second: 0
85 | - first:
86 | name: _GlossMapScale
87 | second: 1
88 | - first:
89 | name: _Glossiness
90 | second: 0.5
91 | - first:
92 | name: _GlossyReflections
93 | second: 1
94 | - first:
95 | name: _Metallic
96 | second: 0
97 | - first:
98 | name: _Mode
99 | second: 0
100 | - first:
101 | name: _OcclusionStrength
102 | second: 1
103 | - first:
104 | name: _Parallax
105 | second: 0.02
106 | - first:
107 | name: _SmoothnessTextureChannel
108 | second: 0
109 | - first:
110 | name: _SpecularHighlights
111 | second: 1
112 | - first:
113 | name: _SrcBlend
114 | second: 1
115 | - first:
116 | name: _UVSec
117 | second: 0
118 | - first:
119 | name: _ZWrite
120 | second: 1
121 | m_Colors:
122 | - first:
123 | name: _Color
124 | second: {r: 1, g: 1, b: 1, a: 1}
125 | - first:
126 | name: _EmissionColor
127 | second: {r: 0, g: 0, b: 0, a: 1}
128 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/Axes.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1576bfc9f8705477aa411a627ae82c70
3 | timeCreated: 1479761043
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/Blue Plastic.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_PrefabParentObject: {fileID: 0}
8 | m_PrefabInternal: {fileID: 0}
9 | m_Name: Blue Plastic
10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
11 | m_ShaderKeywords: _EMISSION _NORMALMAP
12 | m_LightmapFlags: 1
13 | m_CustomRenderQueue: -1
14 | stringTagMap: {}
15 | m_SavedProperties:
16 | serializedVersion: 2
17 | m_TexEnvs:
18 | - first:
19 | name: _BumpMap
20 | second:
21 | m_Texture: {fileID: 2800000, guid: 0cfb15718cd514324b7af1143250c94f, type: 3}
22 | m_Scale: {x: 1, y: 1}
23 | m_Offset: {x: 0, y: 0}
24 | - first:
25 | name: _DetailAlbedoMap
26 | second:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - first:
31 | name: _DetailMask
32 | second:
33 | m_Texture: {fileID: 0}
34 | m_Scale: {x: 1, y: 1}
35 | m_Offset: {x: 0, y: 0}
36 | - first:
37 | name: _DetailNormalMap
38 | second:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - first:
43 | name: _EmissionMap
44 | second:
45 | m_Texture: {fileID: 0}
46 | m_Scale: {x: 1, y: 1}
47 | m_Offset: {x: 0, y: 0}
48 | - first:
49 | name: _MainTex
50 | second:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - first:
55 | name: _MetallicGlossMap
56 | second:
57 | m_Texture: {fileID: 0}
58 | m_Scale: {x: 1, y: 1}
59 | m_Offset: {x: 0, y: 0}
60 | - first:
61 | name: _OcclusionMap
62 | second:
63 | m_Texture: {fileID: 0}
64 | m_Scale: {x: 1, y: 1}
65 | m_Offset: {x: 0, y: 0}
66 | - first:
67 | name: _ParallaxMap
68 | second:
69 | m_Texture: {fileID: 0}
70 | m_Scale: {x: 1, y: 1}
71 | m_Offset: {x: 0, y: 0}
72 | m_Floats:
73 | - first:
74 | name: _BumpScale
75 | second: 0.5
76 | - first:
77 | name: _Cutoff
78 | second: 0.5
79 | - first:
80 | name: _DetailNormalMapScale
81 | second: 1
82 | - first:
83 | name: _DstBlend
84 | second: 0
85 | - first:
86 | name: _GlossMapScale
87 | second: 1
88 | - first:
89 | name: _Glossiness
90 | second: 0.8
91 | - first:
92 | name: _GlossyReflections
93 | second: 1
94 | - first:
95 | name: _Metallic
96 | second: 0
97 | - first:
98 | name: _Mode
99 | second: 0
100 | - first:
101 | name: _OcclusionStrength
102 | second: 1
103 | - first:
104 | name: _Parallax
105 | second: 0.02
106 | - first:
107 | name: _SmoothnessTextureChannel
108 | second: 0
109 | - first:
110 | name: _SpecularHighlights
111 | second: 1
112 | - first:
113 | name: _SrcBlend
114 | second: 1
115 | - first:
116 | name: _UVSec
117 | second: 0
118 | - first:
119 | name: _ZWrite
120 | second: 1
121 | m_Colors:
122 | - first:
123 | name: _Color
124 | second: {r: 0, g: 0.42857146, b: 1, a: 1}
125 | - first:
126 | name: _EmissionColor
127 | second: {r: 0, g: 0, b: 0, a: 1}
128 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/Blue Plastic.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 94aceb1364f9a4a28860b3e95a99bc3d
3 | timeCreated: 1480059529
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/Bricks.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_PrefabParentObject: {fileID: 0}
8 | m_PrefabInternal: {fileID: 0}
9 | m_Name: Bricks
10 | m_Shader: {fileID: 4800000, guid: 02615e2c055b647eab1fd224d086601a, type: 3}
11 | m_ShaderKeywords: _EMISSION
12 | m_LightmapFlags: 1
13 | m_CustomRenderQueue: -1
14 | stringTagMap: {}
15 | m_SavedProperties:
16 | serializedVersion: 2
17 | m_TexEnvs:
18 | - first:
19 | name: _BumpMap
20 | second:
21 | m_Texture: {fileID: 0}
22 | m_Scale: {x: 1, y: 1}
23 | m_Offset: {x: 0, y: 0}
24 | - first:
25 | name: _DetailAlbedoMap
26 | second:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - first:
31 | name: _DetailMask
32 | second:
33 | m_Texture: {fileID: 0}
34 | m_Scale: {x: 1, y: 1}
35 | m_Offset: {x: 0, y: 0}
36 | - first:
37 | name: _DetailNormalMap
38 | second:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - first:
43 | name: _EmissionMap
44 | second:
45 | m_Texture: {fileID: 0}
46 | m_Scale: {x: 1, y: 1}
47 | m_Offset: {x: 0, y: 0}
48 | - first:
49 | name: _MainTex
50 | second:
51 | m_Texture: {fileID: 2800000, guid: 6de2902b52c9c4a1698745728a9c6570, type: 3}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - first:
55 | name: _MetallicGlossMap
56 | second:
57 | m_Texture: {fileID: 0}
58 | m_Scale: {x: 1, y: 1}
59 | m_Offset: {x: 0, y: 0}
60 | - first:
61 | name: _OcclusionMap
62 | second:
63 | m_Texture: {fileID: 0}
64 | m_Scale: {x: 1, y: 1}
65 | m_Offset: {x: 0, y: 0}
66 | - first:
67 | name: _ParallaxMap
68 | second:
69 | m_Texture: {fileID: 0}
70 | m_Scale: {x: 1, y: 1}
71 | m_Offset: {x: 0, y: 0}
72 | m_Floats:
73 | - first:
74 | name: _BumpScale
75 | second: 1
76 | - first:
77 | name: _Cutoff
78 | second: 0.5
79 | - first:
80 | name: _DetailNormalMapScale
81 | second: 1
82 | - first:
83 | name: _DstBlend
84 | second: 0
85 | - first:
86 | name: _GlossMapScale
87 | second: 1
88 | - first:
89 | name: _Glossiness
90 | second: 0.5
91 | - first:
92 | name: _GlossyReflections
93 | second: 1
94 | - first:
95 | name: _Metallic
96 | second: 0
97 | - first:
98 | name: _Mode
99 | second: 0
100 | - first:
101 | name: _OcclusionStrength
102 | second: 1
103 | - first:
104 | name: _Parallax
105 | second: 0.02
106 | - first:
107 | name: _SmoothnessTextureChannel
108 | second: 0
109 | - first:
110 | name: _SpecularHighlights
111 | second: 1
112 | - first:
113 | name: _SrcBlend
114 | second: 1
115 | - first:
116 | name: _UVSec
117 | second: 0
118 | - first:
119 | name: _ZWrite
120 | second: 1
121 | m_Colors:
122 | - first:
123 | name: _Color
124 | second: {r: 1, g: 1, b: 1, a: 1}
125 | - first:
126 | name: _EmissionColor
127 | second: {r: 0, g: 0, b: 0, a: 1}
128 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/Bricks.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 91058a29c19e743598a4a88161bc6078
3 | timeCreated: 1479760791
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/Bronze.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_PrefabParentObject: {fileID: 0}
8 | m_PrefabInternal: {fileID: 0}
9 | m_Name: Bronze
10 | m_Shader: {fileID: 4800000, guid: 02615e2c055b647eab1fd224d086601a, type: 3}
11 | m_ShaderKeywords: _EMISSION
12 | m_LightmapFlags: 1
13 | m_CustomRenderQueue: -1
14 | stringTagMap: {}
15 | m_SavedProperties:
16 | serializedVersion: 2
17 | m_TexEnvs:
18 | - first:
19 | name: _BumpMap
20 | second:
21 | m_Texture: {fileID: 0}
22 | m_Scale: {x: 1, y: 1}
23 | m_Offset: {x: 0, y: 0}
24 | - first:
25 | name: _DetailAlbedoMap
26 | second:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - first:
31 | name: _DetailMask
32 | second:
33 | m_Texture: {fileID: 0}
34 | m_Scale: {x: 1, y: 1}
35 | m_Offset: {x: 0, y: 0}
36 | - first:
37 | name: _DetailNormalMap
38 | second:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - first:
43 | name: _EmissionMap
44 | second:
45 | m_Texture: {fileID: 0}
46 | m_Scale: {x: 1, y: 1}
47 | m_Offset: {x: 0, y: 0}
48 | - first:
49 | name: _MainTex
50 | second:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - first:
55 | name: _MetallicGlossMap
56 | second:
57 | m_Texture: {fileID: 0}
58 | m_Scale: {x: 1, y: 1}
59 | m_Offset: {x: 0, y: 0}
60 | - first:
61 | name: _OcclusionMap
62 | second:
63 | m_Texture: {fileID: 0}
64 | m_Scale: {x: 1, y: 1}
65 | m_Offset: {x: 0, y: 0}
66 | - first:
67 | name: _ParallaxMap
68 | second:
69 | m_Texture: {fileID: 0}
70 | m_Scale: {x: 1, y: 1}
71 | m_Offset: {x: 0, y: 0}
72 | m_Floats:
73 | - first:
74 | name: _BumpScale
75 | second: 1
76 | - first:
77 | name: _Cutoff
78 | second: 0.5
79 | - first:
80 | name: _DetailNormalMapScale
81 | second: 1
82 | - first:
83 | name: _DstBlend
84 | second: 0
85 | - first:
86 | name: _GlossMapScale
87 | second: 1
88 | - first:
89 | name: _Glossiness
90 | second: 0.716
91 | - first:
92 | name: _GlossyReflections
93 | second: 1
94 | - first:
95 | name: _Metallic
96 | second: 1
97 | - first:
98 | name: _Mode
99 | second: 0
100 | - first:
101 | name: _OcclusionStrength
102 | second: 1
103 | - first:
104 | name: _Parallax
105 | second: 0.02
106 | - first:
107 | name: _SmoothnessTextureChannel
108 | second: 0
109 | - first:
110 | name: _SpecularHighlights
111 | second: 1
112 | - first:
113 | name: _SrcBlend
114 | second: 1
115 | - first:
116 | name: _UVSec
117 | second: 0
118 | - first:
119 | name: _ZWrite
120 | second: 1
121 | m_Colors:
122 | - first:
123 | name: _Color
124 | second: {r: 0.7205882, g: 0.36260423, b: 0.04768599, a: 1}
125 | - first:
126 | name: _EmissionColor
127 | second: {r: 0, g: 0, b: 0, a: 1}
128 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/Bronze.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a20cb008441a34a21be24ea997bd2bc7
3 | timeCreated: 1479774064
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/Brown Plastic.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_PrefabParentObject: {fileID: 0}
8 | m_PrefabInternal: {fileID: 0}
9 | m_Name: Brown Plastic
10 | m_Shader: {fileID: 4800000, guid: 02615e2c055b647eab1fd224d086601a, type: 3}
11 | m_ShaderKeywords: _EMISSION
12 | m_LightmapFlags: 1
13 | m_CustomRenderQueue: -1
14 | stringTagMap: {}
15 | m_SavedProperties:
16 | serializedVersion: 2
17 | m_TexEnvs:
18 | - first:
19 | name: _BumpMap
20 | second:
21 | m_Texture: {fileID: 0}
22 | m_Scale: {x: 1, y: 1}
23 | m_Offset: {x: 0, y: 0}
24 | - first:
25 | name: _DetailAlbedoMap
26 | second:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - first:
31 | name: _DetailMask
32 | second:
33 | m_Texture: {fileID: 0}
34 | m_Scale: {x: 1, y: 1}
35 | m_Offset: {x: 0, y: 0}
36 | - first:
37 | name: _DetailNormalMap
38 | second:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - first:
43 | name: _EmissionMap
44 | second:
45 | m_Texture: {fileID: 0}
46 | m_Scale: {x: 1, y: 1}
47 | m_Offset: {x: 0, y: 0}
48 | - first:
49 | name: _MainTex
50 | second:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - first:
55 | name: _MetallicGlossMap
56 | second:
57 | m_Texture: {fileID: 0}
58 | m_Scale: {x: 1, y: 1}
59 | m_Offset: {x: 0, y: 0}
60 | - first:
61 | name: _OcclusionMap
62 | second:
63 | m_Texture: {fileID: 0}
64 | m_Scale: {x: 1, y: 1}
65 | m_Offset: {x: 0, y: 0}
66 | - first:
67 | name: _ParallaxMap
68 | second:
69 | m_Texture: {fileID: 0}
70 | m_Scale: {x: 1, y: 1}
71 | m_Offset: {x: 0, y: 0}
72 | m_Floats:
73 | - first:
74 | name: _BumpScale
75 | second: 1
76 | - first:
77 | name: _Cutoff
78 | second: 0.5
79 | - first:
80 | name: _DetailNormalMapScale
81 | second: 1
82 | - first:
83 | name: _DstBlend
84 | second: 0
85 | - first:
86 | name: _GlossMapScale
87 | second: 1
88 | - first:
89 | name: _Glossiness
90 | second: 0.412
91 | - first:
92 | name: _GlossyReflections
93 | second: 1
94 | - first:
95 | name: _Metallic
96 | second: 0
97 | - first:
98 | name: _Mode
99 | second: 0
100 | - first:
101 | name: _OcclusionStrength
102 | second: 1
103 | - first:
104 | name: _Parallax
105 | second: 0.02
106 | - first:
107 | name: _SmoothnessTextureChannel
108 | second: 0
109 | - first:
110 | name: _SpecularHighlights
111 | second: 1
112 | - first:
113 | name: _SrcBlend
114 | second: 1
115 | - first:
116 | name: _UVSec
117 | second: 0
118 | - first:
119 | name: _ZWrite
120 | second: 1
121 | m_Colors:
122 | - first:
123 | name: _Color
124 | second: {r: 0.7205882, g: 0.36260423, b: 0.04768599, a: 1}
125 | - first:
126 | name: _EmissionColor
127 | second: {r: 0, g: 0, b: 0, a: 1}
128 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/Brown Plastic.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c7d90b6e1ccfa443dbc8728cd9fb2287
3 | timeCreated: 1479774064
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/Bumpy Surface.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_PrefabParentObject: {fileID: 0}
8 | m_PrefabInternal: {fileID: 0}
9 | m_Name: Bumpy Surface
10 | m_Shader: {fileID: 4800000, guid: 02615e2c055b647eab1fd224d086601a, type: 3}
11 | m_ShaderKeywords: _EMISSION _NORMALMAP
12 | m_LightmapFlags: 1
13 | m_CustomRenderQueue: -1
14 | stringTagMap: {}
15 | m_SavedProperties:
16 | serializedVersion: 2
17 | m_TexEnvs:
18 | - first:
19 | name: _BumpMap
20 | second:
21 | m_Texture: {fileID: 2800000, guid: 1fffcf5a45f424aa194997fbd5502c5b, type: 3}
22 | m_Scale: {x: 1, y: 1}
23 | m_Offset: {x: 0, y: 0}
24 | - first:
25 | name: _DetailAlbedoMap
26 | second:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - first:
31 | name: _DetailMask
32 | second:
33 | m_Texture: {fileID: 0}
34 | m_Scale: {x: 1, y: 1}
35 | m_Offset: {x: 0, y: 0}
36 | - first:
37 | name: _DetailNormalMap
38 | second:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - first:
43 | name: _EmissionMap
44 | second:
45 | m_Texture: {fileID: 0}
46 | m_Scale: {x: 1, y: 1}
47 | m_Offset: {x: 0, y: 0}
48 | - first:
49 | name: _MainTex
50 | second:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - first:
55 | name: _MetallicGlossMap
56 | second:
57 | m_Texture: {fileID: 0}
58 | m_Scale: {x: 1, y: 1}
59 | m_Offset: {x: 0, y: 0}
60 | - first:
61 | name: _OcclusionMap
62 | second:
63 | m_Texture: {fileID: 0}
64 | m_Scale: {x: 1, y: 1}
65 | m_Offset: {x: 0, y: 0}
66 | - first:
67 | name: _ParallaxMap
68 | second:
69 | m_Texture: {fileID: 0}
70 | m_Scale: {x: 1, y: 1}
71 | m_Offset: {x: 0, y: 0}
72 | m_Floats:
73 | - first:
74 | name: _BumpScale
75 | second: 1
76 | - first:
77 | name: _Cutoff
78 | second: 0.5
79 | - first:
80 | name: _DetailNormalMapScale
81 | second: 1
82 | - first:
83 | name: _DstBlend
84 | second: 0
85 | - first:
86 | name: _GlossMapScale
87 | second: 1
88 | - first:
89 | name: _Glossiness
90 | second: 0.5
91 | - first:
92 | name: _GlossyReflections
93 | second: 1
94 | - first:
95 | name: _Metallic
96 | second: 0
97 | - first:
98 | name: _Mode
99 | second: 0
100 | - first:
101 | name: _OcclusionStrength
102 | second: 1
103 | - first:
104 | name: _Parallax
105 | second: 0.02
106 | - first:
107 | name: _SmoothnessTextureChannel
108 | second: 0
109 | - first:
110 | name: _SpecularHighlights
111 | second: 1
112 | - first:
113 | name: _SrcBlend
114 | second: 1
115 | - first:
116 | name: _UVSec
117 | second: 0
118 | - first:
119 | name: _ZWrite
120 | second: 1
121 | m_Colors:
122 | - first:
123 | name: _Color
124 | second: {r: 0.3356401, g: 0.71323526, b: 0.5501143, a: 1}
125 | - first:
126 | name: _EmissionColor
127 | second: {r: 0, g: 0, b: 0, a: 1}
128 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/Bumpy Surface.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9f80b807b9bac40f4ac78b737601cde5
3 | timeCreated: 1479761394
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/Glossy Red.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_PrefabParentObject: {fileID: 0}
8 | m_PrefabInternal: {fileID: 0}
9 | m_Name: Glossy Red
10 | m_Shader: {fileID: 4800000, guid: 02615e2c055b647eab1fd224d086601a, type: 3}
11 | m_ShaderKeywords: _EMISSION
12 | m_LightmapFlags: 1
13 | m_CustomRenderQueue: -1
14 | stringTagMap: {}
15 | m_SavedProperties:
16 | serializedVersion: 2
17 | m_TexEnvs:
18 | - first:
19 | name: _BumpMap
20 | second:
21 | m_Texture: {fileID: 0}
22 | m_Scale: {x: 1, y: 1}
23 | m_Offset: {x: 0, y: 0}
24 | - first:
25 | name: _DetailAlbedoMap
26 | second:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - first:
31 | name: _DetailMask
32 | second:
33 | m_Texture: {fileID: 0}
34 | m_Scale: {x: 1, y: 1}
35 | m_Offset: {x: 0, y: 0}
36 | - first:
37 | name: _DetailNormalMap
38 | second:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - first:
43 | name: _EmissionMap
44 | second:
45 | m_Texture: {fileID: 0}
46 | m_Scale: {x: 1, y: 1}
47 | m_Offset: {x: 0, y: 0}
48 | - first:
49 | name: _MainTex
50 | second:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - first:
55 | name: _MetallicGlossMap
56 | second:
57 | m_Texture: {fileID: 0}
58 | m_Scale: {x: 1, y: 1}
59 | m_Offset: {x: 0, y: 0}
60 | - first:
61 | name: _OcclusionMap
62 | second:
63 | m_Texture: {fileID: 0}
64 | m_Scale: {x: 1, y: 1}
65 | m_Offset: {x: 0, y: 0}
66 | - first:
67 | name: _ParallaxMap
68 | second:
69 | m_Texture: {fileID: 0}
70 | m_Scale: {x: 1, y: 1}
71 | m_Offset: {x: 0, y: 0}
72 | - first:
73 | name: _SpecGlossMap
74 | second:
75 | m_Texture: {fileID: 0}
76 | m_Scale: {x: 1, y: 1}
77 | m_Offset: {x: 0, y: 0}
78 | m_Floats:
79 | - first:
80 | name: _BumpScale
81 | second: 1
82 | - first:
83 | name: _Cutoff
84 | second: 0.5
85 | - first:
86 | name: _DetailNormalMapScale
87 | second: 1
88 | - first:
89 | name: _DstBlend
90 | second: 0
91 | - first:
92 | name: _GlossMapScale
93 | second: 1
94 | - first:
95 | name: _Glossiness
96 | second: 0.807
97 | - first:
98 | name: _GlossyReflections
99 | second: 1
100 | - first:
101 | name: _Metallic
102 | second: 0
103 | - first:
104 | name: _Mode
105 | second: 0
106 | - first:
107 | name: _OcclusionStrength
108 | second: 1
109 | - first:
110 | name: _Parallax
111 | second: 0.02
112 | - first:
113 | name: _SmoothnessTextureChannel
114 | second: 0
115 | - first:
116 | name: _SpecularHighlights
117 | second: 1
118 | - first:
119 | name: _SrcBlend
120 | second: 1
121 | - first:
122 | name: _UVSec
123 | second: 0
124 | - first:
125 | name: _ZWrite
126 | second: 1
127 | m_Colors:
128 | - first:
129 | name: _Color
130 | second: {r: 1, g: 0, b: 0, a: 1}
131 | - first:
132 | name: _EmissionColor
133 | second: {r: 0, g: 0, b: 0, a: 1}
134 | - first:
135 | name: _SpecColor
136 | second: {r: 0.2, g: 0.2, b: 0.2, a: 1}
137 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/Glossy Red.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 054d797ca67e0468899799ea6e065999
3 | timeCreated: 1479761313
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/This is not a bagel.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_PrefabParentObject: {fileID: 0}
8 | m_PrefabInternal: {fileID: 0}
9 | m_Name: This is not a bagel
10 | m_Shader: {fileID: 4800000, guid: 02615e2c055b647eab1fd224d086601a, type: 3}
11 | m_ShaderKeywords: _EMISSION _NORMALMAP
12 | m_LightmapFlags: 1
13 | m_CustomRenderQueue: -1
14 | stringTagMap: {}
15 | m_SavedProperties:
16 | serializedVersion: 2
17 | m_TexEnvs:
18 | - first:
19 | name: _BumpMap
20 | second:
21 | m_Texture: {fileID: 2800000, guid: 0cfb15718cd514324b7af1143250c94f, type: 3}
22 | m_Scale: {x: 1, y: 1}
23 | m_Offset: {x: 0, y: 0}
24 | - first:
25 | name: _DetailAlbedoMap
26 | second:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - first:
31 | name: _DetailMask
32 | second:
33 | m_Texture: {fileID: 0}
34 | m_Scale: {x: 1, y: 1}
35 | m_Offset: {x: 0, y: 0}
36 | - first:
37 | name: _DetailNormalMap
38 | second:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - first:
43 | name: _EmissionMap
44 | second:
45 | m_Texture: {fileID: 0}
46 | m_Scale: {x: 1, y: 1}
47 | m_Offset: {x: 0, y: 0}
48 | - first:
49 | name: _MainTex
50 | second:
51 | m_Texture: {fileID: 2800000, guid: 9738afdca75ce4ef89695587cecd45c7, type: 3}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - first:
55 | name: _MetallicGlossMap
56 | second:
57 | m_Texture: {fileID: 0}
58 | m_Scale: {x: 1, y: 1}
59 | m_Offset: {x: 0, y: 0}
60 | - first:
61 | name: _OcclusionMap
62 | second:
63 | m_Texture: {fileID: 0}
64 | m_Scale: {x: 1, y: 1}
65 | m_Offset: {x: 0, y: 0}
66 | - first:
67 | name: _ParallaxMap
68 | second:
69 | m_Texture: {fileID: 0}
70 | m_Scale: {x: 1, y: 1}
71 | m_Offset: {x: 0, y: 0}
72 | m_Floats:
73 | - first:
74 | name: _BumpScale
75 | second: 0.5
76 | - first:
77 | name: _Cutoff
78 | second: 0.5
79 | - first:
80 | name: _DetailNormalMapScale
81 | second: 1
82 | - first:
83 | name: _DstBlend
84 | second: 0
85 | - first:
86 | name: _GlossMapScale
87 | second: 1
88 | - first:
89 | name: _Glossiness
90 | second: 0
91 | - first:
92 | name: _GlossyReflections
93 | second: 1
94 | - first:
95 | name: _Metallic
96 | second: 0
97 | - first:
98 | name: _Mode
99 | second: 0
100 | - first:
101 | name: _OcclusionStrength
102 | second: 1
103 | - first:
104 | name: _Parallax
105 | second: 0.02
106 | - first:
107 | name: _SmoothnessTextureChannel
108 | second: 0
109 | - first:
110 | name: _SpecularHighlights
111 | second: 1
112 | - first:
113 | name: _SrcBlend
114 | second: 1
115 | - first:
116 | name: _UVSec
117 | second: 0
118 | - first:
119 | name: _ZWrite
120 | second: 1
121 | m_Colors:
122 | - first:
123 | name: _Color
124 | second: {r: 0.72794116, g: 0.5367274, b: 0.33185554, a: 1}
125 | - first:
126 | name: _EmissionColor
127 | second: {r: 0, g: 0, b: 0, a: 1}
128 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/This is not a bagel.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dcb0db8d93768476383aa50f8bf02554
3 | timeCreated: 1479760791
4 | licenseType: Free
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/This_is_not_a_bagel.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kronopath/CTModeler/b904d365d27d6ba86fa02f5fcba5e36a13e696bd/Assets/Misc. Materials/This_is_not_a_bagel.jpg
--------------------------------------------------------------------------------
/Assets/Misc. Materials/This_is_not_a_bagel.jpg.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9738afdca75ce4ef89695587cecd45c7
3 | timeCreated: 1479760826
4 | licenseType: Free
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | serializedVersion: 2
8 | mipmaps:
9 | mipMapMode: 0
10 | enableMipMap: 1
11 | linearTexture: 0
12 | correctGamma: 0
13 | fadeOut: 0
14 | borderMipMap: 0
15 | mipMapFadeDistanceStart: 1
16 | mipMapFadeDistanceEnd: 3
17 | bumpmap:
18 | convertToNormalMap: 0
19 | externalNormalMap: 0
20 | heightScale: 0.25
21 | normalMapFilter: 0
22 | isReadable: 0
23 | grayScaleToAlpha: 0
24 | generateCubemap: 0
25 | cubemapConvolution: 0
26 | cubemapConvolutionSteps: 7
27 | cubemapConvolutionExponent: 1.5
28 | seamlessCubemap: 0
29 | textureFormat: -1
30 | maxTextureSize: 2048
31 | textureSettings:
32 | filterMode: -1
33 | aniso: -1
34 | mipBias: -1
35 | wrapMode: -1
36 | nPOTScale: 1
37 | lightmap: 0
38 | rGBM: 0
39 | compressionQuality: 50
40 | allowsAlphaSplitting: 0
41 | spriteMode: 0
42 | spriteExtrude: 1
43 | spriteMeshType: 1
44 | alignment: 0
45 | spritePivot: {x: 0.5, y: 0.5}
46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
47 | spritePixelsToUnits: 100
48 | alphaIsTransparency: 0
49 | spriteTessellationDetail: -1
50 | textureType: -1
51 | buildTargetSettings: []
52 | spriteSheet:
53 | serializedVersion: 2
54 | sprites: []
55 | outline: []
56 | spritePackingTag:
57 | userData:
58 | assetBundleName:
59 | assetBundleVariant:
60 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/brick.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kronopath/CTModeler/b904d365d27d6ba86fa02f5fcba5e36a13e696bd/Assets/Misc. Materials/brick.png
--------------------------------------------------------------------------------
/Assets/Misc. Materials/brick.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6de2902b52c9c4a1698745728a9c6570
3 | timeCreated: 1479760960
4 | licenseType: Free
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | serializedVersion: 2
8 | mipmaps:
9 | mipMapMode: 0
10 | enableMipMap: 1
11 | linearTexture: 0
12 | correctGamma: 0
13 | fadeOut: 0
14 | borderMipMap: 0
15 | mipMapFadeDistanceStart: 1
16 | mipMapFadeDistanceEnd: 3
17 | bumpmap:
18 | convertToNormalMap: 0
19 | externalNormalMap: 0
20 | heightScale: 0.25
21 | normalMapFilter: 0
22 | isReadable: 0
23 | grayScaleToAlpha: 0
24 | generateCubemap: 0
25 | cubemapConvolution: 0
26 | cubemapConvolutionSteps: 7
27 | cubemapConvolutionExponent: 1.5
28 | seamlessCubemap: 0
29 | textureFormat: -1
30 | maxTextureSize: 2048
31 | textureSettings:
32 | filterMode: -1
33 | aniso: -1
34 | mipBias: -1
35 | wrapMode: -1
36 | nPOTScale: 1
37 | lightmap: 0
38 | rGBM: 0
39 | compressionQuality: 50
40 | allowsAlphaSplitting: 0
41 | spriteMode: 0
42 | spriteExtrude: 1
43 | spriteMeshType: 1
44 | alignment: 0
45 | spritePivot: {x: 0.5, y: 0.5}
46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
47 | spritePixelsToUnits: 100
48 | alphaIsTransparency: 0
49 | spriteTessellationDetail: -1
50 | textureType: -1
51 | buildTargetSettings: []
52 | spriteSheet:
53 | serializedVersion: 2
54 | sprites: []
55 | outline: []
56 | spritePackingTag:
57 | userData:
58 | assetBundleName:
59 | assetBundleVariant:
60 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/normal_map_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kronopath/CTModeler/b904d365d27d6ba86fa02f5fcba5e36a13e696bd/Assets/Misc. Materials/normal_map_1.png
--------------------------------------------------------------------------------
/Assets/Misc. Materials/normal_map_1.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1fffcf5a45f424aa194997fbd5502c5b
3 | timeCreated: 1479760897
4 | licenseType: Free
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | serializedVersion: 2
8 | mipmaps:
9 | mipMapMode: 0
10 | enableMipMap: 1
11 | linearTexture: 1
12 | correctGamma: 0
13 | fadeOut: 0
14 | borderMipMap: 0
15 | mipMapFadeDistanceStart: 1
16 | mipMapFadeDistanceEnd: 3
17 | bumpmap:
18 | convertToNormalMap: 1
19 | externalNormalMap: 1
20 | heightScale: 0.25
21 | normalMapFilter: 0
22 | isReadable: 0
23 | grayScaleToAlpha: 0
24 | generateCubemap: 0
25 | cubemapConvolution: 0
26 | cubemapConvolutionSteps: 7
27 | cubemapConvolutionExponent: 1.5
28 | seamlessCubemap: 0
29 | textureFormat: -1
30 | maxTextureSize: 2048
31 | textureSettings:
32 | filterMode: -1
33 | aniso: -1
34 | mipBias: -1
35 | wrapMode: -1
36 | nPOTScale: 1
37 | lightmap: 0
38 | rGBM: 0
39 | compressionQuality: 50
40 | allowsAlphaSplitting: 0
41 | spriteMode: 0
42 | spriteExtrude: 1
43 | spriteMeshType: 1
44 | alignment: 0
45 | spritePivot: {x: 0.5, y: 0.5}
46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
47 | spritePixelsToUnits: 100
48 | alphaIsTransparency: 0
49 | spriteTessellationDetail: -1
50 | textureType: 1
51 | buildTargetSettings: []
52 | spriteSheet:
53 | serializedVersion: 2
54 | sprites: []
55 | outline: []
56 | spritePackingTag:
57 | userData:
58 | assetBundleName:
59 | assetBundleVariant:
60 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/normal_map_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kronopath/CTModeler/b904d365d27d6ba86fa02f5fcba5e36a13e696bd/Assets/Misc. Materials/normal_map_2.jpg
--------------------------------------------------------------------------------
/Assets/Misc. Materials/normal_map_2.jpg.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0cfb15718cd514324b7af1143250c94f
3 | timeCreated: 1479760895
4 | licenseType: Free
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | serializedVersion: 2
8 | mipmaps:
9 | mipMapMode: 0
10 | enableMipMap: 1
11 | linearTexture: 1
12 | correctGamma: 0
13 | fadeOut: 0
14 | borderMipMap: 0
15 | mipMapFadeDistanceStart: 1
16 | mipMapFadeDistanceEnd: 3
17 | bumpmap:
18 | convertToNormalMap: 1
19 | externalNormalMap: 1
20 | heightScale: 0.25
21 | normalMapFilter: 0
22 | isReadable: 0
23 | grayScaleToAlpha: 0
24 | generateCubemap: 0
25 | cubemapConvolution: 0
26 | cubemapConvolutionSteps: 7
27 | cubemapConvolutionExponent: 1.5
28 | seamlessCubemap: 0
29 | textureFormat: -1
30 | maxTextureSize: 2048
31 | textureSettings:
32 | filterMode: -1
33 | aniso: -1
34 | mipBias: -1
35 | wrapMode: -1
36 | nPOTScale: 1
37 | lightmap: 0
38 | rGBM: 0
39 | compressionQuality: 50
40 | allowsAlphaSplitting: 0
41 | spriteMode: 0
42 | spriteExtrude: 1
43 | spriteMeshType: 1
44 | alignment: 0
45 | spritePivot: {x: 0.5, y: 0.5}
46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
47 | spritePixelsToUnits: 100
48 | alphaIsTransparency: 0
49 | spriteTessellationDetail: -1
50 | textureType: 1
51 | buildTargetSettings: []
52 | spriteSheet:
53 | serializedVersion: 2
54 | sprites: []
55 | outline: []
56 | spritePackingTag:
57 | userData:
58 | assetBundleName:
59 | assetBundleVariant:
60 |
--------------------------------------------------------------------------------
/Assets/Misc. Materials/xy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kronopath/CTModeler/b904d365d27d6ba86fa02f5fcba5e36a13e696bd/Assets/Misc. Materials/xy.png
--------------------------------------------------------------------------------
/Assets/Misc. Materials/xy.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dea5fec435f17452298ba8519bce8d3a
3 | timeCreated: 1479761046
4 | licenseType: Free
5 | TextureImporter:
6 | fileIDToRecycleName: {}
7 | serializedVersion: 2
8 | mipmaps:
9 | mipMapMode: 0
10 | enableMipMap: 1
11 | linearTexture: 0
12 | correctGamma: 0
13 | fadeOut: 0
14 | borderMipMap: 0
15 | mipMapFadeDistanceStart: 1
16 | mipMapFadeDistanceEnd: 3
17 | bumpmap:
18 | convertToNormalMap: 0
19 | externalNormalMap: 0
20 | heightScale: 0.25
21 | normalMapFilter: 0
22 | isReadable: 0
23 | grayScaleToAlpha: 0
24 | generateCubemap: 0
25 | cubemapConvolution: 0
26 | cubemapConvolutionSteps: 7
27 | cubemapConvolutionExponent: 1.5
28 | seamlessCubemap: 0
29 | textureFormat: -1
30 | maxTextureSize: 2048
31 | textureSettings:
32 | filterMode: -1
33 | aniso: -1
34 | mipBias: -1
35 | wrapMode: -1
36 | nPOTScale: 1
37 | lightmap: 0
38 | rGBM: 0
39 | compressionQuality: 50
40 | allowsAlphaSplitting: 0
41 | spriteMode: 0
42 | spriteExtrude: 1
43 | spriteMeshType: 1
44 | alignment: 0
45 | spritePivot: {x: 0.5, y: 0.5}
46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
47 | spritePixelsToUnits: 100
48 | alphaIsTransparency: 0
49 | spriteTessellationDetail: -1
50 | textureType: -1
51 | buildTargetSettings: []
52 | spriteSheet:
53 | serializedVersion: 2
54 | sprites: []
55 | outline: []
56 | spritePackingTag:
57 | userData:
58 | assetBundleName:
59 | assetBundleVariant:
60 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 Gabriel B. Nunes
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!11 &1
4 | AudioManager:
5 | m_ObjectHideFlags: 0
6 | m_Volume: 1
7 | Rolloff Scale: 1
8 | Doppler Factor: 1
9 | Default Speaker Mode: 2
10 | m_SampleRate: 0
11 | m_DSPBufferSize: 0
12 | m_VirtualVoiceCount: 512
13 | m_RealVoiceCount: 32
14 | m_SpatializerPlugin:
15 | m_DisableAudio: 0
16 | m_VirtualizeEffects: 1
17 |
--------------------------------------------------------------------------------
/ProjectSettings/ClusterInputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!236 &1
4 | ClusterInputManager:
5 | m_ObjectHideFlags: 0
6 | m_Inputs: []
7 |
--------------------------------------------------------------------------------
/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!55 &1
4 | PhysicsManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Gravity: {x: 0, y: -9.81, z: 0}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_BounceThreshold: 2
10 | m_SleepThreshold: 0.005
11 | m_DefaultContactOffset: 0.01
12 | m_SolverIterationCount: 6
13 | m_SolverVelocityIterations: 1
14 | m_QueriesHitTriggers: 1
15 | m_EnableAdaptiveForce: 0
16 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
17 |
--------------------------------------------------------------------------------
/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes: []
8 |
--------------------------------------------------------------------------------
/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!159 &1
4 | EditorSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 3
7 | m_ExternalVersionControlSupport: Visible Meta Files
8 | m_SerializationMode: 2
9 | m_WebSecurityEmulationEnabled: 0
10 | m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d
11 | m_DefaultBehaviorMode: 0
12 | m_SpritePackerMode: 2
13 | m_SpritePackerPaddingPower: 1
14 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd
15 | m_ProjectGenerationRootNamespace:
16 |
--------------------------------------------------------------------------------
/ProjectSettings/GraphicsSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!30 &1
4 | GraphicsSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 7
7 | m_Deferred:
8 | m_Mode: 1
9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
10 | m_DeferredReflections:
11 | m_Mode: 1
12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
13 | m_ScreenSpaceShadows:
14 | m_Mode: 1
15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
16 | m_LegacyDeferred:
17 | m_Mode: 1
18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
19 | m_DepthNormals:
20 | m_Mode: 1
21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
22 | m_MotionVectors:
23 | m_Mode: 1
24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
25 | m_LightHalo:
26 | m_Mode: 1
27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
28 | m_LensFlare:
29 | m_Mode: 1
30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
31 | m_AlwaysIncludedShaders:
32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
38 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0}
39 | m_PreloadedShaders: []
40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
41 | type: 0}
42 | m_ShaderSettings_Tier1:
43 | useCascadedShadowMaps: 1
44 | standardShaderQuality: 2
45 | useReflectionProbeBoxProjection: 1
46 | useReflectionProbeBlending: 1
47 | m_ShaderSettings_Tier2:
48 | useCascadedShadowMaps: 1
49 | standardShaderQuality: 2
50 | useReflectionProbeBoxProjection: 1
51 | useReflectionProbeBlending: 1
52 | m_ShaderSettings_Tier3:
53 | useCascadedShadowMaps: 1
54 | standardShaderQuality: 2
55 | useReflectionProbeBoxProjection: 1
56 | useReflectionProbeBlending: 1
57 | m_BuildTargetShaderSettings: []
58 | m_LightmapStripping: 0
59 | m_FogStripping: 0
60 | m_LightmapKeepPlain: 1
61 | m_LightmapKeepDirCombined: 1
62 | m_LightmapKeepDirSeparate: 1
63 | m_LightmapKeepDynamicPlain: 1
64 | m_LightmapKeepDynamicDirCombined: 1
65 | m_LightmapKeepDynamicDirSeparate: 1
66 | m_FogKeepLinear: 1
67 | m_FogKeepExp: 1
68 | m_FogKeepExp2: 1
69 |
--------------------------------------------------------------------------------
/ProjectSettings/InputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!13 &1
4 | InputManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Axes:
8 | - serializedVersion: 3
9 | m_Name: Horizontal
10 | descriptiveName:
11 | descriptiveNegativeName:
12 | negativeButton: left
13 | positiveButton: right
14 | altNegativeButton: a
15 | altPositiveButton: d
16 | gravity: 3
17 | dead: 0.001
18 | sensitivity: 3
19 | snap: 1
20 | invert: 0
21 | type: 0
22 | axis: 0
23 | joyNum: 0
24 | - serializedVersion: 3
25 | m_Name: Vertical
26 | descriptiveName:
27 | descriptiveNegativeName:
28 | negativeButton: down
29 | positiveButton: up
30 | altNegativeButton: s
31 | altPositiveButton: w
32 | gravity: 3
33 | dead: 0.001
34 | sensitivity: 3
35 | snap: 1
36 | invert: 0
37 | type: 0
38 | axis: 0
39 | joyNum: 0
40 | - serializedVersion: 3
41 | m_Name: Fire1
42 | descriptiveName:
43 | descriptiveNegativeName:
44 | negativeButton:
45 | positiveButton: left ctrl
46 | altNegativeButton:
47 | altPositiveButton: mouse 0
48 | gravity: 1000
49 | dead: 0.001
50 | sensitivity: 1000
51 | snap: 0
52 | invert: 0
53 | type: 0
54 | axis: 0
55 | joyNum: 0
56 | - serializedVersion: 3
57 | m_Name: Fire2
58 | descriptiveName:
59 | descriptiveNegativeName:
60 | negativeButton:
61 | positiveButton: left alt
62 | altNegativeButton:
63 | altPositiveButton: mouse 1
64 | gravity: 1000
65 | dead: 0.001
66 | sensitivity: 1000
67 | snap: 0
68 | invert: 0
69 | type: 0
70 | axis: 0
71 | joyNum: 0
72 | - serializedVersion: 3
73 | m_Name: Fire3
74 | descriptiveName:
75 | descriptiveNegativeName:
76 | negativeButton:
77 | positiveButton: left shift
78 | altNegativeButton:
79 | altPositiveButton: mouse 2
80 | gravity: 1000
81 | dead: 0.001
82 | sensitivity: 1000
83 | snap: 0
84 | invert: 0
85 | type: 0
86 | axis: 0
87 | joyNum: 0
88 | - serializedVersion: 3
89 | m_Name: Jump
90 | descriptiveName:
91 | descriptiveNegativeName:
92 | negativeButton:
93 | positiveButton: space
94 | altNegativeButton:
95 | altPositiveButton:
96 | gravity: 1000
97 | dead: 0.001
98 | sensitivity: 1000
99 | snap: 0
100 | invert: 0
101 | type: 0
102 | axis: 0
103 | joyNum: 0
104 | - serializedVersion: 3
105 | m_Name: Mouse X
106 | descriptiveName:
107 | descriptiveNegativeName:
108 | negativeButton:
109 | positiveButton:
110 | altNegativeButton:
111 | altPositiveButton:
112 | gravity: 0
113 | dead: 0
114 | sensitivity: 0.1
115 | snap: 0
116 | invert: 0
117 | type: 1
118 | axis: 0
119 | joyNum: 0
120 | - serializedVersion: 3
121 | m_Name: Mouse Y
122 | descriptiveName:
123 | descriptiveNegativeName:
124 | negativeButton:
125 | positiveButton:
126 | altNegativeButton:
127 | altPositiveButton:
128 | gravity: 0
129 | dead: 0
130 | sensitivity: 0.1
131 | snap: 0
132 | invert: 0
133 | type: 1
134 | axis: 1
135 | joyNum: 0
136 | - serializedVersion: 3
137 | m_Name: Mouse ScrollWheel
138 | descriptiveName:
139 | descriptiveNegativeName:
140 | negativeButton:
141 | positiveButton:
142 | altNegativeButton:
143 | altPositiveButton:
144 | gravity: 0
145 | dead: 0
146 | sensitivity: 0.1
147 | snap: 0
148 | invert: 0
149 | type: 1
150 | axis: 2
151 | joyNum: 0
152 | - serializedVersion: 3
153 | m_Name: Horizontal
154 | descriptiveName:
155 | descriptiveNegativeName:
156 | negativeButton:
157 | positiveButton:
158 | altNegativeButton:
159 | altPositiveButton:
160 | gravity: 0
161 | dead: 0.19
162 | sensitivity: 1
163 | snap: 0
164 | invert: 0
165 | type: 2
166 | axis: 0
167 | joyNum: 0
168 | - serializedVersion: 3
169 | m_Name: Vertical
170 | descriptiveName:
171 | descriptiveNegativeName:
172 | negativeButton:
173 | positiveButton:
174 | altNegativeButton:
175 | altPositiveButton:
176 | gravity: 0
177 | dead: 0.19
178 | sensitivity: 1
179 | snap: 0
180 | invert: 1
181 | type: 2
182 | axis: 1
183 | joyNum: 0
184 | - serializedVersion: 3
185 | m_Name: Fire1
186 | descriptiveName:
187 | descriptiveNegativeName:
188 | negativeButton:
189 | positiveButton: joystick button 0
190 | altNegativeButton:
191 | altPositiveButton:
192 | gravity: 1000
193 | dead: 0.001
194 | sensitivity: 1000
195 | snap: 0
196 | invert: 0
197 | type: 0
198 | axis: 0
199 | joyNum: 0
200 | - serializedVersion: 3
201 | m_Name: Fire2
202 | descriptiveName:
203 | descriptiveNegativeName:
204 | negativeButton:
205 | positiveButton: joystick button 1
206 | altNegativeButton:
207 | altPositiveButton:
208 | gravity: 1000
209 | dead: 0.001
210 | sensitivity: 1000
211 | snap: 0
212 | invert: 0
213 | type: 0
214 | axis: 0
215 | joyNum: 0
216 | - serializedVersion: 3
217 | m_Name: Fire3
218 | descriptiveName:
219 | descriptiveNegativeName:
220 | negativeButton:
221 | positiveButton: joystick button 2
222 | altNegativeButton:
223 | altPositiveButton:
224 | gravity: 1000
225 | dead: 0.001
226 | sensitivity: 1000
227 | snap: 0
228 | invert: 0
229 | type: 0
230 | axis: 0
231 | joyNum: 0
232 | - serializedVersion: 3
233 | m_Name: Jump
234 | descriptiveName:
235 | descriptiveNegativeName:
236 | negativeButton:
237 | positiveButton: joystick button 3
238 | altNegativeButton:
239 | altPositiveButton:
240 | gravity: 1000
241 | dead: 0.001
242 | sensitivity: 1000
243 | snap: 0
244 | invert: 0
245 | type: 0
246 | axis: 0
247 | joyNum: 0
248 | - serializedVersion: 3
249 | m_Name: Submit
250 | descriptiveName:
251 | descriptiveNegativeName:
252 | negativeButton:
253 | positiveButton: return
254 | altNegativeButton:
255 | altPositiveButton: joystick button 0
256 | gravity: 1000
257 | dead: 0.001
258 | sensitivity: 1000
259 | snap: 0
260 | invert: 0
261 | type: 0
262 | axis: 0
263 | joyNum: 0
264 | - serializedVersion: 3
265 | m_Name: Submit
266 | descriptiveName:
267 | descriptiveNegativeName:
268 | negativeButton:
269 | positiveButton: enter
270 | altNegativeButton:
271 | altPositiveButton: space
272 | gravity: 1000
273 | dead: 0.001
274 | sensitivity: 1000
275 | snap: 0
276 | invert: 0
277 | type: 0
278 | axis: 0
279 | joyNum: 0
280 | - serializedVersion: 3
281 | m_Name: Cancel
282 | descriptiveName:
283 | descriptiveNegativeName:
284 | negativeButton:
285 | positiveButton: escape
286 | altNegativeButton:
287 | altPositiveButton: joystick button 1
288 | gravity: 1000
289 | dead: 0.001
290 | sensitivity: 1000
291 | snap: 0
292 | invert: 0
293 | type: 0
294 | axis: 0
295 | joyNum: 0
296 |
--------------------------------------------------------------------------------
/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!126 &1
4 | NavMeshAreas:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | areas:
8 | - name: Walkable
9 | cost: 1
10 | - name: Not Walkable
11 | cost: 1
12 | - name: Jump
13 | cost: 2
14 | - name:
15 | cost: 1
16 | - name:
17 | cost: 1
18 | - name:
19 | cost: 1
20 | - name:
21 | cost: 1
22 | - name:
23 | cost: 1
24 | - name:
25 | cost: 1
26 | - name:
27 | cost: 1
28 | - name:
29 | cost: 1
30 | - name:
31 | cost: 1
32 | - name:
33 | cost: 1
34 | - name:
35 | cost: 1
36 | - name:
37 | cost: 1
38 | - name:
39 | cost: 1
40 | - name:
41 | cost: 1
42 | - name:
43 | cost: 1
44 | - name:
45 | cost: 1
46 | - name:
47 | cost: 1
48 | - name:
49 | cost: 1
50 | - name:
51 | cost: 1
52 | - name:
53 | cost: 1
54 | - name:
55 | cost: 1
56 | - name:
57 | cost: 1
58 | - name:
59 | cost: 1
60 | - name:
61 | cost: 1
62 | - name:
63 | cost: 1
64 | - name:
65 | cost: 1
66 | - name:
67 | cost: 1
68 | - name:
69 | cost: 1
70 | - name:
71 | cost: 1
72 |
--------------------------------------------------------------------------------
/ProjectSettings/NetworkManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!149 &1
4 | NetworkManager:
5 | m_ObjectHideFlags: 0
6 | m_DebugLevel: 0
7 | m_Sendrate: 15
8 | m_AssetToPrefab: {}
9 |
--------------------------------------------------------------------------------
/ProjectSettings/Physics2DSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!19 &1
4 | Physics2DSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Gravity: {x: 0, y: -9.81}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_VelocityIterations: 8
10 | m_PositionIterations: 3
11 | m_VelocityThreshold: 1
12 | m_MaxLinearCorrection: 0.2
13 | m_MaxAngularCorrection: 8
14 | m_MaxTranslationSpeed: 100
15 | m_MaxRotationSpeed: 360
16 | m_MinPenetrationForPenalty: 0.01
17 | m_BaumgarteScale: 0.2
18 | m_BaumgarteTimeOfImpactScale: 0.75
19 | m_TimeToSleep: 0.5
20 | m_LinearSleepTolerance: 0.01
21 | m_AngularSleepTolerance: 2
22 | m_QueriesHitTriggers: 1
23 | m_QueriesStartInColliders: 1
24 | m_ChangeStopsCallbacks: 0
25 | m_AlwaysShowColliders: 0
26 | m_ShowColliderSleep: 1
27 | m_ShowColliderContacts: 0
28 | m_ContactArrowScale: 0.2
29 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
30 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
31 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
32 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
33 |
--------------------------------------------------------------------------------
/ProjectSettings/ProjectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!129 &1
4 | PlayerSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 8
7 | productGUID: 5a39633fc79be4417ad5d0b086bd5cdf
8 | AndroidProfiler: 0
9 | defaultScreenOrientation: 4
10 | targetDevice: 2
11 | useOnDemandResources: 0
12 | accelerometerFrequency: 60
13 | companyName: DefaultCompany
14 | productName: CTModeler
15 | defaultCursor: {fileID: 0}
16 | cursorHotspot: {x: 0, y: 0}
17 | m_SplashScreenStyle: 0
18 | m_ShowUnitySplashScreen: 1
19 | m_VirtualRealitySplashScreen: {fileID: 0}
20 | defaultScreenWidth: 1024
21 | defaultScreenHeight: 768
22 | defaultScreenWidthWeb: 960
23 | defaultScreenHeightWeb: 600
24 | m_RenderingPath: 1
25 | m_MobileRenderingPath: 1
26 | m_ActiveColorSpace: 0
27 | m_MTRendering: 1
28 | m_MobileMTRendering: 0
29 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000
30 | iosShowActivityIndicatorOnLoading: -1
31 | androidShowActivityIndicatorOnLoading: -1
32 | iosAppInBackgroundBehavior: 0
33 | displayResolutionDialog: 1
34 | iosAllowHTTPDownload: 1
35 | allowedAutorotateToPortrait: 1
36 | allowedAutorotateToPortraitUpsideDown: 1
37 | allowedAutorotateToLandscapeRight: 1
38 | allowedAutorotateToLandscapeLeft: 1
39 | useOSAutorotation: 1
40 | use32BitDisplayBuffer: 1
41 | disableDepthAndStencilBuffers: 0
42 | defaultIsFullScreen: 1
43 | defaultIsNativeResolution: 1
44 | runInBackground: 0
45 | captureSingleScreen: 0
46 | Override IPod Music: 0
47 | Prepare IOS For Recording: 0
48 | submitAnalytics: 1
49 | usePlayerLog: 1
50 | bakeCollisionMeshes: 0
51 | forceSingleInstance: 0
52 | resizableWindow: 0
53 | useMacAppStoreValidation: 0
54 | gpuSkinning: 0
55 | graphicsJobs: 0
56 | xboxPIXTextureCapture: 0
57 | xboxEnableAvatar: 0
58 | xboxEnableKinect: 0
59 | xboxEnableKinectAutoTracking: 0
60 | xboxEnableFitness: 0
61 | visibleInBackground: 0
62 | allowFullscreenSwitch: 1
63 | macFullscreenMode: 2
64 | d3d9FullscreenMode: 1
65 | d3d11FullscreenMode: 1
66 | xboxSpeechDB: 0
67 | xboxEnableHeadOrientation: 0
68 | xboxEnableGuest: 0
69 | xboxEnablePIXSampling: 0
70 | n3dsDisableStereoscopicView: 0
71 | n3dsEnableSharedListOpt: 1
72 | n3dsEnableVSync: 0
73 | uiUse16BitDepthBuffer: 0
74 | ignoreAlphaClear: 0
75 | xboxOneResolution: 0
76 | xboxOneMonoLoggingLevel: 0
77 | xboxOneLoggingLevel: 1
78 | ps3SplashScreen: {fileID: 0}
79 | videoMemoryForVertexBuffers: 0
80 | psp2PowerMode: 0
81 | psp2AcquireBGM: 1
82 | wiiUTVResolution: 0
83 | wiiUGamePadMSAA: 1
84 | wiiUSupportsNunchuk: 0
85 | wiiUSupportsClassicController: 0
86 | wiiUSupportsBalanceBoard: 0
87 | wiiUSupportsMotionPlus: 0
88 | wiiUSupportsProController: 0
89 | wiiUAllowScreenCapture: 1
90 | wiiUControllerCount: 0
91 | m_SupportedAspectRatios:
92 | 4:3: 1
93 | 5:4: 1
94 | 16:10: 1
95 | 16:9: 1
96 | Others: 1
97 | bundleIdentifier: com.Company.ProductName
98 | bundleVersion: 1.0
99 | preloadedAssets: []
100 | metroEnableIndependentInputSource: 0
101 | xboxOneDisableKinectGpuReservation: 0
102 | singlePassStereoRendering: 0
103 | protectGraphicsMemory: 0
104 | AndroidBundleVersionCode: 1
105 | AndroidMinSdkVersion: 9
106 | AndroidPreferredInstallLocation: 1
107 | aotOptions:
108 | apiCompatibilityLevel: 2
109 | stripEngineCode: 1
110 | iPhoneStrippingLevel: 0
111 | iPhoneScriptCallOptimization: 0
112 | iPhoneBuildNumber: 0
113 | ForceInternetPermission: 0
114 | ForceSDCardPermission: 0
115 | CreateWallpaper: 0
116 | APKExpansionFiles: 0
117 | preloadShaders: 0
118 | StripUnusedMeshComponents: 0
119 | VertexChannelCompressionMask:
120 | serializedVersion: 2
121 | m_Bits: 238
122 | iPhoneSdkVersion: 988
123 | iPhoneTargetOSVersion: 24
124 | tvOSSdkVersion: 0
125 | tvOSTargetOSVersion: 900
126 | uIPrerenderedIcon: 0
127 | uIRequiresPersistentWiFi: 0
128 | uIRequiresFullScreen: 1
129 | uIStatusBarHidden: 1
130 | uIExitOnSuspend: 0
131 | uIStatusBarStyle: 0
132 | iPhoneSplashScreen: {fileID: 0}
133 | iPhoneHighResSplashScreen: {fileID: 0}
134 | iPhoneTallHighResSplashScreen: {fileID: 0}
135 | iPhone47inSplashScreen: {fileID: 0}
136 | iPhone55inPortraitSplashScreen: {fileID: 0}
137 | iPhone55inLandscapeSplashScreen: {fileID: 0}
138 | iPadPortraitSplashScreen: {fileID: 0}
139 | iPadHighResPortraitSplashScreen: {fileID: 0}
140 | iPadLandscapeSplashScreen: {fileID: 0}
141 | iPadHighResLandscapeSplashScreen: {fileID: 0}
142 | appleTVSplashScreen: {fileID: 0}
143 | tvOSSmallIconLayers: []
144 | tvOSLargeIconLayers: []
145 | tvOSTopShelfImageLayers: []
146 | iOSLaunchScreenType: 0
147 | iOSLaunchScreenPortrait: {fileID: 0}
148 | iOSLaunchScreenLandscape: {fileID: 0}
149 | iOSLaunchScreenBackgroundColor:
150 | serializedVersion: 2
151 | rgba: 0
152 | iOSLaunchScreenFillPct: 100
153 | iOSLaunchScreenSize: 100
154 | iOSLaunchScreenCustomXibPath:
155 | iOSLaunchScreeniPadType: 0
156 | iOSLaunchScreeniPadImage: {fileID: 0}
157 | iOSLaunchScreeniPadBackgroundColor:
158 | serializedVersion: 2
159 | rgba: 0
160 | iOSLaunchScreeniPadFillPct: 100
161 | iOSLaunchScreeniPadSize: 100
162 | iOSLaunchScreeniPadCustomXibPath:
163 | iOSDeviceRequirements: []
164 | iOSURLSchemes: []
165 | AndroidTargetDevice: 0
166 | AndroidSplashScreenScale: 0
167 | androidSplashScreen: {fileID: 0}
168 | AndroidKeystoreName:
169 | AndroidKeyaliasName:
170 | AndroidTVCompatibility: 1
171 | AndroidIsGame: 1
172 | androidEnableBanner: 1
173 | m_AndroidBanners:
174 | - width: 320
175 | height: 180
176 | banner: {fileID: 0}
177 | androidGamepadSupportLevel: 0
178 | resolutionDialogBanner: {fileID: 0}
179 | m_BuildTargetIcons: []
180 | m_BuildTargetBatching: []
181 | m_BuildTargetGraphicsAPIs: []
182 | webPlayerTemplate: APPLICATION:Default
183 | m_TemplateCustomTags: {}
184 | wiiUTitleID: 0005000011000000
185 | wiiUGroupID: 00010000
186 | wiiUCommonSaveSize: 4096
187 | wiiUAccountSaveSize: 2048
188 | wiiUOlvAccessKey: 0
189 | wiiUTinCode: 0
190 | wiiUJoinGameId: 0
191 | wiiUJoinGameModeMask: 0000000000000000
192 | wiiUCommonBossSize: 0
193 | wiiUAccountBossSize: 0
194 | wiiUAddOnUniqueIDs: []
195 | wiiUMainThreadStackSize: 3072
196 | wiiULoaderThreadStackSize: 1024
197 | wiiUSystemHeapSize: 128
198 | wiiUTVStartupScreen: {fileID: 0}
199 | wiiUGamePadStartupScreen: {fileID: 0}
200 | wiiUProfilerLibPath:
201 | actionOnDotNetUnhandledException: 1
202 | enableInternalProfiler: 0
203 | logObjCUncaughtExceptions: 1
204 | enableCrashReportAPI: 0
205 | locationUsageDescription:
206 | XboxTitleId:
207 | XboxImageXexPath:
208 | XboxSpaPath:
209 | XboxGenerateSpa: 0
210 | XboxDeployKinectResources: 0
211 | XboxSplashScreen: {fileID: 0}
212 | xboxEnableSpeech: 0
213 | xboxAdditionalTitleMemorySize: 0
214 | xboxDeployKinectHeadOrientation: 0
215 | xboxDeployKinectHeadPosition: 0
216 | ps3TitleConfigPath:
217 | ps3DLCConfigPath:
218 | ps3ThumbnailPath:
219 | ps3BackgroundPath:
220 | ps3SoundPath:
221 | ps3NPAgeRating: 12
222 | ps3TrophyCommId:
223 | ps3NpCommunicationPassphrase:
224 | ps3TrophyPackagePath:
225 | ps3BootCheckMaxSaveGameSizeKB: 128
226 | ps3TrophyCommSig:
227 | ps3SaveGameSlots: 1
228 | ps3TrialMode: 0
229 | ps3VideoMemoryForAudio: 0
230 | ps3EnableVerboseMemoryStats: 0
231 | ps3UseSPUForUmbra: 0
232 | ps3EnableMoveSupport: 1
233 | ps3DisableDolbyEncoding: 0
234 | ps4NPAgeRating: 12
235 | ps4NPTitleSecret:
236 | ps4NPTrophyPackPath:
237 | ps4ParentalLevel: 1
238 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000
239 | ps4Category: 0
240 | ps4MasterVersion: 01.00
241 | ps4AppVersion: 01.00
242 | ps4AppType: 0
243 | ps4ParamSfxPath:
244 | ps4VideoOutPixelFormat: 0
245 | ps4VideoOutResolution: 4
246 | ps4PronunciationXMLPath:
247 | ps4PronunciationSIGPath:
248 | ps4BackgroundImagePath:
249 | ps4StartupImagePath:
250 | ps4SaveDataImagePath:
251 | ps4SdkOverride:
252 | ps4BGMPath:
253 | ps4ShareFilePath:
254 | ps4ShareOverlayImagePath:
255 | ps4PrivacyGuardImagePath:
256 | ps4NPtitleDatPath:
257 | ps4RemotePlayKeyAssignment: -1
258 | ps4RemotePlayKeyMappingDir:
259 | ps4PlayTogetherPlayerCount: 0
260 | ps4EnterButtonAssignment: 1
261 | ps4ApplicationParam1: 0
262 | ps4ApplicationParam2: 0
263 | ps4ApplicationParam3: 0
264 | ps4ApplicationParam4: 0
265 | ps4DownloadDataSize: 0
266 | ps4GarlicHeapSize: 2048
267 | ps4Passcode: 2qmWqBlQ9wQj99nsQzldVI5ZuGXbEWRK
268 | ps4UseDebugIl2cppLibs: 0
269 | ps4pnSessions: 1
270 | ps4pnPresence: 1
271 | ps4pnFriends: 1
272 | ps4pnGameCustomData: 1
273 | playerPrefsSupport: 0
274 | ps4ReprojectionSupport: 0
275 | ps4UseAudio3dBackend: 0
276 | ps4SocialScreenEnabled: 0
277 | ps4Audio3dVirtualSpeakerCount: 14
278 | ps4attribCpuUsage: 0
279 | ps4PatchPkgPath:
280 | ps4PatchLatestPkgPath:
281 | ps4PatchChangeinfoPath:
282 | ps4PatchDayOne: 0
283 | ps4attribUserManagement: 0
284 | ps4attribMoveSupport: 0
285 | ps4attrib3DSupport: 0
286 | ps4attribShareSupport: 0
287 | ps4attribExclusiveVR: 0
288 | ps4disableAutoHideSplash: 0
289 | ps4IncludedModules: []
290 | monoEnv:
291 | psp2Splashimage: {fileID: 0}
292 | psp2NPTrophyPackPath:
293 | psp2NPSupportGBMorGJP: 0
294 | psp2NPAgeRating: 12
295 | psp2NPTitleDatPath:
296 | psp2NPCommsID:
297 | psp2NPCommunicationsID:
298 | psp2NPCommsPassphrase:
299 | psp2NPCommsSig:
300 | psp2ParamSfxPath:
301 | psp2ManualPath:
302 | psp2LiveAreaGatePath:
303 | psp2LiveAreaBackroundPath:
304 | psp2LiveAreaPath:
305 | psp2LiveAreaTrialPath:
306 | psp2PatchChangeInfoPath:
307 | psp2PatchOriginalPackage:
308 | psp2PackagePassword: 5RhRXdCdG5nG5azdNMK66MuCV6GXi5xr
309 | psp2KeystoneFile:
310 | psp2MemoryExpansionMode: 0
311 | psp2DRMType: 0
312 | psp2StorageType: 0
313 | psp2MediaCapacity: 0
314 | psp2DLCConfigPath:
315 | psp2ThumbnailPath:
316 | psp2BackgroundPath:
317 | psp2SoundPath:
318 | psp2TrophyCommId:
319 | psp2TrophyPackagePath:
320 | psp2PackagedResourcesPath:
321 | psp2SaveDataQuota: 10240
322 | psp2ParentalLevel: 1
323 | psp2ShortTitle: Not Set
324 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF
325 | psp2Category: 0
326 | psp2MasterVersion: 01.00
327 | psp2AppVersion: 01.00
328 | psp2TVBootMode: 0
329 | psp2EnterButtonAssignment: 2
330 | psp2TVDisableEmu: 0
331 | psp2AllowTwitterDialog: 1
332 | psp2Upgradable: 0
333 | psp2HealthWarning: 0
334 | psp2UseLibLocation: 0
335 | psp2InfoBarOnStartup: 0
336 | psp2InfoBarColor: 0
337 | psp2UseDebugIl2cppLibs: 0
338 | psmSplashimage: {fileID: 0}
339 | spritePackerPolicy:
340 | scriptingDefineSymbols: {}
341 | metroPackageName: CTModeler
342 | metroPackageVersion:
343 | metroCertificatePath:
344 | metroCertificatePassword:
345 | metroCertificateSubject:
346 | metroCertificateIssuer:
347 | metroCertificateNotAfter: 0000000000000000
348 | metroApplicationDescription: CTModeler
349 | wsaImages: {}
350 | metroTileShortName:
351 | metroCommandLineArgsFile:
352 | metroTileShowName: 0
353 | metroMediumTileShowName: 0
354 | metroLargeTileShowName: 0
355 | metroWideTileShowName: 0
356 | metroDefaultTileSize: 1
357 | metroTileForegroundText: 1
358 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0}
359 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628,
360 | a: 1}
361 | metroSplashScreenUseBackgroundColor: 0
362 | platformCapabilities: {}
363 | metroFTAName:
364 | metroFTAFileTypes: []
365 | metroProtocolName:
366 | metroCompilationOverrides: 1
367 | tizenProductDescription:
368 | tizenProductURL:
369 | tizenSigningProfileName:
370 | tizenGPSPermissions: 0
371 | tizenMicrophonePermissions: 0
372 | tizenMinOSVersion: 0
373 | n3dsUseExtSaveData: 0
374 | n3dsCompressStaticMem: 1
375 | n3dsExtSaveDataNumber: 0x12345
376 | n3dsStackSize: 131072
377 | n3dsTargetPlatform: 2
378 | n3dsRegion: 7
379 | n3dsMediaSize: 0
380 | n3dsLogoStyle: 3
381 | n3dsTitle: GameName
382 | n3dsProductCode:
383 | n3dsApplicationId: 0xFF3FF
384 | stvDeviceAddress:
385 | stvProductDescription:
386 | stvProductAuthor:
387 | stvProductAuthorEmail:
388 | stvProductLink:
389 | stvProductCategory: 0
390 | XboxOneProductId:
391 | XboxOneUpdateKey:
392 | XboxOneSandboxId:
393 | XboxOneContentId:
394 | XboxOneTitleId:
395 | XboxOneSCId:
396 | XboxOneGameOsOverridePath:
397 | XboxOnePackagingOverridePath:
398 | XboxOneAppManifestOverridePath:
399 | XboxOnePackageEncryption: 0
400 | XboxOnePackageUpdateGranularity: 2
401 | XboxOneDescription:
402 | XboxOneIsContentPackage: 0
403 | XboxOneEnableGPUVariability: 0
404 | XboxOneSockets: {}
405 | XboxOneSplashScreen: {fileID: 0}
406 | XboxOneAllowedProductIds: []
407 | XboxOnePersistentLocalStorageSize: 0
408 | intPropertyNames:
409 | - Android::ScriptingBackend
410 | - Standalone::ScriptingBackend
411 | - WebGL::ScriptingBackend
412 | - WebGL::audioCompressionFormat
413 | - WebGL::exceptionSupport
414 | - WebGL::memorySize
415 | - WebPlayer::ScriptingBackend
416 | - iOS::Architecture
417 | - iOS::ScriptingBackend
418 | Android::ScriptingBackend: 0
419 | Standalone::ScriptingBackend: 0
420 | WebGL::ScriptingBackend: 1
421 | WebGL::audioCompressionFormat: 4
422 | WebGL::exceptionSupport: 1
423 | WebGL::memorySize: 256
424 | WebPlayer::ScriptingBackend: 0
425 | iOS::Architecture: 2
426 | iOS::ScriptingBackend: 1
427 | boolPropertyNames:
428 | - Android::VR::enable
429 | - Metro::VR::enable
430 | - N3DS::VR::enable
431 | - PS3::VR::enable
432 | - PS4::VR::enable
433 | - PSM::VR::enable
434 | - PSP2::VR::enable
435 | - SamsungTV::VR::enable
436 | - Standalone::VR::enable
437 | - Tizen::VR::enable
438 | - WebGL::VR::enable
439 | - WebGL::analyzeBuildSize
440 | - WebGL::dataCaching
441 | - WebGL::useEmbeddedResources
442 | - WebPlayer::VR::enable
443 | - WiiU::VR::enable
444 | - Xbox360::VR::enable
445 | - XboxOne::VR::enable
446 | - XboxOne::enus
447 | - iOS::VR::enable
448 | - tvOS::VR::enable
449 | Android::VR::enable: 0
450 | Metro::VR::enable: 0
451 | N3DS::VR::enable: 0
452 | PS3::VR::enable: 0
453 | PS4::VR::enable: 0
454 | PSM::VR::enable: 0
455 | PSP2::VR::enable: 0
456 | SamsungTV::VR::enable: 0
457 | Standalone::VR::enable: 0
458 | Tizen::VR::enable: 0
459 | WebGL::VR::enable: 0
460 | WebGL::analyzeBuildSize: 0
461 | WebGL::dataCaching: 0
462 | WebGL::useEmbeddedResources: 0
463 | WebPlayer::VR::enable: 0
464 | WiiU::VR::enable: 0
465 | Xbox360::VR::enable: 0
466 | XboxOne::VR::enable: 0
467 | XboxOne::enus: 1
468 | iOS::VR::enable: 0
469 | tvOS::VR::enable: 0
470 | stringPropertyNames:
471 | - Analytics_ServiceEnabled::Analytics_ServiceEnabled
472 | - Build_ServiceEnabled::Build_ServiceEnabled
473 | - Collab_ServiceEnabled::Collab_ServiceEnabled
474 | - ErrorHub_ServiceEnabled::ErrorHub_ServiceEnabled
475 | - Game_Performance_ServiceEnabled::Game_Performance_ServiceEnabled
476 | - Hub_ServiceEnabled::Hub_ServiceEnabled
477 | - Purchasing_ServiceEnabled::Purchasing_ServiceEnabled
478 | - UNet_ServiceEnabled::UNet_ServiceEnabled
479 | - Unity_Ads_ServiceEnabled::Unity_Ads_ServiceEnabled
480 | - WebGL::emscriptenArgs
481 | - WebGL::template
482 | - additionalIl2CppArgs::additionalIl2CppArgs
483 | Analytics_ServiceEnabled::Analytics_ServiceEnabled: False
484 | Build_ServiceEnabled::Build_ServiceEnabled: False
485 | Collab_ServiceEnabled::Collab_ServiceEnabled: False
486 | ErrorHub_ServiceEnabled::ErrorHub_ServiceEnabled: False
487 | Game_Performance_ServiceEnabled::Game_Performance_ServiceEnabled: False
488 | Hub_ServiceEnabled::Hub_ServiceEnabled: False
489 | Purchasing_ServiceEnabled::Purchasing_ServiceEnabled: False
490 | UNet_ServiceEnabled::UNet_ServiceEnabled: False
491 | Unity_Ads_ServiceEnabled::Unity_Ads_ServiceEnabled: False
492 | WebGL::emscriptenArgs:
493 | WebGL::template: APPLICATION:Default
494 | additionalIl2CppArgs::additionalIl2CppArgs:
495 | vectorPropertyNames:
496 | - Android::VR::enabledDevices
497 | - Metro::VR::enabledDevices
498 | - N3DS::VR::enabledDevices
499 | - PS3::VR::enabledDevices
500 | - PS4::VR::enabledDevices
501 | - PSM::VR::enabledDevices
502 | - PSP2::VR::enabledDevices
503 | - SamsungTV::VR::enabledDevices
504 | - Standalone::VR::enabledDevices
505 | - Tizen::VR::enabledDevices
506 | - WebGL::VR::enabledDevices
507 | - WebPlayer::VR::enabledDevices
508 | - WiiU::VR::enabledDevices
509 | - Xbox360::VR::enabledDevices
510 | - XboxOne::VR::enabledDevices
511 | - iOS::VR::enabledDevices
512 | - tvOS::VR::enabledDevices
513 | Android::VR::enabledDevices:
514 | - Oculus
515 | Metro::VR::enabledDevices: []
516 | N3DS::VR::enabledDevices: []
517 | PS3::VR::enabledDevices: []
518 | PS4::VR::enabledDevices:
519 | - PlayStationVR
520 | PSM::VR::enabledDevices: []
521 | PSP2::VR::enabledDevices: []
522 | SamsungTV::VR::enabledDevices: []
523 | Standalone::VR::enabledDevices:
524 | - Oculus
525 | Tizen::VR::enabledDevices: []
526 | WebGL::VR::enabledDevices: []
527 | WebPlayer::VR::enabledDevices: []
528 | WiiU::VR::enabledDevices: []
529 | Xbox360::VR::enabledDevices: []
530 | XboxOne::VR::enabledDevices: []
531 | iOS::VR::enabledDevices: []
532 | tvOS::VR::enabledDevices: []
533 | cloudProjectId:
534 | projectName:
535 | organizationId:
536 | cloudEnabled: 0
537 |
--------------------------------------------------------------------------------
/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 5.4.1f1
2 | m_StandardAssetsVersion: 0
3 |
--------------------------------------------------------------------------------
/ProjectSettings/QualitySettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!47 &1
4 | QualitySettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 5
7 | m_CurrentQuality: 5
8 | m_QualitySettings:
9 | - serializedVersion: 2
10 | name: Fastest
11 | pixelLightCount: 0
12 | shadows: 0
13 | shadowResolution: 0
14 | shadowProjection: 1
15 | shadowCascades: 1
16 | shadowDistance: 15
17 | shadowNearPlaneOffset: 2
18 | shadowCascade2Split: 0.33333334
19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
20 | blendWeights: 1
21 | textureQuality: 1
22 | anisotropicTextures: 0
23 | antiAliasing: 0
24 | softParticles: 0
25 | softVegetation: 0
26 | realtimeReflectionProbes: 0
27 | billboardsFaceCameraPosition: 0
28 | vSyncCount: 0
29 | lodBias: 0.3
30 | maximumLODLevel: 0
31 | particleRaycastBudget: 4
32 | asyncUploadTimeSlice: 2
33 | asyncUploadBufferSize: 4
34 | excludedTargetPlatforms: []
35 | - serializedVersion: 2
36 | name: Fast
37 | pixelLightCount: 0
38 | shadows: 0
39 | shadowResolution: 0
40 | shadowProjection: 1
41 | shadowCascades: 1
42 | shadowDistance: 20
43 | shadowNearPlaneOffset: 2
44 | shadowCascade2Split: 0.33333334
45 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
46 | blendWeights: 2
47 | textureQuality: 0
48 | anisotropicTextures: 0
49 | antiAliasing: 0
50 | softParticles: 0
51 | softVegetation: 0
52 | realtimeReflectionProbes: 0
53 | billboardsFaceCameraPosition: 0
54 | vSyncCount: 0
55 | lodBias: 0.4
56 | maximumLODLevel: 0
57 | particleRaycastBudget: 16
58 | asyncUploadTimeSlice: 2
59 | asyncUploadBufferSize: 4
60 | excludedTargetPlatforms: []
61 | - serializedVersion: 2
62 | name: Simple
63 | pixelLightCount: 1
64 | shadows: 1
65 | shadowResolution: 0
66 | shadowProjection: 1
67 | shadowCascades: 1
68 | shadowDistance: 20
69 | shadowNearPlaneOffset: 2
70 | shadowCascade2Split: 0.33333334
71 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
72 | blendWeights: 2
73 | textureQuality: 0
74 | anisotropicTextures: 1
75 | antiAliasing: 0
76 | softParticles: 0
77 | softVegetation: 0
78 | realtimeReflectionProbes: 0
79 | billboardsFaceCameraPosition: 0
80 | vSyncCount: 1
81 | lodBias: 0.7
82 | maximumLODLevel: 0
83 | particleRaycastBudget: 64
84 | asyncUploadTimeSlice: 2
85 | asyncUploadBufferSize: 4
86 | excludedTargetPlatforms: []
87 | - serializedVersion: 2
88 | name: Good
89 | pixelLightCount: 2
90 | shadows: 2
91 | shadowResolution: 1
92 | shadowProjection: 1
93 | shadowCascades: 2
94 | shadowDistance: 40
95 | shadowNearPlaneOffset: 2
96 | shadowCascade2Split: 0.33333334
97 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
98 | blendWeights: 2
99 | textureQuality: 0
100 | anisotropicTextures: 1
101 | antiAliasing: 0
102 | softParticles: 0
103 | softVegetation: 1
104 | realtimeReflectionProbes: 1
105 | billboardsFaceCameraPosition: 1
106 | vSyncCount: 1
107 | lodBias: 1
108 | maximumLODLevel: 0
109 | particleRaycastBudget: 256
110 | asyncUploadTimeSlice: 2
111 | asyncUploadBufferSize: 4
112 | excludedTargetPlatforms: []
113 | - serializedVersion: 2
114 | name: Beautiful
115 | pixelLightCount: 3
116 | shadows: 2
117 | shadowResolution: 2
118 | shadowProjection: 1
119 | shadowCascades: 2
120 | shadowDistance: 70
121 | shadowNearPlaneOffset: 2
122 | shadowCascade2Split: 0.33333334
123 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
124 | blendWeights: 4
125 | textureQuality: 0
126 | anisotropicTextures: 2
127 | antiAliasing: 2
128 | softParticles: 1
129 | softVegetation: 1
130 | realtimeReflectionProbes: 1
131 | billboardsFaceCameraPosition: 1
132 | vSyncCount: 1
133 | lodBias: 1.5
134 | maximumLODLevel: 0
135 | particleRaycastBudget: 1024
136 | asyncUploadTimeSlice: 2
137 | asyncUploadBufferSize: 4
138 | excludedTargetPlatforms: []
139 | - serializedVersion: 2
140 | name: Fantastic
141 | pixelLightCount: 4
142 | shadows: 2
143 | shadowResolution: 2
144 | shadowProjection: 1
145 | shadowCascades: 4
146 | shadowDistance: 150
147 | shadowNearPlaneOffset: 2
148 | shadowCascade2Split: 0.33333334
149 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
150 | blendWeights: 4
151 | textureQuality: 0
152 | anisotropicTextures: 2
153 | antiAliasing: 2
154 | softParticles: 1
155 | softVegetation: 1
156 | realtimeReflectionProbes: 1
157 | billboardsFaceCameraPosition: 1
158 | vSyncCount: 1
159 | lodBias: 2
160 | maximumLODLevel: 0
161 | particleRaycastBudget: 4096
162 | asyncUploadTimeSlice: 2
163 | asyncUploadBufferSize: 4
164 | excludedTargetPlatforms: []
165 | m_PerPlatformDefaultQuality:
166 | Android: 2
167 | Nintendo 3DS: 5
168 | PS3: 5
169 | PS4: 5
170 | PSM: 5
171 | PSP2: 2
172 | Samsung TV: 2
173 | Standalone: 5
174 | Tizen: 2
175 | Web: 5
176 | WebGL: 3
177 | WiiU: 5
178 | Windows Store Apps: 5
179 | XBOX360: 5
180 | XboxOne: 5
181 | iPhone: 2
182 | tvOS: 5
183 |
--------------------------------------------------------------------------------
/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!78 &1
4 | TagManager:
5 | serializedVersion: 2
6 | tags: []
7 | layers:
8 | - Default
9 | - TransparentFX
10 | - Ignore Raycast
11 | -
12 | - Water
13 | - UI
14 | -
15 | -
16 | -
17 | -
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | m_SortingLayers:
41 | - name: Default
42 | uniqueID: 0
43 | locked: 0
44 |
--------------------------------------------------------------------------------
/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!5 &1
4 | TimeManager:
5 | m_ObjectHideFlags: 0
6 | Fixed Timestep: 0.02
7 | Maximum Allowed Timestep: 0.33333334
8 | m_TimeScale: 1
9 |
--------------------------------------------------------------------------------
/ProjectSettings/UnityAdsSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!292 &1
4 | UnityAdsSettings:
5 | m_ObjectHideFlags: 0
6 | m_Enabled: 0
7 | m_InitializeOnStartup: 1
8 | m_TestMode: 0
9 | m_EnabledPlatforms: 4294967295
10 | m_IosGameId:
11 | m_AndroidGameId:
12 |
--------------------------------------------------------------------------------
/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!310 &1
4 | UnityConnectSettings:
5 | m_ObjectHideFlags: 0
6 | m_Enabled: 0
7 | m_TestMode: 0
8 | m_TestEventUrl:
9 | m_TestConfigUrl:
10 | CrashReportingSettings:
11 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes
12 | m_Enabled: 0
13 | UnityPurchasingSettings:
14 | m_Enabled: 0
15 | m_TestMode: 0
16 | UnityAnalyticsSettings:
17 | m_Enabled: 0
18 | m_InitializeOnStartup: 1
19 | m_TestMode: 0
20 | m_TestEventUrl:
21 | m_TestConfigUrl:
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CTModeler: A procedural model generator for Unity
2 |
3 | 
4 |
5 | This is a port of [Ken Perlin](http://mrl.nyu.edu/~perlin/)'s [WebGL-based procedural modeler-renderer](http://mrl.nyu.edu/~perlin/example3d_1/) to Unity in C#, which here allows you to create procedural models and meshes at runtime.
6 |
7 | Features support for a variety of parametric surfaces, including surfaces of revolution…
8 |
9 | 
10 |
11 | …extruded surfaces…
12 |
13 | 
14 |
15 | …and general parametric surfaces…
16 |
17 | 
18 |
19 | …among other tools for concisely creating procedural meshes through code at runtime. In particular, every shape in the included library has support for automatically generated UVs and normals.
20 |
21 | 
22 |
23 | Also included are customized inspectors that help you tweak your parameters and control when meshes are regenerated.
24 |
25 | 
26 |
27 | All this is done through a simple, concise interface. For example, here's all you need to define a torus:
28 |
29 | ```csharp
30 | public class Torus : CT.Revolved {
31 |
32 | public float radius = 0.3f;
33 |
34 | protected override Vector2 RevolutionFunction(float t) {
35 | float phi = 2 * Mathf.PI * t;
36 | return new Vector2(1 - radius * Mathf.Cos(phi), -radius * Mathf.Sin(phi));
37 | }
38 | }
39 | ```
40 |
41 | Adding this script to any GameObject in the scene will cause the torus model to be dynamically generated and added to the object's MeshFilter, both in edit mode and at runtime.
42 |
43 | ## Requirements
44 |
45 | This project was built with Unity 5.4. Other versions may also be compatible, but have not been thoroughly tested.
46 |
47 | ## How to get it
48 |
49 | To start using CTModeler, clone or download this repository.
50 |
51 | To get a sense of what the capabilities are, you can open the root directory as a project in Unity and open the scene at `Assets/Example Scene.unity`.
52 |
53 | To use this in your own projects, copy the `Assets/CTModeler` directory to your own project's `Assets` directory.
54 |
55 | ## License
56 |
57 | This project is licensed under the MIT license. See LICENSE.txt for the full license text.
--------------------------------------------------------------------------------
/README_media/cup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kronopath/CTModeler/b904d365d27d6ba86fa02f5fcba5e36a13e696bd/README_media/cup.png
--------------------------------------------------------------------------------
/README_media/inspector.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kronopath/CTModeler/b904d365d27d6ba86fa02f5fcba5e36a13e696bd/README_media/inspector.png
--------------------------------------------------------------------------------
/README_media/knot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kronopath/CTModeler/b904d365d27d6ba86fa02f5fcba5e36a13e696bd/README_media/knot.png
--------------------------------------------------------------------------------
/README_media/noisy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kronopath/CTModeler/b904d365d27d6ba86fa02f5fcba5e36a13e696bd/README_media/noisy.png
--------------------------------------------------------------------------------
/README_media/polyhedron.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kronopath/CTModeler/b904d365d27d6ba86fa02f5fcba5e36a13e696bd/README_media/polyhedron.png
--------------------------------------------------------------------------------
/README_media/thegang.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kronopath/CTModeler/b904d365d27d6ba86fa02f5fcba5e36a13e696bd/README_media/thegang.png
--------------------------------------------------------------------------------