= Assignment 3 Discussion = You have to change 2 things in the Makefile. Here is one where you only change one thing: {{{ PBRT_DIR = ../src-1.02 PBRT_BIN_DIR = $(PBRT_DIR)/bin ARCH = $(shell uname) ifneq ($(ARCH),Darwin) DLLLIB = -ldl endif EXRINCLUDE=../OpenEXR/include EXRLIBS=-lIlmImf -lImath -lIex -lHalf -lz CXX=g++ OPT=-O2 INCLUDE=-I. -I$(PBRT_DIR)/core -I$(EXRINCLUDE) WARN=-Wall CWD=$(shell pwd) CXXFLAGS=$(OPT) $(INCLUDE) $(WARN) LIBS=$(LEXLIB) $(DLLLIB) -L$(EXRLIBDIR) $(EXRLIBS) -lm ifeq ($(ARCH), Darwin) SHARED_LDFLAGS = -flat_namespace -undefined suppress -bundle -noprebind LRT_LDFLAGS=$(OPT) -L/sw/lib #PBRTPRELINK=-Wl,-all_load INCLUDE += -I/sw/include CXX=ccache g++ EXRLIBDIR=../OpenEXR/lib-osx WARN += -Wno-long-double else SHARED_LDFLAGS = -shared LRT_LDFLAGS=-rdynamic $(OPT) EXRLIBDIR=../cs348b_extras/lib PBRTPRELINK=-Wl,--export-dynamic -Wl,-whole-archive PBRTPOSTLINK=-Wl,-no-whole-archive endif LD=$(CXX) $(OPT) CAMERAS = realistic CAMERAS_DSOS := $(CAMERAS:=.so) CORE_HEADERFILES = api.h camera.h color.h dynload.h film.h geometry.h \ kdtree.h light.h pbrt.h material.h mc.h mipmap.h octree.h \ paramset.h primitive.h reflection.h sampling.h scene.h \ shape.h texture.h timer.h tonemap.h transform.h transport.h \ volume.h CORE_HEADERS := $(addprefix ../core/, $(CORE_HEADERFILES) ) .SECONDARY: $(CAMERAS_OBJS) default: $(CAMERAS_DSOS) cp $< $(PBRT_BIN_DIR) $(CORE_LIB): $(CORE_OBJS) ar rcs $(CORE_LIB) $(CORE_OBJS) %.so: %.o @$(LD) $(SHARED_LDFLAGS) $^ -o $@ %.o: cameras/%.cpp $(CORE_HEADERS) @echo "Building Realistic Camera Plugin \"$*\"" @$(CXX) $(CXXFLAGS) -o $@ -c $< clean: rm -f *.o *.so }}} === Q.1 === Are the hw3_scene.pbrt and hw3_scene2.pbrt supposed to work without changes? {{{ hw3_scene.pbrt pbrt version 1.020 of Apr 9 2006 at 16:12:53 Copyright (c)1998-2005 Matt Pharr and Greg Humphreys. For educational use only; commercial use expressly forbidden. Error: Scene description must be inside world block; "Texture" not allowed. Ignoring. Line 8, file hw3_scene.pbrt Error: Scene description must be inside world block; "Texture" not allowed. Ignoring. Line 9, file hw3_scene.pbrt Error: Scene description must be inside world block; "Material" not allowed. Ignoring. Line 10, file hw3_scene.pbrt Error: Scene description must be inside world block; "Shape" not allowed. Ignoring. Line 15, file hw3_scene.pbrt Error: Scene description must be inside world block; "Material" not allowed. Ignoring. Line 16, file hw3_scene.pbrt Error: Scene description must be inside world block; "Shape" not allowed. Ignoring. Line 21, file hw3_scene.pbrt Error: Scene description must be inside world block; "Texture" not allowed. Ignoring. Line 22, file hw3_scene.pbrt Error: Scene description must be inside world block; "Material" not allowed. Ignoring. Line 23, file hw3_scene.pbrt Error: Scene description must be inside world block; "Shape" not allowed. Ignoring. Line 28, file hw3_scene.pbrt Error: Scene description must be inside world block; "Texture" not allowed. Ignoring. Line 29, file hw3_scene.pbrt Error: Scene description must be inside world block; "Material" not allowed. Ignoring. Line 30, file hw3_scene.pbrt Error: Scene description must be inside world block; "Shape" not allowed. Ignoring. Line 34, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectBegin" not allowed. Ignoring. Line 34, file hw3_scene.pbrt Error: Scene description must be inside world block; "Material" not allowed. Ignoring. Line 36, file hw3_scene.pbrt Error: Scene description must be inside world block; "Shape" not allowed. Ignoring. Line 41, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectEnd" not allowed. Ignoring. Line 41, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectBegin" not allowed. Ignoring. Line 43, file hw3_scene.pbrt Error: Scene description must be inside world block; "Material" not allowed. Ignoring. Line 45, file hw3_scene.pbrt Error: Scene description must be inside world block; "Shape" not allowed. Ignoring. Line 50, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectEnd" not allowed. Ignoring. Line 50, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectBegin" not allowed. Ignoring. Line 53, file hw3_scene.pbrt Error: Scene description must be inside world block; "Material" not allowed. Ignoring. Line 55, file hw3_scene.pbrt Error: Scene description must be inside world block; "Shape" not allowed. Ignoring. Line 61, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectEnd" not allowed. Ignoring. Line 61, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectBegin" not allowed. Ignoring. Line 63, file hw3_scene.pbrt Error: Scene description must be inside world block; "Material" not allowed. Ignoring. Line 65, file hw3_scene.pbrt Error: Scene description must be inside world block; "Shape" not allowed. Ignoring. Line 71, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectEnd" not allowed. Ignoring. Line 71, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectBegin" not allowed. Ignoring. Line 73, file hw3_scene.pbrt Error: Scene description must be inside world block; "Texture" not allowed. Ignoring. Line 75, file hw3_scene.pbrt Error: Scene description must be inside world block; "Material" not allowed. Ignoring. Line 76, file hw3_scene.pbrt Error: Scene description must be inside world block; "Shape" not allowed. Ignoring. Line 81, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectEnd" not allowed. Ignoring. Line 81, file hw3_scene.pbrt Error: Scene description must be inside world block; "AttributeBegin" not allowed. Ignoring. Line 83, file hw3_scene.pbrt Error: Scene description must be inside world block; "Material" not allowed. Ignoring. Line 85, file hw3_scene.pbrt Error: Scene description must be inside world block; "Shape" not allowed. Ignoring. Line 87, file hw3_scene.pbrt Error: Scene description must be inside world block; "AttributeEnd" not allowed. Ignoring. Line 87, file hw3_scene.pbrt Error: Scene description must be inside world block; "AttributeBegin" not allowed. Ignoring. Line 89, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectInstance" not allowed. Ignoring. Line 92, file hw3_scene.pbrt Error: Scene description must be inside world block; "AttributeEnd" not allowed. Ignoring. Line 93, file hw3_scene.pbrt Error: Scene description must be inside world block; "AttributeBegin" not allowed. Ignoring. Line 95, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectInstance" not allowed. Ignoring. Line 99, file hw3_scene.pbrt Error: Scene description must be inside world block; "AttributeEnd" not allowed. Ignoring. Line 100, file hw3_scene.pbrt Error: Scene description must be inside world block; "AttributeBegin" not allowed. Ignoring. Line 102, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectInstance" not allowed. Ignoring. Line 106, file hw3_scene.pbrt Error: Scene description must be inside world block; "AttributeEnd" not allowed. Ignoring. Line 107, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectInstance" not allowed. Ignoring. Line 110, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectInstance" not allowed. Ignoring. Line 113, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectInstance" not allowed. Ignoring. Line 116, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectInstance" not allowed. Ignoring. Line 119, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectInstance" not allowed. Ignoring. Line 122, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectInstance" not allowed. Ignoring. Line 125, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectInstance" not allowed. Ignoring. Line 128, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectInstance" not allowed. Ignoring. Line 131, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectInstance" not allowed. Ignoring. Line 134, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectInstance" not allowed. Ignoring. Line 137, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectInstance" not allowed. Ignoring. Line 140, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectInstance" not allowed. Ignoring. Line 143, file hw3_scene.pbrt Error: Scene description must be inside world block; "ObjectInstance" not allowed. Ignoring. Line 146, file hw3_scene.pbrt }}} === Q.2 === Is the small angle (curvature) approximation sufficient when doing the weight computation? From what I can tell the paper just goes with a planar disc from the start, and only mentions the assumption that the disc is parallel to the film plane.