3D Surface Plots in Blender

Bilal Himite
The Startup
Published in
5 min readMay 27, 2020

--

Blender is a very powerful 3D graphics software. Despite its steep learning curve, it can be used to 3D model, render images and animations or even make games. Blender is open-source and has a big community.

On the other hand, libraries like matplotlib , seaborn, ggplot and plotly are best suitable for scientific data visualizations. You are almost guaranteed to learn at least one of them when learning computer science.

Today, I’m going to show you how to visualize data in Blender.

3D Surface Plots

In order to plot a 3D surface, we are going to use a displacement map (height map). But first, we need to make one.

We are going to use Python Imaging Library or PIL. We will create an 8-bit grayscale image and fill every pixel with an 8-bit integer.

If 8-bit is not enough or it doesn’t provide enough details you can use a 32-bit image using the mode I instead of L. Or you can push it forward and use a float image (mode F).

Then, we will create a color map (diffuse map) to color the surface plot. We can re-use the code above.

In this example, I will use Perlin noise to generate the displacement map and linear…

--

--

Bilal Himite
The Startup

[Looking for a 6-month internship in Data Science.] I write random tech-related content weekly. https://bilalhimite.me/