19 lines
837 B
Python
19 lines
837 B
Python
"""Najpierw wygeneruj source_assets/character/character.blend; instrukcja w README."""
|
|
from ue_workshop import Scene, Sequence, Renderer, blender, camera, lighting, materials
|
|
from ue_workshop.paths import PROJECT
|
|
|
|
mesh = blender.import_character(PROJECT / "source_assets/character/character.blend")
|
|
scene = Scene("BlenderShot")
|
|
character = scene.mesh(mesh, name="Character")
|
|
floor = materials.color("Floor", rgb=(0.07, 0.08, 0.11))
|
|
scene.primitive("Cube", name="Floor", location=(0, 0, -10), scale=(20, 20, 0.2), material=floor)
|
|
lighting.studio(scene)
|
|
cam = camera.create(scene)
|
|
shot = Sequence(scene, frames=48)
|
|
shot.camera(cam)
|
|
shot.transform_key(character, 0, rotation=(0, 0, 0))
|
|
shot.transform_key(character, 47, rotation=(0, 0, 360))
|
|
shot.save()
|
|
renderer = Renderer(width=640, height=360, samples=1, warmup=8)
|
|
renderer.render(shot)
|