This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf-8 | |
import os | |
import random | |
import glob | |
def renderTregenzaPatches(outputPath='tregenzaPatch.hdr',imgResolution=200,reinhartMF=1,cleanUp=True): | |
""" | |
:param outputPath: A filepath where the created image should be written to. Defaults to tregenzaPatch.hdr in the same | |
directory that the script is being run in. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Wrote a python implementation of the c-shell script discussed here: | |
https://www.radiance-online.org//pipermail/hdri/2011-June/000325.html | |
""" | |
# coding=utf-8 | |
from __future__ import division | |
import os | |
import warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from xml.etree import ElementTree | |
import cPickle,os,json | |
def getXmlData(fileName): | |
xmlData = ElementTree.parse(fileName) | |
node = xmlData.find('./{http://windows.lbl.gov}ScatteringData') | |
for idx,node in enumerate(xmlData.iter()): | |
if node.text: | |
tagVal = node.tag.replace('{http://windows.lbl.gov}', '').strip() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""This module contains fixes for radiance files exported through su2rad.""" | |
from __future__ import print_function,division | |
import shutil | |
import os | |
def fixAliasMaterialFile(materialFilePath): | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def extractBsdfData(fileName): | |
with open(fileName) as dataFile: | |
xmlData=dataFile.read().replace('>',' ').replace('<',' ').replace('/','').replace(',',' ').split() | |
bsdfDataSet = [] | |
quantDict = {"LBNLKlemsFull":145*145} | |
numericVal=[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf-8 | |
""" | |
Take a string and make it PEP8 friendly. | |
""" | |
from __future__ import division,print_function | |
#This dictionary will store all the characters present in Radiance and other | |
# documentation which isn't really compatable with utf type. The values will | |
# be substituted by relevant ascii characters which can then show up on the | |
# pyCharm documentation. |
NewerOlder