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.3.tar.gz (6.8 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.3-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sceneprogrenderer-0.1.3.tar.gz
  • Upload date:
  • Size: 6.8 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.3.tar.gz
Algorithm Hash digest
SHA256 36b1330385fd07fb25ac7a4257dfd0f1e999ba450a26a49cf7827dbaa129a32d
MD5 279af0c5c6f18368e2f6bfb0547ab9c4
BLAKE2b-256 681445cde81ea85d04b4ebc9d81996b922a56ead1dbecffb5c59c7ec2862c901

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sceneprogrenderer-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ca1f547d5f5230c31695d20c1963d8c2da1a927e5fdb08dbfc4ec8bbff4ab137
MD5 febcdec9a5f0f6ce898e714b2afbc234
BLAKE2b-256 3c45799a8545bd7581fa9546030b0291b47c9a3485f15d2f4c05a2f3cea5b6b2

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