Skip to content

Instantly share code, notes, and snippets.

@sariths
Created October 24, 2017 00:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sariths/f36e458dd06ef5658f18172ddb143df8 to your computer and use it in GitHub Desktop.
Save sariths/f36e458dd06ef5658f18172ddb143df8 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
#Fun with light tubes !
#Octree
oconv -f materials.rad scene.rad > room.oct
#View Matrix
vwrays -vtv -vp 2.65 -2.05 1 -vd 0.02 1 -0.01 -vu 0 0 1 -vv 35 -vh 59 -vo 3 -x 400 -y 400 -pj 0.7 -c 6 -ff | rfluxmtx -v -ffc `-vtv -vp 2.65 -2.05 1 -vd 0.02 1 -0.01 -vu 0 0 1 -vv 35 -vh 59 -vo 3 -x 400 -y 400 -d` -o matrices/vmtx/%03d.hdr -ab 5 -ad 10000 -lw 1e-5 -c 6 -n 16 - vport/vport.rad -i room.oct
#Fmatrix
rfluxmtx -v -ff -ab 10 -ad 10000 -lw 1e-5 -c 5000 -n 16 vport/vport.rad fport/fport.rad -i room.oct > matrices/F1.fmx
#Dmatrix
rfluxmtx -v -ff -ad 10000 -ab 4 -lw 1e-5 -c 5000 -n 16 fport/fport.rad skyDomes/skyglow.rad -i room.oct > matrices/DF1.dmx
#Combine matrices. T-Matrix is "on the house"
dctimestep -of matrices/F1.fmx matrices/DF1.dmx > matrices/DF1.dfmx
#Create a tiny sky-matrix with 40 skies
gendaymtx -m 1 assets/NYC.wea > skyVectors/NYC.smx
#Generate results
dctimestep -o results/%03d.hdr matrices/vmtx/%03d.hdr matrices/tmtx/clear.xml matrices/DF1.dfmx skyVectors/NYC.smx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment