Photo of Jamie & Lion

The personal site of Jamie Knight, an autistic web developer, speaker and mountain biker who is never seen far from his plush sidekick Lion. View the Archive

Topics: Autism Development

Experimenting with Blender on the iMac.

It’s been about 10 years since i last did any experimentation with 3D graphics and rendering. At the time i was using a shared PC and demo software. I got good at building my scene as i had to rebuild it every time because the save feature was disabled!

A few weeks ago i decided to start playing around again to see how the modern tools and tech compare. I have my very lovely 5k iMac so i wanted to see what it could do.

Why Blender?

Blender is an open source 3D modelling, animation and rendering tool. It’s been used to make a range of 3D movies and also in adverts etc.

It’s free to use so it felt like somewhere useful to start. I don’t have any specific goals in mind, but i figure if i learn how to use it i will start to find uses for it.

At the very least its a distraction and a useful way to spend my time in the evening.

My experiments.

My interest is more technical than artistic. I am interested in how the technology works, especially around the use of “ray casting”.

Raycasting is the process of simulating light inside the computer. Unlike older rendering methods (rasterisation, like in games) it’s attempting to replicate the physics of the real world and can in turn give much better almost photorealistic results.

At this stage my experiments are just the basics. Getting some models, rendering them, playing with some animation and understanding the tools a bit better.

The rest of this post is a summery of what i have learnt so far.

OpenGL, OpenCL & CPU.

The rendering system used within blender is called Cycles. One of the first things i have learnt about is that there are three types of rendering cycles can perform. It can either:

1. Render on the CPU – this is the simplest, just use the CPU to do all the maths needed to simulate each light beam.
2. Render using OpenGL – treat the scene like a game and render it using rasterisation. This gives more a more cartoon and game like feel and is really quick. All the previews are rendered this way.
3. Render using OpenCL (aka GPU Compute) – this uses the GPU in a different way. It uses the programmable shader inside the GPU to do ray tracing. The shaders are not very quick, but there are thousands of them, so they can accomplish lots of throughput when the problem is right.

On my iMac, i have been using OpenGL rendering when making preview videos etc, and then using CPU rendering when i want to have the high quality rendered output.

My iMac does support OpenCL rendering, but its really slow. By all accounts this is due to terrible drivers. I may install Linux on my iMac and see if that works better.

Samples and tile size.

With the raycasting options the main quality setting is the “sample” rate. In effect this is how many beams of light to use when simulating the scene.

There no “perfect” value. It’s always a trade off between quality and performance.

For example, my first experiments involved rendering some wallpapers for my iMac featuring Vincent one of the free blender assets. As this render is zoomed in close and Vincent has lots of detailed textures, it took around 600 to 1000 samples to look good. Below that the image is fuzzy / noisy.

However, for my animation experiments the sampling can be much much lower and it still looks good. My first rendering used 24 samples and was okay but a bit fuzzy. I have experiment around and 50 samples looks much better. At 100 samples I couldn’t really tell the difference anymore.

My animation is only 100 frames long. However, the difference in performance between 50 and 100 frames is astounding. The first frame at 50 samples took 11 minutes to render, and at 100 frames to 32 minutes.

With that in mind i am now re-rendering the scene at a sample rate of 50. It will look much better, and hopefully not to too long to render. To help speed things up i am also experimenting with parralism.

User a render node.

I have two Macs in my flat and they are connected together with a Thunderbolt 3 cable. Both Macs have modern quad core i7 processors.

Given i have the extra mac i have started experimenting with splitting up the rendering so it can be completed quicker.

I know Blender has a proper tool for this, but for now i am keeping it simple. I render the first 50 frames on my iMac, and the second 50 frames on my Mac mini.

I am going to explore these options further. I am sure as i experiment more with the tools i will need more render performance so being able to make the most of my hardware is essential.

Final thoughts.

It’s been fun to explore blender and cycles. I have a few future projects in mind but mostly i am just enjoying the new technology and learning. I have time in the evening and its fun to use to too play with new technology rather than just consume media.

Published: 27 April 2017 | Categories: , Permalink


Your Comment