Skip to content

Commit

Permalink
improve smoothing increase vertex limit and simplify based on direction
Browse files Browse the repository at this point in the history
  • Loading branch information
z3y committed Oct 7, 2024
1 parent b001ee0 commit 2c75bf9
Show file tree
Hide file tree
Showing 12 changed files with 3,086 additions and 263 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/trigger-discord-notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Notify Discord on Release

on:
release:
types: [published]
workflow_dispatch:

jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Notify Discord
uses: z3y/discord-notify-action@main
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
69 changes: 56 additions & 13 deletions Marker.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2019337315198530332}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -0.0829, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2001729877566014812}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2032845121056251825
GameObject:
Expand Down Expand Up @@ -61,14 +62,15 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2032845121056251825}
serializedVersion: 2
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1403787091852531294}
- {fileID: 7777484072581266480}
m_Father: {fileID: 2903118327533707875}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &7804390770133668919
MeshFilter:
Expand All @@ -89,10 +91,12 @@ MeshRenderer:
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
Expand All @@ -117,6 +121,7 @@ MeshRenderer:
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!114 &247781027315986262
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -175,10 +180,21 @@ Rigidbody:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2032845121056251825}
serializedVersion: 2
serializedVersion: 4
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_CenterOfMass: {x: 0, y: 0, z: 0}
m_InertiaTensor: {x: 1, y: 1, z: 1}
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
Expand Down Expand Up @@ -224,9 +240,17 @@ BoxCollider:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2032845121056251825}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 1
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 2
serializedVersion: 3
m_Size: {x: 0.014627193, y: 0.108970135, z: 0.014627193}
m_Center: {x: 0, y: -0.017480157, z: 0}
--- !u!114 &8185343913060578764
Expand Down Expand Up @@ -268,12 +292,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2169617538071609757}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.0557, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2001729877566014812}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!136 &3450755910298653659
CapsuleCollider:
Expand All @@ -283,8 +308,17 @@ CapsuleCollider:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2169617538071609757}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 1
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.01
m_Height: 0.035
m_Direction: 1
Expand Down Expand Up @@ -363,16 +397,17 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2522616194857629913}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2001729877566014812}
- {fileID: 4561873240379091643}
- {fileID: 7803674704019757796}
- {fileID: 7487325458106536107}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &8550257781792610365
MonoBehaviour:
Expand All @@ -389,9 +424,9 @@ MonoBehaviour:
marker: {fileID: 247781027315986262}
markerTrail: {fileID: 3968491154304474225}
width: 0.003
smoothing: 0.67
smoothingTime: 0.06
updateRate: 0.03
minDistance: 0.003
minDistance: 0.0025
trailType: 0
trailEmission: 1
color: {r: 1, g: 1, b: 1, a: 0}
Expand Down Expand Up @@ -422,6 +457,7 @@ MonoBehaviour:
atime6: 0
atime7: 0
m_Mode: 0
m_ColorSpace: -1
m_NumColorKeys: 2
m_NumAlphaKeys: 2
--- !u!1 &6357700640741054161
Expand Down Expand Up @@ -449,12 +485,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6357700640741054161}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2903118327533707875}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3968491154304474225
MonoBehaviour:
Expand Down Expand Up @@ -509,13 +546,14 @@ MonoBehaviour:
atime6: 0
atime7: 0
m_Mode: 0
m_ColorSpace: -1
m_NumColorKeys: 2
m_NumAlphaKeys: 2
emission: 1
minDistance: 0.003
minDistance: 0.0025
width: 0.003
updateRate: 0.03
smoothing: 0.67
smoothingTime: 0.06
trailStorage: {fileID: 9083297691627360494}
isLocal: 0
--- !u!114 &7191321336371695368
Expand Down Expand Up @@ -568,12 +606,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6456625099588236409}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2903118327533707875}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &9083297691627360494
MeshFilter:
Expand All @@ -594,10 +633,12 @@ MeshRenderer:
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 0
m_StaticShadowCaster: 0
m_MotionVectors: 2
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
Expand All @@ -622,6 +663,7 @@ MeshRenderer:
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &7874255600291941348
GameObject:
m_ObjectHideFlags: 0
Expand All @@ -647,12 +689,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7874255600291941348}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2903118327533707875}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &7926863938251667743
MonoBehaviour:
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Scripts/Erase.asset
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: Erase
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: f460db1a877f7274a87516df8d899259,
serializedUdonProgramAsset: {fileID: 11400000, guid: 16829d9d56fa19c4bbffe41e051a3d6d,
type: 2}
udonAssembly:
assemblyError:
Expand Down
3 changes: 1 addition & 2 deletions Runtime/Scripts/Erase.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

using UdonSharp;
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Scripts/Marker.asset
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: Marker
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: d5bd186c2f2b4244ca5dd1e276f1cff9,
serializedUdonProgramAsset: {fileID: 11400000, guid: b9ad317b84f411040b5f25085ceb7d6f,
type: 2}
udonAssembly:
assemblyError:
Expand Down
6 changes: 3 additions & 3 deletions Runtime/Scripts/MarkerSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ public enum TrailType


[Range(0.001f, 0.01f)] public float width = 0.003f;
[Range(0f, 1f)] public float smoothing = 0.67f;
[Range(0.01f, 0.99f)] public float smoothingTime = 0.06f;

[Tooltip("Min time before new lines are added")][Range(0.02f, 0.2f)] public float updateRate = 0.03f;
[Tooltip("Min distance before new lines are added")][Range(0.001f, 0.01f)] public float minDistance = 0.002f;
[Tooltip("Min distance before new lines are added")][Range(0.001f, 0.01f)] public float minDistance = 0.0025f;

[Header("Color Settings")]
public TrailType trailType;
Expand Down Expand Up @@ -55,7 +55,7 @@ public void UpdateMarkerSettings()
markerTrail.trailType = (int)trailType;

markerTrail.width = width;
markerTrail.smoothing = smoothing;
markerTrail.smoothingTime = smoothingTime;
markerTrail.updateRate = updateRate;
markerTrail.minDistance = minDistance;
//markerTrail._vertexLimit = vertexLimit;
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Scripts/MarkerSync.asset
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: MarkerSync
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 7bb22d0559f37e04c8290c9411192d60,
serializedUdonProgramAsset: {fileID: 11400000, guid: 2bba773be2065b14f957cb72f2509b4f,
type: 2}
udonAssembly:
assemblyError:
Expand Down
Loading

0 comments on commit 2c75bf9

Please sign in to comment.