#!/bin/bash # B_03 bowling re-simulation: two parameter presets -> DTW -> comparison video set -e cd ~/jiayin/4dcodebench PY=~/miniconda3/envs/ovow-motion/bin/python BL=~/jiayin/blender/blender CASE=B_03 W=work/$CASE/world echo "=== [1/4] unpack ===" $PY resim/unpack_world.py cases/$CASE/$CASE.h5 $W mkdir -p work/$CASE echo "=== [2/4] preset 1: mu=0.5, e=0.05 (sticky) ===" CUDA_VISIBLE_DEVICES=4 $BL --background --python resim/resim_blender.py -- \ --world $W --out work/$CASE/out_p1 --preset p1 --kinematic Ball \ --friction 0.5 --restitution 0.05 --mass 1.5 --samples 32 test -f work/$CASE/out_p1/sim.mp4 || { echo "preset 1 FAILED (no sim.mp4)"; exit 1; } echo "=== [3/4] preset 2: mu=0.02, e=0.9 (icy+bouncy) ===" CUDA_VISIBLE_DEVICES=4 $BL --background --python resim/resim_blender.py -- \ --world $W --out work/$CASE/out_p2 --preset p2 --kinematic Ball \ --friction 0.02 --restitution 0.9 --mass 1.5 --samples 32 test -f work/$CASE/out_p2/sim.mp4 || { echo "preset 2 FAILED (no sim.mp4)"; exit 1; } echo "=== [4/4] score + compose ===" $PY resim/score_dtw.py --world $W --sims work/$CASE/out_p1 work/$CASE/out_p2 \ --out work/$CASE/dtw.json $PY resim/compose_video.py --world $W --sims work/$CASE/out_p1 work/$CASE/out_p2 \ --labels "sim mu=0.50 e=0.05" "sim mu=0.02 e=0.90" \ --out work/$CASE/compare_$CASE.mp4 echo "=== ALL DONE ==="