Commit 1b5ada90 authored by Adam Štěpánek's avatar Adam Štěpánek
Browse files

Add relief

parent cba545c6
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ COPY config/user.js /tmp/user.js
RUN firefox --headless --CreateProfile hash && \
    PROFILE_DIR=$(echo /root/.mozilla/firefox/*.hash) && \
    mv /tmp/user.js $PROFILE_DIR/user.js
RUN npm install -g serve

# add configs
COPY config/i3.conf /root/.config/i3/config
@@ -80,5 +81,3 @@ COPY sketches /sketches
COPY blends /blends
COPY jslib /jslib
RUN chmod +x /scripts/hash.sh /scripts/testbase.sh && ln -st / /scripts/hash.sh

RUN npm install -g serve
+866 KiB

File added.

No diff preview for this file type.

+18 −0
Original line number Diff line number Diff line
import bpy
import math
import os

relief = os.environ["RELIEF"]
out = os.environ["OUT"]
width = float(os.environ["WIDTH"])
height = float(os.environ["HEIGHT"])

image = bpy.data.images.load(filepath=relief)
plane = bpy.data.objects["Plane"]
plane.scale = (1.0, height / width, 1.0)
plane.material_slots[0].material.node_tree.nodes["Image Texture"].image = image

bpy.data.scenes["Scene"].render.filepath = out
bpy.data.scenes["Scene"].render.resolution_x = width
bpy.data.scenes["Scene"].render.resolution_y = height
bpy.ops.render.render(write_still=True)
+11 −0
Original line number Diff line number Diff line
#!/bin/bash

source /scripts/preamble.sh

run() {
    playout "relief"
    runrecursive
    export RELIEF=$OUT
    runblend relief
    runeffect $OUT
}