Tutorials

Message Bus

In Blender API there is a module that we can use to track the changes of any object’s properties available through the Python API. This module names “Message Bus”.

Let’s look at how we can make an event handler function to track changes to a property. For example – the location of the 3D cursor.

How to arrange objects along a curve without distortion

The simplest way to arrange objects along a curve in Blender is to use two modifiers: “Array” and “Curve”. However, in this case, the object is distorted – its shape adjusts to the shape of the curve. In some cases, for example, when designing curbs or tank tracks, this is undesirable.

There are several ways to arrange objects along a curve without distortion. One of them is to use an intermediate mesh.

Setting up the scene environment for convenient retopology

To make our retopology process faster and easier, the scene environment may be slightly adjusted.

 

First, let’s enable snapping, set “Face” mode, and enable snapping to “Active” in the “Snapping With” section.

Also, check the “Backface Culling” checkbox so that the active retopology points do not magnetize to the backside of the processed mesh.

Ortho lighting

When the scene is lighted with “Spot” or “Point” light sources, the rays from such lamps do not propagate in parallel. This makes noticeable distortion, for example when lighting with textures.

The parallel ray’s propagation (orthogonally to its plane) we can get from the “Sun” lamp, but such light source does not support lightning with textures.

How to calculate the Bounding Sphere for selected objects

Most often, for quick simplified calculations with the object’s geometry, their Bounding Boxes are used – the minimum parallelepiped into which this object is inscribed. But sometimes the Bounding Sphere – the minimum sphere into which an object can be inscribed – can provide greater accuracy and simplify the calculations. While the location and size of the object’s Bounding Box is available in Blender at once, the Bounding Sphere we need to calculate manually

Let’s write a function that, based on the object list, returns the coordinates of the center of their Bounding Sphere and its radius.

Localization of Blender add-ons – with API

The classic way of localizing a Blender add-on (translating it into different languages) is convenient because requires just a single Blender Python API call – to get the currently used locale. This way is maximum universal, but Blender would not be Blender if it did not provide users an ability to localize add-ons through its own API.

The principle of creating multilingual add-ons using the Blender Python API is not much different from the classical one – we need to create a dictionary with all the variants of translations for all text strings from our add-on and use this dictionary in the localization.

Localization of Blender add-ons – classical way

If you want your add-on to be available for all Blender users around the world, you need to make the localization – translation of its interface into different languages.

The simplest way to make your add-on multilingual is the classic way, it is used in many other programs and requires the minimal usage of the Blender Python API.

How to get the render pixels coordinates in compositing

When fine-tuning the finished render in “Compositing”, sometimes it is necessary to refer to the pixels coordinates of the processed image, for example, to apply effects distributed over the entire width or height of the image.

We can get the distribution factor of coordinates along with the height or width of the rendered image using texture nodes.

Shed light on color spaces

Tutorial about color spaces used in Blender.

By Michael Soluyanov

Summary:

  • 0:00 – About the vision
  • 1:18 – What is sRGB?
  • 2:02 – Difference between Linear and sRGB
  • 2:30 – Why does Blender use Linear instead of sRGB?
  • 3:03 – Normal and Non-color data

Normally about normals

Tutorial about normal maps.

By Michael Soluyanov

Summary:

  • 0:08 Check yourself: try to find a mistake
  • 0:34 What is Normal?
  • 1:12 What is the difference between DirectX and OpenGL normal maps?
  • 2:05 How to use DirectX normal maps in Blender?
  • 2:26 Invert normal maps on inverted polygons
  • 2:53 Bonus