Mountain terrain from a displaced grid, with water

Mountain terrain from a displaced grid, with water. A real render from the production GPU, the bpy script that produced it, the settings and the GPU seconds. Pass the script's URL as scene_url to get the same result.

Mountain terrain from a displaced grid, with water
Mountain terrain from a displaced grid, with water
PromptRender https://render.janction.jp/samples/ex19_terrain_displace.py at 1920x1080, 128 samples, sunset preset.
MCP callrender_final(scene_url="https://render.janction.jp/samples/ex19_terrain_displace.py", frame_start=1, frame_end=1, samples=128, output="png", width=1920, height=1080, environment="sunset")
GPU s / round trip6.4 s / 7 s
Price at the planned rate0.6 JPY (charged 0 during the beta)
Rendered on2026-10-08
Blender5.0

Settings

frame_start1
frame_end1
samples128
denoiseTrue
outputpng
width1920
height1080
environmentsunset

Blender warnings

The script (bpy, runs as is)

ex19_terrain_displace.py. It builds the scene, the camera and the frame range; resolution, samples, denoising and the GPU are set by the service.

"""JANCTION Render example 19: a mountain terrain from a displaced grid, with water, at sunset (one still).

Reproduce: render_final(scene_url="https://render.janction.jp/samples/ex19_terrain_displace.py",
                        width=1920, height=1080, samples=128, environment="sunset")
A 200x200 grid displaced by a procedural Clouds texture through a Displace modifier; a flat plane for the water.
"""
import math
import random

import bpy
from mathutils import Vector

for ob in list(bpy.data.objects):
    bpy.data.objects.remove(ob, do_unlink=True)
scene = bpy.context.scene
scene.frame_start = 1
scene.frame_end = 1
scene.render.fps = 24
random.seed(19)


def material(name, color, roughness=0.5, metallic=0.0, **inputs):
    mat = bpy.data.materials.new(name)
    mat.use_nodes = True
    bsdf = mat.node_tree.nodes["Principled BSDF"]
    bsdf.inputs["Base Color"].default_value = (*color, 1.0)
    bsdf.inputs["Roughness"].default_value = roughness
    bsdf.inputs["Metallic"].default_value = metallic
    for key, value in inputs.items():
        bsdf.inputs[key].default_value = value
    return mat


def smooth(ob):
    for p in ob.data.polygons:
        p.use_smooth = True
    return ob


def add(op, name, mat=None, **kw):
    getattr(bpy.ops.mesh, op)(**kw)
    ob = bpy.context.object
    ob.name = name
    if mat is not None:
        ob.data.materials.append(mat)
    return ob


def text(body, name, mat, location, size=1.0, extrude=0.02, rotation=(math.pi / 2, 0, 0), align="CENTER"):
    cu = bpy.data.curves.new(name, type="FONT")
    cu.body = body
    cu.size = size
    cu.extrude = extrude
    cu.align_x = align
    ob = bpy.data.objects.new(name, cu)
    scene.collection.objects.link(ob)
    ob.location = location
    ob.rotation_euler = rotation
    ob.data.materials.append(mat)
    return ob


def look_at(ob, target):
    ob.rotation_euler = (Vector(target) - ob.location).to_track_quat("-Z", "Y").to_euler()


def camera(location, target, lens=50.0, name="Camera", active=True, fstop=None, focus=None):
    data = bpy.data.cameras.new(name)
    data.lens = lens
    if fstop is not None:
        data.dof.use_dof = True
        data.dof.aperture_fstop = fstop
        data.dof.focus_distance = focus if focus is not None else (Vector(target) - Vector(location)).length
    cam = bpy.data.objects.new(name, data)
    scene.collection.objects.link(cam)
    cam.location = location
    look_at(cam, target)
    if active:
        scene.camera = cam
    return cam


def light(name, kind, location, energy, target=None, size=1.0, color=(1.0, 1.0, 1.0)):
    data = bpy.data.lights.new(name, kind)
    data.energy = energy
    data.color = color
    if kind == "AREA":
        data.size = size
    ob = bpy.data.objects.new(name, data)
    scene.collection.objects.link(ob)
    ob.location = location
    if target is not None:
        look_at(ob, target)
    return ob


def world(color=(0.02, 0.02, 0.03), strength=1.0):
    w = bpy.data.worlds.new("World")
    w.use_nodes = True
    bg = w.node_tree.nodes["Background"]
    bg.inputs[0].default_value = (*color, 1.0)
    bg.inputs[1].default_value = strength
    scene.world = w
    return w

rockm = material("Terrain", (0.42, 0.36, 0.3), roughness=0.9)
water = material("Water", (0.08, 0.22, 0.35), roughness=0.03, metallic=0.05)
bpy.ops.mesh.primitive_grid_add(x_subdivisions=200, y_subdivisions=200, size=80, location=(0, 10, 0))
terrain = bpy.context.object
terrain.name = "Terrain"
terrain.data.materials.append(rockm)
tex = bpy.data.textures.new("Noise", type="CLOUDS")
tex.noise_scale = 1.6
tex.noise_depth = 4
disp = terrain.modifiers.new("Displace", "DISPLACE")
disp.texture = tex
disp.strength = 14.0
disp.mid_level = 0.35
smooth(terrain)
add("primitive_plane_add", "Water", water, size=200, location=(0, 10, 1.2))
camera((-10.0, -34.0, 7.0), (0.0, 12.0, 3.0), lens=40)

All examples · 日本語

JANCTION Render v0.4.21 · JasmyLab Inc. · Updated 2026-10-07 · Tested with Blender 5.0, JANCTION Render 0.4.21 · 日本語