Code Monkey home page Code Monkey logo

blender-plotting's Introduction

3D plots using Blender as a backend

Plots

2D 3D
vector_field 3d_point_distribution

Animations

slerps_workbench.mp4
bezier_SE3.mp4

Docker Image

Prebuilt Images

ignamonte/bpy

Build from Dockerfile

Since a specefic version of python is required it is recomended to build and use the docker images.

./docker_builder.py

This will build blender 3.1 with python 3.10 as in an image called bpy-3.10:3.1.

To see the full list of build options use the --help flag.

Launch a docker container with access to gpu and display

docker run -t -d \
    --gpus all \
    --net host \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e DISPLAY=$DISPLAY \
    --name belnder-plot-dev \
    bpy-3.10:3.1

Notes

  • blender 2.83 is not compiling correctly at the moment.
  • you can copy the compiled module from the cotainer to the host machine if you have the basic dependencies and same python version
docker cp belnder-plot-dev:/home/docker/blender_tmp/build_linux_bpy/bin/bpy.so <path-to-python3.10-packages>
docker cp -r belnder-plot-dev:/home/docker/blender_tmp/build_linux_bpy/bin/3.1 <path-to-python3.10-packages>
  • compiling blender uses all the cores and is prone to run out of memory if you do not have enough RAM. Use the --builder_cpus N flag in the builder program to set the number of cores to use.

  • FFMPEG support is not correcly set. Animations can be saved as .avi and then converted to .mp4 using the ffmpeg cli tools.

  • At the end of every script bpy.ops.wm.quit_blender() must be called to exit blender. Failings to do so will result in blender running in the background consuming a lot of processor time. If the computer starts to feel slow check top to look fo any processes with 100% CPU usage.

See also - Additional Resources

  • Blender CLI Rendering - A repo containing scripts and utils to render scenes using the bpy module.

  • Blender BPY Python3.7 - Blender as Python module in a Docker container. Working with Blender 2.93 and python 3.7.

  • blenderpy - See the release page for precompiled python wheels for easy installation. Limited to Blender 2.91 and python 3.7.

  • Manim - A comunity mantained math plotting framework created by 3Blue1Brown from which this library is inspired

blender-plotting's People

Contributors

imontesino avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.