Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
5e2960b
basic pointer for sculpt prototype
cdadashovkhandan Apr 27, 2022
fec1be0
fix pointer deactivation crash bug
cdadashovkhandan Apr 27, 2022
bd41d03
proximity-based sculpting in one direction
cdadashovkhandan Apr 28, 2022
51f721e
adjustible direction
cdadashovkhandan Apr 28, 2022
d4fe6f8
fix repositioning bug
cdadashovkhandan May 2, 2022
dac1679
fix invisible controller bug, fix meshes resetting themselves
cdadashovkhandan May 3, 2022
69d7ec1
fix sculpt tool scaling
cdadashovkhandan May 3, 2022
f494037
[partially broken] basic undo/redo functionality
cdadashovkhandan May 5, 2022
32619ef
improve undo queue significantly
cdadashovkhandan May 9, 2022
018b8d8
fix undo queue not including the initial change. Add sound effects
cdadashovkhandan May 9, 2022
fa7eee1
early naive saving feature
cdadashovkhandan May 25, 2022
be61910
saving feature bugfixes
cdadashovkhandan May 26, 2022
d1c95cb
hideously fix the saving issue
cdadashovkhandan May 27, 2022
fdd2b77
optimize undo/redo
cdadashovkhandan May 30, 2022
74325fb
fix batch indexing issues
cdadashovkhandan May 30, 2022
a0d3717
cleanup and document code
cdadashovkhandan Jun 1, 2022
c5a8231
basic sculpt tools menu
cdadashovkhandan Jun 3, 2022
e316efd
rename prototypes to proper tools
cdadashovkhandan Jun 3, 2022
4979511
improve sculpt tool models
cdadashovkhandan Jun 3, 2022
0a0ea2b
basic pull tool
cdadashovkhandan Jun 3, 2022
b5e0ca9
optimize SketchMemoryScript::m_SavedSculptedGeometry to work with a q…
cdadashovkhandan Jun 5, 2022
17c51a5
fix selection undo bug
cdadashovkhandan Jun 6, 2022
7fac933
partially fix duplicate sculpts not saving
cdadashovkhandan Jun 6, 2022
15015ac
create basic crease tool
cdadashovkhandan Jun 8, 2022
ad76d3d
restrcuture tool transforms to be separable
cdadashovkhandan Jun 8, 2022
16f9b6c
restructure sculpting tools to work modularly
cdadashovkhandan Jun 9, 2022
2a0f220
minor styling fixes
cdadashovkhandan Jun 9, 2022
8e4da0b
Add Copyright info to subtools
cdadashovkhandan Jun 9, 2022
35aecf8
basic UI
cdadashovkhandan Jun 9, 2022
ffec789
might have missed this, committing just in case
cdadashovkhandan Jun 9, 2022
818c8b8
beautify crease tool tip
cdadashovkhandan Jun 10, 2022
18f86d3
make pull tool slightly less spiky
cdadashovkhandan Jun 10, 2022
6402330
broken flattening tool
cdadashovkhandan Jun 10, 2022
9b1ec1c
fix geometry occasionally not saving
cdadashovkhandan Jun 13, 2022
07d5b6c
god I should really cleanup after myself after doing tons of print de…
cdadashovkhandan Jun 13, 2022
6ff1f34
get flattening tool working
cdadashovkhandan Jun 15, 2022
e6af91a
Refactor Subtool to SubTool because I kept getting confused. Also add…
cdadashovkhandan Jun 15, 2022
b28a679
lay foundation for rotate tool
cdadashovkhandan Jun 15, 2022
0986835
broken rotate tool, polish flattening tool
cdadashovkhandan Jun 16, 2022
cca794a
Refactor subtools to get tool transform, get rudimentary rotation sor…
cdadashovkhandan Jun 16, 2022
b224787
tiny optimizations
cdadashovkhandan Jun 17, 2022
0d4a492
get rotation tool working wtihout canvas transforms
cdadashovkhandan Jun 17, 2022
f1ee25f
get rotation tool almost working
cdadashovkhandan Jun 17, 2022
4fc1bf1
fix recolor tool
cdadashovkhandan Jun 17, 2022
e27ea6a
recapitalize some file names (god this was terrible)
cdadashovkhandan Jun 24, 2022
d85e0f3
wrap stuff up before polish
cdadashovkhandan Jul 6, 2022
460ce62
Merge pull request #1 from cdadashovkhandan/new_tools
cdadashovkhandan Jul 6, 2022
4e983a2
significantly restructure subtool code to be marginally less idiotic
cdadashovkhandan Jul 6, 2022
c6b82ed
fix crease tool bounds detection
cdadashovkhandan Jul 6, 2022
8ecb869
Refactor Repaint command's sculpting changes
cdadashovkhandan Jul 6, 2022
484a739
Replace all placeholder UI icons
cdadashovkhandan Jul 6, 2022
ca3a958
add button toggle higlight and missing copyright notice
cdadashovkhandan Jul 7, 2022
3fb9790
remove commented code, fix null exception on load
cdadashovkhandan Jul 10, 2022
899b290
increase minimum sculpt tool size
cdadashovkhandan Jul 10, 2022
de8949e
comment and polish code
cdadashovkhandan Jul 11, 2022
ee9ccde
Merge pull request #2 from cdadashovkhandan/finalpolish
cdadashovkhandan Jul 11, 2022
9182376
final code style adjustments
cdadashovkhandan Jul 11, 2022
9d09e37
Update README for my own project
cdadashovkhandan Jul 12, 2022
a692ab5
Merge remote-tracking branch 'origin/main' into feature/sculpting
andybak Sep 26, 2023
fee8f20
Post-merge fixes
andybak Sep 26, 2023
cb4d46c
dotnet-format
andybak Sep 26, 2023
7ddb926
Merge remote-tracking branch 'upstream/main' into feature/sculpting
andybak Sep 30, 2023
d986143
Merge remote-tracking branch 'upstream/main' into feature/sculpting
andybak Oct 26, 2023
9f019b3
Unity autogenerated InputActions changes
andybak Oct 27, 2023
a013993
Merge remote-tracking branch 'upstream/main' into feature/sculpting
andybak Nov 23, 2023
0e2ee12
[CI BUILD]
andybak Nov 23, 2023
29b93f5
Merge remote-tracking branch 'upstream/main' into feature/sculpting
andybak Nov 29, 2023
6098624
Merge remote-tracking branch 'upstream/main' into feature/sculpting
andybak Dec 7, 2023
338caab
Merge remote-tracking branch 'upstream/main' into feature/sculpting
andybak Dec 7, 2023
9275cc1
Merge remote-tracking branch 'upstream/main' into feature/sculpting
andybak Dec 20, 2023
623cef9
[CI BUILD]
andybak Dec 20, 2023
9083901
Merge remote-tracking branch 'upstream/main' into feature/sculpting
andybak Jan 1, 2024
eb02754
Merge remote-tracking branch 'upstream/main' into feature/sculpting
andybak Feb 28, 2024
2c28ef4
Merge remote-tracking branch 'upstream/main' into feature/sculpting
andybak Mar 5, 2024
c7e47a0
Fix NRE on sculpt tool (audio source)
andybak Mar 5, 2024
616502c
Make the sculpt tool into a prefab
andybak Mar 5, 2024
7b1ed61
Rename bool on stroke to be more generic than just about sculpting
andybak Mar 6, 2024
b02f923
Merge remote-tracking branch 'upstream/main' into feature/sculpting
andybak Mar 25, 2024
c25b7bf
Add sculpt tools for mobile
andybak Mar 25, 2024
55182da
Merge branch 'main' into feature/sculpting
andybak Mar 25, 2024
0ab81e8
Fix sculpt tools tray position
andybak Mar 25, 2024
adc74f4
Merge remote-tracking branch 'upstream/main' into feature/sculpting
andybak Apr 3, 2024
1d7d10e
Merge remote-tracking branch 'origin/main' into feature/sculpting
andybak Apr 7, 2024
4a95fb5
[CI BUILD]
andybak Apr 8, 2024
8b5c4a3
Merge remote-tracking branch 'upstream/main' into feature/sculpting
andybak May 3, 2024
b103590
Merge remote-tracking branch 'origin/main' into feature/sculpting
andybak May 3, 2024
a05dd92
Merge remote-tracking branch 'origin/main' into feature/sculpting
andybak Sep 15, 2024
7ce55f4
Work in progress
andybak Dec 22, 2024
dfa224f
Merge remote-tracking branch 'origin/main' into feature/sculpting
andybak Dec 22, 2024
30ae26c
Avoid NRE when secrets are missing
andybak Dec 22, 2024
3ad7bab
Merge remote-tracking branch 'origin/main' into feature/sculpting
andybak Jan 13, 2025
e1ca010
Merge remote-tracking branch 'origin/main' into feature/sculpting
andybak Feb 27, 2025
286c368
[CI BUILD]
andybak Feb 27, 2025
ff19197
Merge remote-tracking branch 'origin/main' into feature/sculpting
andybak Apr 21, 2025
d8e0eba
Merge remote-tracking branch 'origin/main' into feature/sculpting
andybak May 1, 2025
8a81aa4
Merge remote-tracking branch 'origin/main' into feature/sculpting
andybak May 1, 2025
f116f48
Merge branch 'main' into feature/sculpting
andybak May 28, 2025
160e385
[CI BUILD]
andybak May 28, 2025
ac4518f
Merge remote-tracking branch 'origin/main' into feature/sculpting
andybak Jun 25, 2025
319d677
Merge remote-tracking branch 'origin/main' into feature/sculpting
andybak Jun 26, 2025
3ad206c
[CI BUILD]
andybak Jun 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Assets/Editor/Tests/TestBrush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public static List<Stroke> GetStrokesFromTilt(string path)
{
var bufferedStream = new BufferedStream(stream, 4096);
return SketchWriter.GetStrokes(
bufferedStream, metadata.BrushIndex, BitConverter.IsLittleEndian);
bufferedStream, metadata.BrushIndex, BitConverter.IsLittleEndian, null);
}
}

Expand Down
8 changes: 8 additions & 0 deletions Assets/Materials/sculpting.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 78 additions & 0 deletions Assets/Materials/sculpting/Interactor.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Interactor
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _GlossMapScale: 1
- _Glossiness: 0.639
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 3
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 0
m_Colors:
- _Color: {r: 0, g: 0.85882354, b: 0.98039216, a: 0.43529412}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
8 changes: 8 additions & 0 deletions Assets/Materials/sculpting/Interactor.mat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 86 additions & 0 deletions Assets/Materials/sculpting/SculptOff.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: SculptOff
m_Shader: {fileID: 4800000, guid: 4ec22985cf4da3a489262499812ec6c7, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _EMISSION
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: c8848c12b4797314d8055899b5eef959, type: 3}
m_Scale: {x: 0.1, y: 4}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _TilingX: 3
- _TilingY: 1
- _UVSec: 0
- _VectorX: 0
- _VectorY: 1
- _VectorZ: 1
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.6320754, g: 0.3488341, b: 0.3822964, a: 1}
- _EmissionColor: {r: 0.4665165, g: 0.018294765, b: 0, a: 1}
m_BuildTextureStacks: []
8 changes: 8 additions & 0 deletions Assets/Materials/sculpting/SculptOff.mat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 86 additions & 0 deletions Assets/Materials/sculpting/SculptOn.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: SculptOn
m_Shader: {fileID: 4800000, guid: 4ec22985cf4da3a489262499812ec6c7, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _EMISSION
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: c8848c12b4797314d8055899b5eef959, type: 3}
m_Scale: {x: 0.1, y: 4}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _TilingX: 1
- _TilingY: 1
- _UVSec: 0
- _VectorX: 0
- _VectorY: 0
- _VectorZ: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.4309808, g: 0.6132076, b: 0.44813156, a: 1}
- _EmissionColor: {r: 0, g: 0.34943, b: 0.03293058, a: 1}
m_BuildTextureStacks: []
8 changes: 8 additions & 0 deletions Assets/Materials/sculpting/SculptOn.mat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/MeshSaver.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Assets/MeshSaver/Editor.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions Assets/MeshSaver/Editor/MeshSaverEditor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using UnityEditor;

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public static class MeshSaverEditor
{

[MenuItem("CONTEXT/MeshFilter/Save Mesh...")]
public static void SaveMeshInPlace(MenuCommand menuCommand)
{
MeshFilter mf = menuCommand.context as MeshFilter;
Mesh m = mf.sharedMesh;
SaveMesh(m, m.name, false, true);
}

[MenuItem("CONTEXT/MeshFilter/Save Mesh As New Instance...")]
public static void SaveMeshNewInstanceItem(MenuCommand menuCommand)
{
MeshFilter mf = menuCommand.context as MeshFilter;
Mesh m = mf.sharedMesh;
SaveMesh(m, m.name, true, true);
}

public static void SaveMesh(Mesh mesh, string name, bool makeNewInstance, bool optimizeMesh)
{
string path = EditorUtility.SaveFilePanel("Save Separate Mesh Asset", "Assets/", name, "asset");
if (string.IsNullOrEmpty(path)) return;

path = FileUtil.GetProjectRelativePath(path);

Mesh meshToSave = (makeNewInstance) ? Object.Instantiate(mesh) as Mesh : mesh;

if (optimizeMesh)
MeshUtility.Optimize(meshToSave);

AssetDatabase.CreateAsset(meshToSave, path);
AssetDatabase.SaveAssets();
}

}
8 changes: 8 additions & 0 deletions Assets/MeshSaver/Editor/MeshSaverEditor.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/Models/Offsculptsphere.fbx
Binary file not shown.
Loading