Listing 5. The scene file for a complete cabin.
# The mkillum comment is a special parameter that is
# used to tell the system that only the given
# material (window_illum in this case) acts as an
# interior light source for the scene. It is a
# speedup parameter, and may affect quality if used
# on sources that are very large.
#@mkillum i=window_illum
# genlogwall parameters: material name length_ft
# height_ft logdiam_inches [holedatafile]
!genlogwall xpine southwall 15 10 8 \
holes/southwall.holes
!genlogwall xpine northwall 15 10 8 \
| xform -t 0 180 0
# On these next two, be sure to rotate first.
!genlogwall ypine eastwall 15 10 8 \
holes/eastwall.holes | xform -rz 90 -t 180 0 0
!genlogwall ypine westwall 15 10 8 | xform -rz 90
# Logs don't join together too well at corners,
# so we add some vertical beams to make
# them pretty.
#
# genlog Parameters: material name
# length_ft diam_inches
!genlog zpine swcorner 10 10 | xform -ry -90
!genlog zpine secorner 10 10 \
| xform -ry -90 -t 180 0 0
!genlog zpine necorner 10 10 \
| xform -ry -90 -t 180 180 0
!genlog zpine nwcorner 10 10 \
| xform -ry -90 -t 0 180 0
# Generate two pieces of roof. The data is the
# same for each half, but the positions and
# rotations are different.
!genroof -o3 roof roof.e roofdata 6 12 \
| xform -rz 90 -t 90 -36 120
!genroof -o3 roof roof.w roofdata 6 12 \
| xform -rz -90 -t 90 216 120
# A basic floor would be nice
!genbox concrete floor 180 180 .01 \
| xform -t 0 0 .01
Copyright © 1994 - 2019 Linux Journal. All rights reserved.