Playing With Light



Blender has a Sky Texture plugin that lets you simulate sunlight at any point in the world at any time of day… will it work for a floorplan? Spoiler - seems that there isn’t much blender can’t do…

September Sunlight

Cumulative Illumination

image To create the cumulative illumination view, I added all the images together in Compositor and then used a colour ramp. I ended up adding the images with a little script (below)… Helpfully, the image nodes end up stacked and selected in the compositor so it was just a case of using Node Wrangler’s ‘Ctrl +’ to add them all together!

import bpy
# switch on nodes and get reference
bpy.context.scene.use_nodes = True

# https://docs.blender.org/api/current/bpy.types.NodeTree.html#bpy.types.NodeTree
tree = bpy.context.scene.node_tree

path = "full-path-to-images"
# create input image node
for i in range(60,180,1):
  print("Adding new image node")
  image_node = tree.nodes.new(type='CompositorNodeImage')
  filename = f"{i:04d}.png"
  imageFilePath = path + filename
  print(imageFilePath)
  bpy.data.images.load(imageFilePath)
  image_node.image = bpy.data.images[filename]
  image_nodes.append(image_node)
  

Here’s the compositor node set up: image

Comments