summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2022-10-02 17:24:17 -0700
committeryum <yum.food.vr@gmail.com>2022-10-02 17:24:17 -0700
commit7e7a0d1c4179fb1a0cc771a25ad56be6b5dd5405 (patch)
tree51cc9159d27c2ae5addde50f9b9a271c0d5dccff
parent9222e7e9a21704dd6083adf8f53ce4437ba64a74 (diff)
Paging now works for other players at 40 characters per second
* Shorten animations to 1 frame * Eliminate fx internal transition delays * These were causing the shader parameters to interpolate, causing the inconsistent / flickering letters I was seeing
-rw-r--r--Animations/TaSTT_Do_Nothing.anim8
-rw-r--r--generate_fx.py2
-rw-r--r--osc_ctrl.py35
-rw-r--r--template.anim4
4 files changed, 26 insertions, 23 deletions
diff --git a/Animations/TaSTT_Do_Nothing.anim b/Animations/TaSTT_Do_Nothing.anim
index 9f6dc02..354d19e 100644
--- a/Animations/TaSTT_Do_Nothing.anim
+++ b/Animations/TaSTT_Do_Nothing.anim
@@ -30,7 +30,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
- time: 0.033333335
+ time: 0.016666668
value: 0
inSlope: 0
outSlope: 0
@@ -55,7 +55,7 @@ AnimationClip:
genericBindings:
- serializedVersion: 2
path: 2794480623
- attribute: 2284639795
+ attribute: 2215457191
script: {fileID: 0}
typeID: 137
customType: 22
@@ -71,7 +71,7 @@ AnimationClip:
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
- m_LoopTime: 0
+ m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
@@ -95,7 +95,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
- time: 0.033333335
+ time: 0.016666668
value: 0
inSlope: 0
outSlope: 0
diff --git a/generate_fx.py b/generate_fx.py
index f829174..33a1a73 100644
--- a/generate_fx.py
+++ b/generate_fx.py
@@ -388,7 +388,7 @@ AnimatorStateTransition:
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
- m_TransitionDuration: 0.03
+ m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 0
diff --git a/osc_ctrl.py b/osc_ctrl.py
index 8a7d41c..a1e5c6c 100644
--- a/osc_ctrl.py
+++ b/osc_ctrl.py
@@ -78,9 +78,24 @@ def updateCell(cell_idx, letter_encoded, s0, s1, s2):
addr="/avatar/parameters/" + getSelectParam(cell_idx, 2)
client.send_message(addr, s2)
+def enable():
+ for i in range(0, NUM_LAYERS):
+ addr="/avatar/parameters/" + getEnableParam(i)
+ client.send_message(addr, True)
+
+def disable():
+ for i in range(0, NUM_LAYERS):
+ addr="/avatar/parameters/" + getEnableParam(i)
+ client.send_message(addr, False)
+
# Send a cell all at once.
# `which_cell` is an integer in the range [0,8).
def sendMessageCellDiscrete(msg_cell, which_cell):
+ # Disable each layer.
+ disable()
+
+ time.sleep(CELL_TX_TIME_S / 2.0)
+
# Really long messages just wrap back around.
which_cell = (which_cell % 8)
@@ -94,25 +109,15 @@ def sendMessageCellDiscrete(msg_cell, which_cell):
updateCell(i, msg_cell[i], s0, s1, s2)
# Wait for convergence.
- time.sleep(CELL_TX_TIME_S / 3.0)
+ time.sleep(CELL_TX_TIME_S / 4.0)
# Enable each layer.
# TODO(yum_food) for some reason, if we don't active every layer, the
# desired subset won't reliably fire. Why?
- for i in range(0, NUM_LAYERS):
- addr="/avatar/parameters/" + getEnableParam(i)
- client.send_message(addr, True)
+ enable()
# Wait for convergence.
- time.sleep(CELL_TX_TIME_S / 3.0)
-
- # Disable each layer.
- for i in range(0, NUM_LAYERS):
- addr="/avatar/parameters/" + getEnableParam(i)
- client.send_message(addr, False)
-
- # Wait for convergence.
- time.sleep(CELL_TX_TIME_S / 3.0)
+ time.sleep(CELL_TX_TIME_S / 4.0)
# Send a cell smoothly spread out over the course of CELL_TX_TIME_S.
# `which_cell` is an integer in the range [0,8).
@@ -259,10 +264,8 @@ def closeBoard():
if __name__ == "__main__":
generateEncoding(state)
#openBoard()
- clear()
+ #clear()
for line in fileinput.input():
sendMessage(line)
- sendMessage("")
-
diff --git a/template.anim b/template.anim
index 367f5d3..8f06fe1 100644
--- a/template.anim
+++ b/template.anim
@@ -30,7 +30,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
- time: 0.033333335
+ time: 0.016666668
value: %LETTER_VALUE%
inSlope: 0
outSlope: 0
@@ -95,7 +95,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
- time: 0.033333335
+ time: 0.016666668
value: %LETTER_VALUE%
inSlope: 0
outSlope: 0