SDF Procedural Textures - upcoming cycles feature (hopefully)

Just in case people hadn’t spotted it, there is a new set of procedural texture features coming to Cycles based on signed distance fields.

At the moment they are in their own build for testing purposes, but they have the potential to open up a whole new raft of possibilities when it comes to procedural texturing.

I made some posts over on the Cycles Development thread - but thought a dedicated thread in the Materials section may be a better way to go, save clogging up the Cycles development thread with material experiments.

Anyway - here is a link to some of the experiments I posted.

and a link to the build is given in Charlie’s post

It would be great if people could have a play with this, test it out, post some experiments. Be great to see just how powerful this has the potential to be.

5 Likes

I saw your test renderings,nice results so far.I wonder if the volumetric hex bolt could be converted to mesh,like the volume to mesh does?would be open even more possibilitys for modeling.

I’m not sure volume to mesh works on volumetric materials.

However - Charlie did show a demo whereby raymarching was used to give the volumetric material a glossy surface. There is even a .blend file you can download to try it out.

https://developer.blender.org/D6464/new/#318102

I do hope something like that makes it into Cycles - being able to give a volumetric material a glossy surface would open up a whole raft of possibilities for materials.

As someone who doesn’t know much about much, could you provide more explanation? What are SDFs used for? I see your renders have the basic shapes one learns in kindergarten which doesn’t make me so excited because you can make these already.

If it’s about distance to edge then can we do something based on the thickness of the volume? How about make a glass cube with a glowing center? The center shouldn’t be perfectly cube and shouldn’t be perfectly circular either.

How about taking those basic shapes and distorting them slightly in 3d space to make something a little more organic?

How about weird artistic subsurface scattering with artistic control where thin parts let more light through that thick pats?

It’s not about making basic shapes. The basic shapes are building blocks that can be added, subtracted, transformed etc to make much more complex materials.

The power that comes with the SDFs isn’t with the primitives, but with the operators and vector transforms. These also work with existing textures too.

Take a look at the volumetric bolt I created. This is only scratching the surface.

I did some quick, simple tests and it’s a blast! So far no problems and everything works fine.
I hope that someone with better math skills than me gave it a try tho.



1 Like

Nice. The first one is especially very other worldly.

Something like this?

With SDF primitives (particularly combinations of them), you can make the glowing centre pretty much any shape you like.

Some other tests I did from the other thread

SDFs show great promise for making regular repeating procedural tile materials for archvis - this material takes just a single SDF shape (an elipse) but transforms it using a combination of polar and tile repeat functions to create a flower petal type motif.

You can also build fully volumetric shapes, like this hex bolt.

Just another tile pattern

1 Like

You can also create procedural icons that would have probably needed an image texture or complex nodes to have achieved previously.

The advantage here is that these can be procedurally animated, changing the colour, shape, position, morph them etc and because they are procedural, they have infinite resolution (unlike a bitmap)

You could also make procedural/animatable character faces. This could be used for say an animatable robot face - something along the lines of Eve, the robot from the movie Wall-E.

yes thank you, like that, that’s very cool. Now can you make something organic with noise next time you play with SDF? So control the inside shape with some kind of distortion. Bonus points for distorting it in a way that makes multiple instances of the shape appear inside.

Charlie posted something like that in the blender.org thread. This combines SDF primitives with voroni texture.

https://developer.blender.org/D6464

1 Like

love the first one, that’s organic.

A bit of explanation about the SDF nodes:

SDF primitives:

This node contains a list of primitives and come in two flavours - 2D and 3D.

3D primitives include things like sphere, box, pyramid, torus, cone etc and aren’t all that dissimilar to the normal geometry primitives we use every day in modeller.

Similarly 2D primitives include things like circle, rectangle, triangle, hexagon, parabola, arc etc but also include some more obscure shapes such as star, moon, horseshoe.

The primitives have various parameters that let you tweak the shape and should be thought of as building blocks.

The primitives can be used to drive things like colour, emission, displacement or volumetric density in materials.

SDF Operator:

The SDF operator node includes mathematical and boolean functions that allows you to perform various operations on the inputs.

Some of these operations work off a single input, such as invert or flatten, whereas other operations work using two inputs such as add, subtract, multiple, boolean etc.

These operations when used with SDF primitives work in a similar manner to operations on geometry (e.g. you can boolean two SDF primitives together to say carve out a spherical indent in a cube).

SDF Vector Operators:

These operators can be used to modify vectors. They can be used to tile a shape (either infinitely or a set number of times). Repeat a pattern around a polar coordinate. Twist, skew, mirror etc.


All of these nodes work with existing procedural texture, converter, vector nodes etc - so for example you can tile a Musgrave texture or perform a boolean operation on two Voronoi textures. You can also combine regular procedural textures with SDF primitives (like Charlie’s example above, where Voronoi was used to erode the surface of SDF primitives to give a pitted appearance)

2 Likes

Like this

Volumetric pacman

1 Like

ooooo wait that’s starting to look like parallax effect you get in some rock material where the surface particles are clear and shiny and just below the surface you get blurred particles.

Can you do a fractal like pattern / self-repeating but gradually gets smaller and more dense in one axis?

1 Like

Simple Hex tile node setup

Slight variation