Video Timestamp Copied to Clipboard!
Tweaks and Conclusion
Now that our Python script has done all the hard work of setting up a basic shader for all the materials we need, we can make a few changes to our scene and start finding some cool camera angles. I chose to switch the “MC_torch_flame” material to use an Emission shader in place of a Diffuse shader and added a refraction shader to the water materials (there are two shaders - one for still water and one for flowing). I’ll leave any other tweaks as an exercise for you, but here are some renders to get you thinking.
ConclusionSo what did we achieve? We started out with an obj file exported from our Minecraft world which came with lots of useful data (the names of our materials and images), but wasn’t set up for rendering in Cycles. With our Python script, we started with one basic template material and created a unique copy for each of the many materials in our scene, with the correct textures plugged into each one. Hopefully this shows you how a bit of simple Python can make boring, repetitive tasks much quicker and allow you to get to the fun parts of creating an interesting render sooner. Remember: this technique doesn’t just apply to Minecraft renders. Anytime you’re working with a pipeline and have a creeping feeling that you could be using data to achieve a result in an automated way rather than manually, it’s likely Python is a good way to go. Will you be giving this technique a try? Let us know in the comments.
As an extension to this technique, you might want to take the script a bit further. Here are some ideas:
- Incorporating the obj import and grouping steps into the script.
- Adding some exceptions to the script for certain materials, so that they can use a different template.
- Turning the script into an add-on that so that you can quickly access it and use it again and again.