diff --git a/cellular/Makefile b/cellular/Makefile index 89967d8..a706a84 100755 --- a/cellular/Makefile +++ b/cellular/Makefile @@ -1,92 +1,110 @@ # Makefile (for gnumake) to translate OBJ files to Radiance octree representing # an exemplary model of a cellular office (one work desk with small meeting # desk) as a realistic setting for daylight simulation. # Modelling and assignment of material names in Blender, export to Wavefront OBJ. # Furniture is modelled by collections in Blender with marker triangles for # replmarks, these get material Marker with .obj being the file- # name of the exported, detailed geometry. The latter are exported with the main # model but mapped to void by obj2rad. # Oct 2020, Lars O. Grobe # Lucerne University of Applied Sciences and Arts HSLU, Switzerland # This work is licensed under a Creative Commons Attribution 4.0 International # License: https://creativecommons.org/licenses/by/4.0/ # Begin model configuration ==================================================== # Name of this model, will be used to name scene files name = Cellular +# Switch artificial lighting on (<0) or off (=0) +export lighting=0 + # Glazing definition # Overwrite default (red, green, blue) properties of window groups by defining # wgTopMat, wgMiddleMat, wgBottoMat and point variable to the file here glazingMat = glazingMatDef.mat # Sky definition # Overwrite default by given file sky = skies/skyDef.sky # Radiance object files to be included by xform (use only for simple geometries) objects = desk.rad locker.rad sideBoard.rad lamp.rad workstation.rad # Radiance meshes to be compiled from Wavefront OBJs meshes = chair1.rtm chair2.rtm poster1.rtm poster2.rtm +# Number of processort cores / parallel processes to fork +NCPU=1 + # End model configuration ====================================================== +# Main scene file, may contain triangular markers processed by replmarks +octree = $(name).oct +scene = $(name).rad +ambfile = $(name).amb +unffile = $(name).unf + # view for test rvuview = -vtv -vp -1.2 .2 1.7 -vd .5 1 0 -vh 90 -vv 75 # perspective # -vta -vp 0 .1 1.7 -vd 0 1 0 -vh 180 -vv 180 # fisheye + # render settings for test -rvuopt = -n 4 -ab 2 -ad 1024 -as 512 -aa .15 -st 0 -ss 16 -lw 2e-3 +rvuopt = -n $(NCPU) -ab 2 -ad 1024 -as 512 -aa .15 -st 0 -ss 16 -lw 2e-3 -# Main scene file, may contain triangular markers processed by replmarks -octree = $(name).oct -scene = $(name).rad +# view for unfiltered HDR +rtpictview = -vta -vp .25 1.5 1.45 -vd 1 0 0 -vh 180 -vv 180 + +# render settings for unfiltered HDR +rtpictopt = -n $(NCPU) -ab 3 -ad 2048 -as 1024 -aa .1 -st 0 -ss 16 -lw 1e-4 -af $(ambfile) -x 2400 -y 2400 # markers must be have modifier name Marker, where is the basenam # of the compiled mesh (without suffix .rtm) meshMarkers := $(foreach mesh, $(meshes),-I $(mesh) $(subst .rtm,Marker,$(mesh))) objectMarkers := $(foreach object, $(objects),-x $(object) $(subst .rad,Marker,$(object))) replmarksStr = $(meshMarkers) $(objectMarkers) # Complete RAYPATH variable myRAYPATH = $(RAYPATH):$(glazingPath) vpath %.obj obj # Wavefront OBJ files vpath %.map mat # Mapping from Wavefront materials to Radiance modifiers vpath %.mat mat # Radiance modifiers vpath %.sky skies # Sky desciptions # recipes from here .PHONY: clean debug octree # default target debug : $(octree) RAYPATH=$(myRAYPATH); rvu $(rvuopt) $(rvuview) $< - @echo "Done." octree : $(octree) +unf : $(octree) + RAYPATH=$(myRAYPATH); rtpict $(rtpictopt) $(rtpictview) -x 64 -y 64 $< > /dev/null + RAYPATH=$(myRAYPATH); rtpict $(rtpictopt) $(rtpictview) $< > $(unffile) + # Convert scene and replace markers by objects or meshes $(scene) : %.rad : %.mat $(glazingMat) %.map %.obj $(meshes) $(objects) cat $< $(word 2, $^) > $@ obj2rad -m $(word 3, $^) $(word 4, $^) | replmarks $(replmarksStr) >> $@ # Convert Wavefront OBJs to Radiance meshes %.rtm : %.mat %.obj obj2mesh -w -a $^ $@ # Convert Wavefront OBJs to Radiance objects $(objects) : %.rad : %.mat %.obj cat $< > $@ obj2rad $(lastword $^) >> $@ # Compile scene into octree $(octree) : $(scene) $(sky) oconv $^ > $@ clean : - rm -f $(meshes) $(objects) $(scene) $(octree) + rm -f $(meshes) $(objects) $(scene) $(octree) $(ambfile) diff --git a/cellular/mat/lamp.mat b/cellular/mat/lamp.mat index c64e4bf..a325327 100644 --- a/cellular/mat/lamp.mat +++ b/cellular/mat/lamp.mat @@ -1,17 +1,13 @@ void metal lampFrameMat 0 0 5 .6 .6 .6 .3 .02 void plastic lampGlassMat 0 0 5 .6 .6 .6 .3 0 -void glow lampGlassMat -0 -0 -4 10 10 10 - 0 +! ((lighting)) && echo "void glow lampGlassMat 0 0 4 10 10 10 0"