The following is intended to accompany a lesson in automating renders from a CSV file in blender.
This lesson and its instructions is a work in progress, but feel free to use it any time.
Check back later for links to the YouTube video series.
If you encounter a problem with the instructions or the script, please don't hesitate to file an issue.
Clone this repository into your blender project.
cd ~/path/to/my/project
git clone https://github.com/CptCornWault/blender_automated_csv_rendering.git
Setup the project path.
Open blender_automated_csv_rendering/lessons/csv_render_1.py
and replace the projectPath
with the full system path to your project.
For for these lessons, include automated_csv_rendering\\lessons\\
in your path so that the script will know where to find the jobs, textures, and renders related to these lessons.
projectPath = 'C:\\path\\to\\my\\project\\blender_automated_csv_rendering\\lessons\\'
Don't forget to escape the slashes (\\
) and use the trailing slash.
Setup the lesson.
In the same file as step two, update the currentJobFilePath
with the path to the lesson directory you want to work from.
Lesson 1 is set by default
currentJobFilePath = projectPath + 'lesson_1\\'
Begin lesson 1.
-
Open Blender (For this tutorial we are using blender v2.82a) and set up a default scene with the default cube. If you are using an older version of Blender you may have to UV unwrap the Cube.
-
Open the scripting panel and load
/lessons/lesson_1/csv_render_lesson_1.py
. Also open the System Console so that you can see the script output. -
Make sure the cube object is named
Cube
. If you want to use a different name, make sure theobjectName
reflects your object name.objectName = "Cube"
-
Apply a material to your object, and name the material
cube_mat
. You can use a different name for the material if you change thematerial_slots
key that is being accessed to define thematerial
variable.material = renderObject.material_slots['cube_mat'].material
-
Set up the material to use an image texture.
-
Run the script. It will output progress and tell you when it is finished. If there is a problem, blender will tell you the error message and where it ocurred.