uhlik / bpy

blender python scripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Script to load .ply and render using cycles headless

RohanChacko opened this issue · comments

Hi

I want to render a sequence of .plys using cycles (since I want to render other objects in the scene as well). I am using ver. 0.9.x with blender 2.8a. Can you guide me on how to script the following steps using the python api?

  1. Load the colored pointcloud .ply
  2. Convert to mesh using ico-sphere with mesh instance size 0.05
  3. Enable vertex color in Base Color and Emission attributes in material properties of the generated mesh (I am not able to render the per-vertex color without explicitly setting this).

I am new to blender so any help would be appreciated.
Thanks!

Hi
I was able to get the script working on my machine but I need to render it headless on a server. I get the error GPU functions for drawing are not available in background mode when running the script using

blender --background render.blend --python render_script.py

Is there any workaround for this?

commented

hi, i don't know of any workaround. if in headless all drawing is disabled, then there is nothing you can do i guess