Skip to main content

A Renderer built for the SceneProg project

Project description

SceneProgRenderer

SceneProgRenderer is a Python-based Blender automation tool for rendering scenes programmatically. It allows users to generate high-quality renders, including 360-degree animations, custom camera angles, and transparent background images using Blender’s Python API.

🚀 Features

  • Scene Loading & Setup

    • Clears the scene and loads a new .blend file.
    • Applies smooth shading and fixes materials.
    • Adds an environment texture for realistic lighting.
  • Rendering Options

    • Single Render: Capture an image from a specified camera position.
    • Front/Top Views: Render images from standard viewpoints.
    • Corner Views: Automatically position the camera at four scene corners.
    • Edge Midpoints: Position the camera at four upper midpoints of the scene.
    • 360-Degree Animation: Generate a rotating video render.
  • Supports Transparent Backgrounds

    • Renders images with RGBA and film transparency for compositing.

📦 Installation

pip install sceneprogrenderer

📜 Usage

Importing the package:

from sceneprogrenderer import SceneProgRenderer

Initializing the Renderer

renderer = SceneProgRenderer(
    resolution_x=1920,
    resolution_y=1080,
    samples=128,
    frame_rate=30,
    num_frames=360,
    cuda=False,
    verbose=False,
)

Generic Render

renderer.render(
  path="scene.blend",
  output_path="output.png",
  location=(2, 2, 2),       ## Camera location
  target=(0, 0, 0),         ## Target location
)

Render from corners or edge midpoints

renderer.render_from_corners(
  path="scene.blend",
  output_paths=["corner1.png", "corner2.png", "corner3.png", "corner4.png"],
)

renderer.render_from_edge_midpoints(
  path="scene.blend",
  output_paths=["edge1.png", "edge2.png", "edge3.png", "edge4.png"],
)

Render from front or top views

renderer.render_from_front(
  path="scene.blend",
  output_path="front_view.png",
)

renderer.render_from_top(
  path="scene.blend",
  output_path="top_view.png",
)

Render 360-degree animation

renderer.render_360(
  path="scene.blend",
  output_path="360_animation.mp4",
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sceneprogrenderer-0.1.4.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sceneprogrenderer-0.1.4-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file sceneprogrenderer-0.1.4.tar.gz.

File metadata

  • Download URL: sceneprogrenderer-0.1.4.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for sceneprogrenderer-0.1.4.tar.gz
Algorithm Hash digest
SHA256 bab2e67adb0a1f1dfff8dd43abb01cb1f72051e4e113e2097ef39cbba3c46ca2
MD5 dcebff3995ee5c2d80b97f7208275728
BLAKE2b-256 47771436a40c4f6eef64e3f686661cefc0e7412cc636344e48ca08ccf587f55a

See more details on using hashes here.

File details

Details for the file sceneprogrenderer-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for sceneprogrenderer-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cd47788c318f6fd36bda59f3c345724670023c17ed1cc4c60edd0db42382457f
MD5 24e425e340c56a99382222de22300340
BLAKE2b-256 79e88262a6b31008919107d2589b4791ad12f3e5dc325a55fa41a774fcca22d9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page