Browse Source

Midi & Shader added + Correct Kinect Setup

post-projects
Cailean Finn 1 year ago
parent
commit
c405fe9d7c
  1. 393
      Assets/Act-4 Azure.unity
  2. 4
      Assets/Act-4 Barracuda.unity
  3. 8
      Assets/MIDI Controller.meta
  4. 1224
      Assets/MIDI Controller/Dwell.inputactions
  5. 14
      Assets/MIDI Controller/Dwell.inputactions.meta
  6. 36
      Assets/MIDI Controller/InputSystem.inputsettings.asset
  7. 8
      Assets/MIDI Controller/InputSystem.inputsettings.asset.meta
  8. 8
      Assets/NDI.meta
  9. 8
      Assets/Scripts.meta
  10. 143
      Assets/Scripts/MidiLiveMap.cs
  11. 11
      Assets/Scripts/MidiLiveMap.cs.meta
  12. 300
      Assets/Scripts/MidiMap.cs
  13. 11
      Assets/Scripts/MidiMap.cs.meta
  14. 8
      Assets/VFX.meta
  15. 46610
      Assets/VFX/A3_Avatar.vfx
  16. 7
      Assets/VFX/A3_Avatar.vfx.meta
  17. 5
      Packages/manifest.json
  18. 57
      Packages/packages-lock.json
  19. 4
      ProjectSettings/EditorBuildSettings.asset
  20. 2
      ProjectSettings/ProjectSettings.asset

393
Assets/Act-4 Azure.unity

@ -181,6 +181,21 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4771823038517518596, guid: 23470acf8ba76b04f80eaec2151717f6,
type: 3}
propertyPath: m_LocalScale.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: -4771823038517518596, guid: 23470acf8ba76b04f80eaec2151717f6,
type: 3}
propertyPath: m_LocalScale.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: -4771823038517518596, guid: 23470acf8ba76b04f80eaec2151717f6,
type: 3}
propertyPath: m_LocalScale.z
value: 1
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 23470acf8ba76b04f80eaec2151717f6,
type: 3}
propertyPath: m_Name
@ -191,6 +206,11 @@ PrefabInstance:
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 999221869988454612, guid: 23470acf8ba76b04f80eaec2151717f6,
type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
@ -203,6 +223,10 @@ PrefabInstance:
type: 3}
insertIndex: -1
addedObject: {fileID: 109379640}
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 23470acf8ba76b04f80eaec2151717f6,
type: 3}
insertIndex: -1
addedObject: {fileID: 109379643}
m_SourcePrefab: {fileID: 100100000, guid: 23470acf8ba76b04f80eaec2151717f6, type: 3}
--- !u!4 &109379638 stripped
Transform:
@ -245,7 +269,7 @@ MonoBehaviour:
posRelInvertedZ: 0
groundedFeet: 0
applyMuscleLimits: 0
flipLeftRight: 0
flipLeftRight: 1
horizontalOffset: 0
verticalOffset: 0.5
forwardOffset: 0
@ -278,6 +302,28 @@ Rigidbody:
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!137 &109379642 stripped
SkinnedMeshRenderer:
m_CorrespondingSourceObject: {fileID: 999221869988454612, guid: 23470acf8ba76b04f80eaec2151717f6,
type: 3}
m_PrefabInstance: {fileID: 109379637}
m_PrefabAsset: {fileID: 0}
--- !u!114 &109379643
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 109379639}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a8be8853279617ea196652fe43520855, type: 3}
m_Name:
m_EditorClassIdentifier:
_sources:
- {fileID: 109379642}
_pointCount: 65536
_compute: {fileID: 7200000, guid: feda2e5c3aa86f2d4865487ae1f2e229, type: 3}
--- !u!1 &157207112
GameObject:
m_ObjectHideFlags: 0
@ -546,12 +592,12 @@ MonoBehaviour:
jointPositionSmoothing: 1
estimateJointVelocities: 0
jointVelocitySmoothing: 2
boneOrientationConstraints: 1
boneOrientationConstraints: 0
bodySpinFilter: 0
playerCalibrationPose: 0
userManager: {fileID: 0}
gestureManager: {fileID: 0}
displayImages: 0101000001000000
displayImages: 0000000000000000
displayImageWidthPercent: 0.2
statusInfoText: {fileID: 0}
consoleLogMessages: 1
@ -579,6 +625,69 @@ Transform:
- {fileID: 1464251905}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &166659828
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 166659830}
- component: {fileID: 166659829}
m_Layer: 0
m_Name: InputSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &166659829
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 166659828}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Actions: {fileID: -944628639613478452, guid: a689688525390bb4eb2e9bc09dd1ab0c,
type: 3}
m_NotificationBehavior: 0
m_UIInputModule: {fileID: 0}
m_DeviceLostEvent:
m_PersistentCalls:
m_Calls: []
m_DeviceRegainedEvent:
m_PersistentCalls:
m_Calls: []
m_ControlsChangedEvent:
m_PersistentCalls:
m_Calls: []
m_ActionEvents: []
m_NeverAutoSwitchControlSchemes: 0
m_DefaultControlScheme: MIDI
m_DefaultActionMap: MIDI
m_SplitScreenIndex: -1
m_Camera: {fileID: 0}
--- !u!4 &166659830
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 166659828}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 6.5222516, y: 4.8517265, z: 6.3250847}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &201432153
GameObject:
m_ObjectHideFlags: 0
@ -597,7 +706,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!64 &201432154
MeshCollider:
m_ObjectHideFlags: 0
@ -694,6 +803,11 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 365239547}
- component: {fileID: 365239551}
- component: {fileID: 365239550}
- component: {fileID: 365239549}
- component: {fileID: 365239548}
- component: {fileID: 365239552}
m_Layer: 0
m_Name: VFX
m_TagString: Untagged
@ -717,6 +831,225 @@ Transform:
- {fileID: 109379638}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &365239548
MonoBehaviour:
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 365239546}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4a8a30692aafc9a45986bcae574256b1, type: 3}
m_Name:
m_EditorClassIdentifier:
_positionMapProperty:
m_Name: PositionMap
_bindVelocityMap: 0
_velocityMapProperty:
m_Name: VelocityMap
_bindNormalMap: 0
_normalMapProperty:
m_Name: NormalMap
_bindVertexCount: 0
_vertexCountProperty:
m_Name: VertexCount
Target: {fileID: 109379643}
--- !u!114 &365239549
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 365239546}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cdafc37f32b176349b1684c4455b98e9, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ExecuteInEditor: 1
m_Bindings:
- {fileID: 365239548}
m_VisualEffect: {fileID: 365239551}
--- !u!73398921 &365239550
VFXRenderer:
serializedVersion: 1
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 365239546}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 0
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 257
m_RendererPriority: 0
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!2083052967 &365239551
VisualEffect:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 365239546}
m_Enabled: 1
m_Asset: {fileID: 8926484042661614526, guid: 7cae2434885ad4845ab15b0380231ea8, type: 3}
m_InitialEventName: OnPlay
m_InitialEventNameOverriden: 0
m_StartSeed: 0
m_ResetSeedOnPlay: 1
m_AllowInstancing: 1
m_ResourceVersion: 1
m_PropertySheet:
m_Float:
m_Array:
- m_Value: 0.05
m_Name: Antenna Size
m_Overridden: 1
- m_Value: 0
m_Name: Antenna Rate
m_Overridden: 1
- m_Value: 20000
m_Name: Line Rate
m_Overridden: 1
- m_Value: 11.29
m_Name: Line Lifetime
m_Overridden: 1
- m_Value: 0.3
m_Name: Line Range
m_Overridden: 1
- m_Value: 0.01
m_Name: Line Thickness
m_Overridden: 1
- m_Value: 0
m_Name: Antenna Point Size
m_Overridden: 1
- m_Value: 0
m_Name: Point Lifetime Max
m_Overridden: 1
- m_Value: 0
m_Name: Point Rate
m_Overridden: 1
- m_Value: 0
m_Name: Turbulence Drag
m_Overridden: 1
- m_Value: 0.44
m_Name: Alpha
m_Overridden: 1
- m_Value: 0
m_Name: Static Size
m_Overridden: 1
- m_Value: 0
m_Name: Noise
m_Overridden: 1
- m_Value: 0
m_Name: Pont Lifetime Min
m_Overridden: 1
- m_Value: 0
m_Name: Turbulences
m_Overridden: 1
- m_Value: 0
m_Name: Turbulences Frequency
m_Overridden: 1
- m_Value: 0
m_Name: Turbulences Ratio
m_Overridden: 1
- m_Value: 0
m_Name: Turbulences Speed
m_Overridden: 1
m_Vector2f:
m_Array: []
m_Vector3f:
m_Array: []
m_Vector4f:
m_Array:
- m_Value: {x: 1, y: 0, z: 0, w: 1}
m_Name: Line Color
m_Overridden: 1
- m_Value: {x: 1, y: 0, z: 0, w: 1}
m_Name: Point Color
m_Overridden: 1
m_Uint:
m_Array: []
m_Int:
m_Array: []
m_Matrix4x4f:
m_Array: []
m_AnimationCurve:
m_Array: []
m_Gradient:
m_Array: []
m_NamedObject:
m_Array:
- m_Value: {fileID: 0}
m_Name: PositionMap
m_Overridden: 1
m_Bool:
m_Array:
- m_Value: 0
m_Name: Toggle Falling
m_Overridden: 1
- m_Value: 0
m_Name: Toggle Trail
m_Overridden: 1
- m_Value: 0
m_Name: Toggle Bubble
m_Overridden: 1
- m_Value: 0
m_Name: Toggle Line
m_Overridden: 1
- m_Value: 1
m_Name: Toggle Antenna
m_Overridden: 1
--- !u!114 &365239552
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 365239546}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 30ddee29d67e741429d68f6ce139af61, type: 3}
m_Name:
m_EditorClassIdentifier:
m_VFX: {fileID: 365239551}
f_PLifeMin: 5
f_PLifeMax: 20
f_PRate: 70000
f_PNoise: 0.5
f_PTurbPosition: 30
f_PRatio: 10
f_PFreq: 2
f_PTurb: 0.5
f_PTurbDrag: 8
f_ALRate: 1000
--- !u!1 &432432459
GameObject:
m_ObjectHideFlags: 0
@ -1480,6 +1813,56 @@ MonoBehaviour:
enableFptlForForwardOpaque: 0
enableBigTilePrepass: 0
isFptlEnabled: 0
--- !u!1 &1839129902
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1839129904}
- component: {fileID: 1839129903}
m_Layer: 0
m_Name: NDI Manager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1839129903
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1839129902}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d2d98e5bfcdff4847ad69efa861a8e7f, type: 3}
m_Name:
m_EditorClassIdentifier:
_ndiName: NDI Sender
_keepAlpha: 1
_captureMethod: 0
_sourceCamera: {fileID: 0}
_sourceTexture: {fileID: 0}
_resources: {fileID: 11400000, guid: 69304b86950074db7ba8caba75214004, type: 2}
--- !u!4 &1839129904
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1839129902}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 6.5222516, y: 4.8517265, z: 6.3250847}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1884213385
GameObject:
m_ObjectHideFlags: 0
@ -1623,3 +2006,5 @@ SceneRoots:
- {fileID: 1457849204}
- {fileID: 1214092765}
- {fileID: 162248098}
- {fileID: 1839129904}
- {fileID: 166659830}

4
Assets/Act-4 Barracuda.unity

@ -221,7 +221,7 @@ VisualEffect:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 307651365}
m_Enabled: 1
m_Asset: {fileID: 8926484042661614526, guid: 70ed7ab9ddb2dc9a2957ad0a45b516ea, type: 3}
m_Asset: {fileID: 0}
m_InitialEventName: OnPlay
m_InitialEventNameOverriden: 0
m_StartSeed: 0
@ -1823,7 +1823,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
rawImage: {fileID: 1200076501}
scale: 1
useWebCam: 0
useWebCam: 1
webCamIndex: 0
--- !u!23 &1873549734
MeshRenderer:

8
Assets/MIDI Controller.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d8709408101c1814ca12055baffaf441
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1224
Assets/MIDI Controller/Dwell.inputactions

File diff suppressed because it is too large

14
Assets/MIDI Controller/Dwell.inputactions.meta

@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: a689688525390bb4eb2e9bc09dd1ab0c
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
generateWrapperCode: 0
wrapperCodePath:
wrapperClassName:
wrapperCodeNamespace:

36
Assets/MIDI Controller/InputSystem.inputsettings.asset

@ -0,0 +1,36 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c46f07b5ed07e4e92aa78254188d3d10, type: 3}
m_Name: InputSystem.inputsettings
m_EditorClassIdentifier:
m_SupportedDevices: []
m_UpdateMode: 1
m_MaxEventBytesPerUpdate: 5242880
m_MaxQueuedEventsPerUpdate: 1000
m_CompensateForScreenOrientation: 1
m_BackgroundBehavior: 0
m_EditorInputBehaviorInPlayMode: 0
m_DefaultDeadzoneMin: 0.125
m_DefaultDeadzoneMax: 0.925
m_DefaultButtonPressPoint: 0.5
m_ButtonReleaseThreshold: 0.75
m_DefaultTapTime: 0.2
m_DefaultSlowTapTime: 0.5
m_DefaultHoldTime: 0.4
m_TapRadius: 5
m_MultiTapDelayTime: 0.75
m_DisableRedundantEventsMerging: 0
m_ShortcutKeysConsumeInputs: 0
m_iOSSettings:
m_MotionUsage:
m_Enabled: 0
m_Description:

8
Assets/MIDI Controller/InputSystem.inputsettings.asset.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6cef3cc18f2fc0d4899c2ea735af10e1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

8
Assets/NDI.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 192b783d0626206449cd9e930c693baf
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Scripts.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cb9c01ee73c7340408f08c3f0e187bed
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

143
Assets/Scripts/MidiLiveMap.cs

@ -0,0 +1,143 @@
using Minis;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.VFX;
[ExecuteInEditMode]
[System.Serializable]
public class MidiLiveMap : MonoBehaviour
{
public VisualEffect m_VFX;
// All Controllable Variables for Act 4 PJ
private int m_PLifeMin;
private int m_PLifeMax;
private int m_PRate;
private int m_PNoise;
private int m_PTurbPosition;
private int m_PRatio;
//private int m_PGravity;
private int m_PFreq;
private int m_PDrag;
private int m_ALRate;
private int m_PTurb;
public float f_PLifeMin = 5f;
public float f_PLifeMax = 20f;
public float f_PRate = 70000f;
public float f_PNoise = 0.5f;
public float f_PTurbPosition = 30f;
public float f_PRatio = 10f;
//public float f_PGravity = 0f;
public float f_PFreq = 2f;
public float f_PTurb = 0.5f;
public float f_PTurbDrag = 8f;
public float f_ALRate = 1000f;
private float m_Slider = 0f;
private float m_Potent = 0f;
private float[] m_SliderIn = new float[8];
private float[] m_PotIn = new float[8];
void Start()
{
m_PLifeMin = Shader.PropertyToID("Pont Lifetime Min");
m_PLifeMax = Shader.PropertyToID("Point Lifetime Max");
m_PRate = Shader.PropertyToID("Point Rate");
m_PNoise = Shader.PropertyToID("Noise");
m_PRatio = Shader.PropertyToID("Turbulences Ratio");
m_PTurbPosition = Shader.PropertyToID("Turbulences Speed");
m_PFreq = Shader.PropertyToID("Turbulences Frequency");
m_PTurb = Shader.PropertyToID("Turbulences");
m_PDrag = Shader.PropertyToID("Turbulence Drag");
m_ALRate = Shader.PropertyToID("Antenna Rate");
// m_PGravity = Shader.PropertyToID("Gravity Point");
InputSystem.onDeviceChange += (device, change) =>
{
if (change != InputDeviceChange.Added)
{
return;
}
var midiDevice = device as Minis.MidiDevice;
if (midiDevice == null)
{
return;
}
midiDevice.onWillControlChange += (device, change) =>
{
if (device.controlNumber < 8)
{
m_SliderIn[device.controlNumber] = (float)change;
}
if (device.controlNumber >= 16 && device.controlNumber <= 23)
{
m_PotIn[device.controlNumber - 16] = (float)change;
}
// Debug.Log(device.controlNumber);
Debug.Log(m_Slider + ":" + m_Potent);
if (device.controlNumber == 32)
{
// f_PGravity = -9.8f * (float)change;
}
};
};
}
void Update()
{
// Debug.Log(m_Slider);
SetupVFXTest();
}
void SetupVFXTest()
{
// Points
m_VFX.SetFloat(m_PLifeMin, f_PLifeMin * m_PotIn[0]);
m_VFX.SetFloat(m_PLifeMax, f_PLifeMax * m_PotIn[1]);
m_VFX.SetFloat(m_PRate, f_PRate * m_PotIn[2]);
m_VFX.SetFloat(m_PNoise, f_PNoise * m_PotIn[3]);
// Vel Lines
m_VFX.SetFloat(m_ALRate, f_ALRate * m_PotIn[4]);
// Turbulence's
m_VFX.SetFloat(m_PRatio, f_PRatio * m_SliderIn[0]);
m_VFX.SetFloat(m_PTurb, f_PTurb * m_SliderIn[1]);
m_VFX.SetFloat(m_PFreq, f_PFreq * m_SliderIn[2]);
m_VFX.SetFloat(m_PDrag, f_PTurbDrag * m_SliderIn[3]);
m_VFX.SetFloat(m_PTurbPosition, f_PTurbPosition * m_SliderIn[5]);
}
}

11
Assets/Scripts/MidiLiveMap.cs.meta

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 30ddee29d67e741429d68f6ce139af61
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

300
Assets/Scripts/MidiMap.cs

@ -0,0 +1,300 @@
using Minis;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.VFX;
[ExecuteInEditMode]
[System.Serializable]
public class MidiMap : MonoBehaviour
{
public VisualEffect m_VFX;
// Point VFX Parameters
private int m_PLifeMax;
private int m_PRate;
private int m_PNoise;
private int m_PSpeed;
private int m_PRatio;
private int m_PGravity;
private int m_PFreq;
private int m_PTurb;
// Line VFX Parameters
private int m_LToggle;
private int m_LRate;
private int m_LLifetime;
private int m_LRange;
private int m_LThickness;
// Bubble VFX Parameters
private int m_BSize;
private int m_BRate;
private int m_BLifetime;
private int m_BTurb;
private int m_BFreq;
private int m_BForce;
private int m_BToggle;
public float f_PLifeMax = 20f;
public float f_PRate = 70000f;
public float f_PNoise = 5f;
public float f_PSpeed = 5f;
public float f_PRatio = 1f;
public float f_PGravity = 0f;
public float f_PFreq = 5f;
public float f_PTurb = 5f;
public float f_LRate = 10000f;
public float f_LLifetime = 5f;
public bool f_LToggle = false;
public float f_LRange = 1f;
public float f_LThickness = 1f;
public float f_BSize = 1f;
public float f_BRate = 10000f;
public float f_BFreq = 10f;
public float f_BLifetime = 10f;
public float f_BTurb = 10f;
public bool f_BToggle = false;
public float f_BForceX = 0f;
public float f_BForceY = 0f;
public float f_BForceZ = 0f;
private float m_Slider = 0f;
private bool m_BSlider = false;
private float m_Potent = 0f;
private bool m_BPotent = false;
private float[] m_SliderIn = new float[8];
private float[] m_PotIn = new float[8];
void Start()
{
m_PLifeMax = Shader.PropertyToID("Point Lifetime Max");
m_PRate = Shader.PropertyToID("Point Rate");
m_PRatio = Shader.PropertyToID("Turbulences Ratio");
m_PNoise = Shader.PropertyToID("Noise");
m_PSpeed = Shader.PropertyToID("Turbulences Speed");
m_PFreq = Shader.PropertyToID("Turbulences Frequency");
m_PGravity = Shader.PropertyToID("Gravity Point");
m_PTurb = Shader.PropertyToID("Turbulences");
m_LToggle = Shader.PropertyToID("Toggle Line");
m_LRate = Shader.PropertyToID("Line Rate");
m_LLifetime = Shader.PropertyToID("Line Lifetime");
m_LRange = Shader.PropertyToID("Line Range");
m_LThickness = Shader.PropertyToID("Line Thickness");
m_BFreq = Shader.PropertyToID("Bubble Turbulences Frequency");
m_BRate = Shader.PropertyToID("Bubble Rate");
m_BLifetime = Shader.PropertyToID("Bubble Lifetime");
m_BTurb = Shader.PropertyToID("Bubble Turbulences");
m_BForce = Shader.PropertyToID("Bubble Force");
m_BToggle = Shader.PropertyToID("Toggle Bubble");
m_BSize = Shader.PropertyToID("Bubble Size");
InputSystem.onDeviceChange += (device, change) =>
{
if (change != InputDeviceChange.Added) {
return;
}
var midiDevice = device as Minis.MidiDevice;
if (midiDevice == null)
{
return; }
midiDevice.onWillControlChange += (device, change) =>
{
if(device.controlNumber == 61)
{
if (m_BSlider)
{
m_BSlider = false;
return;
}
// Left
m_Slider -= 1;
if(m_Slider < 0) { m_Slider = 2; }
m_BSlider = true;
}
if (device.controlNumber == 62)
{
// Right
if (m_BSlider)
{
m_BSlider = false;
return;
}
m_Slider += 1;
if (m_Slider > 2) { m_Slider = 0; }
m_BSlider = true;
}
if (device.controlNumber == 58)
{
if (m_BPotent)
{
m_BPotent = false;
return;
}
// Left
m_Potent -= 1;
if (m_Potent < 0) { m_Potent = 2; }
m_BPotent = true;
}
if (device.controlNumber == 59)
{
// Right
if (m_BPotent)
{
m_BPotent = false;
return;
}
m_Potent += 1;
if (m_Potent > 2) { m_Potent = 0; }
m_BPotent = true;
}
if (device.controlNumber < 8)
{
m_SliderIn[device.controlNumber] = (float)change;
}
if (device.controlNumber >= 16 && device.controlNumber <=23)
{
m_PotIn[device.controlNumber - 16] = (float)change;
}
// Debug.Log(device.controlNumber);
Debug.Log(m_Slider + ":" + m_Potent);
if (device.controlNumber == 32)
{
f_PGravity = -9.8f * (float)change;
}
};
};
}
void Update()
{
// Debug.Log(m_Slider);
SetupVFXTest();
}
void SetupVFXTest()
{
if(m_Slider == 0)
{
// Points
m_VFX.SetFloat(m_PRate, f_PRate * m_SliderIn[0]);
m_VFX.SetFloat(m_PLifeMax, f_PLifeMax * m_SliderIn[1]);
m_VFX.SetFloat(m_PNoise, f_PNoise * m_SliderIn[2]);
m_VFX.SetFloat(m_PTurb, f_PTurb * m_SliderIn[3]);
m_VFX.SetFloat(m_PSpeed, f_PSpeed * m_SliderIn[4]);
m_VFX.SetFloat(m_PRatio, f_PRatio * m_SliderIn[5]);
m_VFX.SetFloat(m_PSpeed, f_PSpeed * m_SliderIn[6]);
m_VFX.SetFloat(m_PFreq, f_PFreq * m_SliderIn[7]);
m_VFX.SetVector3(m_PGravity, new Vector3(0, f_PGravity, 0));
}
if (m_Slider == 1)
{
// Points
m_VFX.SetBool(m_LToggle, true);
m_VFX.SetFloat(m_LRate, f_LRate * m_SliderIn[0]);
m_VFX.SetFloat(m_LLifetime, f_LLifetime * m_SliderIn[1]);
m_VFX.SetFloat(m_LRange, f_LRange * m_SliderIn[2]);
m_VFX.SetFloat(m_LThickness, f_LThickness * m_SliderIn[3]);
//m_VFX.SetFloat(m_PSpeed, f_PSpeed * m_SliderIn[4]);
//m_VFX.SetFloat(m_PRatio, f_PRatio * m_SliderIn[5]);
//m_VFX.SetFloat(m_PSpeed, f_PSpeed * m_SliderIn[6]);
//m_VFX.SetFloat(m_PFreq, f_PFreq * m_SliderIn[7]);
}
if (m_Slider == 2)
{
m_VFX.SetBool(m_BToggle, true);
m_VFX.SetFloat(m_BRate, f_BRate * m_SliderIn[0]);
m_VFX.SetFloat(m_BSize, f_BSize * m_SliderIn[1]);
m_VFX.SetFloat(m_BFreq, f_BFreq * m_SliderIn[2]);
m_VFX.SetFloat(m_BLifetime, f_BLifetime * m_SliderIn[3]);
m_VFX.SetFloat(m_BTurb, f_BTurb * m_SliderIn[4]);
m_VFX.SetVector3(m_BForce, new Vector3(0, -9.8f * m_SliderIn[5], 0));
}
if (m_Potent == 0)
{
// Points
m_VFX.SetFloat(m_PRate, f_PRate * m_PotIn[0]);
m_VFX.SetFloat(m_PLifeMax, f_PLifeMax * m_PotIn[1]);
m_VFX.SetFloat(m_PNoise, f_PNoise * m_PotIn[2]);
m_VFX.SetFloat(m_PTurb, f_PTurb * m_PotIn[3]);
m_VFX.SetFloat(m_PSpeed, f_PSpeed * m_PotIn[4]);
m_VFX.SetFloat(m_PRatio, f_PRatio * m_PotIn[5]);
m_VFX.SetFloat(m_PSpeed, f_PSpeed * m_PotIn[6]);
m_VFX.SetFloat(m_PFreq, f_PFreq * m_PotIn[7]);
m_VFX.SetVector3(m_PGravity, new Vector3(0, f_PGravity, 0));
}
if (m_Potent == 1)
{
// Points
m_VFX.SetBool(m_LToggle, true);
m_VFX.SetFloat(m_LRate, f_LRate * m_PotIn[0]);
m_VFX.SetFloat(m_LLifetime, f_LLifetime * m_PotIn[1]);
m_VFX.SetFloat(m_LRange, f_LRange * m_PotIn[2]);
m_VFX.SetFloat(m_LThickness, f_LThickness * m_PotIn[3]);
//m_VFX.SetFloat(m_PSpeed, f_PSpeed * m_SliderIn[4]);
//m_VFX.SetFloat(m_PRatio, f_PRatio * m_SliderIn[5]);
//m_VFX.SetFloat(m_PSpeed, f_PSpeed * m_SliderIn[6]);
//m_VFX.SetFloat(m_PFreq, f_PFreq * m_SliderIn[7]);
}
if (m_Potent == 2)
{
m_VFX.SetBool(m_BToggle, true);
m_VFX.SetFloat(m_BRate, f_BRate * m_PotIn[0]);
m_VFX.SetFloat(m_BSize, f_BSize * m_PotIn[1]);
m_VFX.SetFloat(m_BFreq, f_BFreq * m_PotIn[2]);
m_VFX.SetFloat(m_BLifetime, f_BLifetime * m_PotIn[3]);
m_VFX.SetFloat(m_BTurb, f_BTurb * m_PotIn[4]);
m_VFX.SetVector3(m_BForce, new Vector3(0, -9.8f * m_PotIn[5], 0));
}
}
}

11
Assets/Scripts/MidiMap.cs.meta

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4fdf832098836b94ab5452c25c084bcd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/VFX.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9c4182f3a49f30b4aa9312b79d17f6ba
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

46610
Assets/VFX/A3_Avatar.vfx

File diff suppressed because it is too large

7
Assets/VFX/A3_Avatar.vfx.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7cae2434885ad4845ab15b0380231ea8
VisualEffectImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

5
Packages/manifest.json

@ -1,7 +1,6 @@
{
"dependencies": {
"com.unity.barracuda": "3.0.0",
"com.unity.burst": "1.8.9",
"com.unity.collab-proxy": "2.0.5",
"com.unity.feature.development": "1.0.1",
"com.unity.recorder": "4.0.1",
@ -10,6 +9,10 @@
"com.unity.timeline": "1.7.5",
"com.unity.ugui": "1.0.0",
"com.unity.visualscripting": "1.8.0",
"jp.keijiro.klak.ndi": "2.1.0",
"jp.keijiro.midi-jack": "0.0.1",
"jp.keijiro.minis": "1.0.10",
"jp.keijiro.minis.visualscripting": "1.0.6",
"jp.keijiro.osc-jack": "2.0.0",
"jp.keijiro.pcx": "1.0.1",
"jp.keijiro.shadergraphassets": "2.5.2",

57
Packages/packages-lock.json

@ -12,8 +12,8 @@
"url": "https://packages.unity.com"
},
"com.unity.burst": {
"version": "1.8.9",
"depth": 0,
"version": "1.8.7",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.mathematics": "1.2.1"
@ -80,6 +80,15 @@
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.inputsystem": {
"version": "1.6.3",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.modules.uielements": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.mathematics": {
"version": "1.2.6",
"depth": 1,
@ -232,6 +241,43 @@
},
"url": "https://packages.unity.com"
},
"jp.keijiro.klak.ndi": {
"version": "2.1.0",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.modules.screencapture": "1.0.0"
},
"url": "https://registry.npmjs.com"
},
"jp.keijiro.midi-jack": {
"version": "0.0.1",
"depth": 0,
"source": "registry",
"dependencies": {},
"url": "https://registry.npmjs.com"
},
"jp.keijiro.minis": {
"version": "1.0.10",
"depth": 0,
"source": "registry",
"dependencies": {
"jp.keijiro.rtmidi": "1.0.4",
"com.unity.inputsystem": "1.0.1"
},
"url": "https://registry.npmjs.com"
},
"jp.keijiro.minis.visualscripting": {
"version": "1.0.6",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.modules.uielements": "1.0.0",
"com.unity.visualscripting": "1.5.2",
"jp.keijiro.minis": "1.0.10"
},
"url": "https://registry.npmjs.com"
},
"jp.keijiro.noiseshader": {
"version": "2.0.0",
"depth": 1,
@ -253,6 +299,13 @@
"dependencies": {},
"url": "https://registry.npmjs.com"
},
"jp.keijiro.rtmidi": {
"version": "1.0.4",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://registry.npmjs.com"
},
"jp.keijiro.shadergraphassets": {
"version": "2.5.2",
"depth": 0,

4
ProjectSettings/EditorBuildSettings.asset

@ -8,4 +8,6 @@ EditorBuildSettings:
- enabled: 1
path: Assets/Act-1.unity
guid: 8124e5870f4fd4c779e7a5f994e84ad1
m_configObjects: {}
m_configObjects:
com.unity.input.settings: {fileID: 11400000, guid: 6cef3cc18f2fc0d4899c2ea735af10e1,
type: 2}

2
ProjectSettings/ProjectSettings.asset

@ -912,7 +912,7 @@ PlayerSettings:
hmiLogStartupTiming: 0
hmiCpuConfiguration:
apiCompatibilityLevel: 3
activeInputHandler: 0
activeInputHandler: 2
windowsGamepadBackendHint: 0
cloudProjectId: 90600367-2003-4970-a0a4-0f7049cb1dd9
framebufferDepthMemorylessMode: 0

Loading…
Cancel
Save