SDF, Volumes and Force Fields

No,
there have been a new mix node.
Try Blender 3.4

1 Like

Thank you . Your setup helped me to get closer to what I was looking for.

I replaced the torus and Suzanne with my meshes. One of the meshes is rotated when I perform the GN Blend parameter. Do you know what could be rotating my mesh in the setup?

Thank you

This could be you need to set relative on object info node. Or just at a transform node and rotate it back.

2 Likes

Thank you, AlphaChannel.I forgot to set ‘Object Info’ node to relative.

Hi Bruno. Does
Object Info -> Relative
fix your rotation issues?

I’m on a SDF asset file. Its my beginnings with Blender’s asset system.

Current nodes available (Blender 3.3.1) …

All preview images are renders, they stored outside the asset-blend file with absolute file names.
Sharing this with other people would break all preview icons.
Do you know a way to share GN node assets with others without losing preview icons?

3 Likes

Have a look at serpens3, you can make yr own add on/installer.

Hi AlphaChannel.
If possible, I like to keep the load of budget or the load of lifetime as low as possible.

Maybe I made an error. I use a single preview object for all SDF node groups.
My approach was kind of suboptimal.
I end up fiddling around inside that node group, changing the node group used for rendering preview image.

Trying different approach.
I will try to rely on ‘render active object’ instead of relying on external preview images.
Each asset-group will get its own preview-object.
I would have to select asset-group and related preview-object one by one, and hit ‘render active object’.
But, Maybe, this could be automated.

Some changes …
SDF previews are created with ‘render active object’. Creates boring previews, ignores objects material and lighting, but there is no issue sharing them.

For each SDF node group there is an unique object used to create the preview.

1 Like

I try to get working Mingle nodes in Blender.

‘Mingling’ combines distorting coordinates and blending textures. It helped me a lot to create grunge patterns in MaterialMaker.

3 Likes

I try to build whole SDF library from basic SDF’s.
In one of his videos Erin shared an idea - he set volume cube background value to 1, so SDF do not need to be inverted.
Still, we get an SDF by subtracting an offset from a distance function

The most basic ones are …
the sphere …

and the plane …

Both do have a vector input (Center or Location), which offsets the whole shape. We could use those to plot a function like this …


We do get a parable:
parabel
The sphere itself does act like a brush of a plotter.

We could do the same with the Plane SDF:
plane_parable

Applying a function to a location input is a tool. We could create various curve shapes that way.

With the sphere sdf we also could implement a beam:

Or a torus:

It is always the same pattern … we do get a completely new shape using a function to offset the Sphere SDF or the Plane SDF.

The Plane SDF is also useful to convert a mesh to an SDF.
mesh_to_sdf

This is the base, how I try to get a variety of SDF’s from the two most basic SDF’s … Sphere and Plane.

2 Likes

Another little library I made last time.
It is about warping, bending, deforming.

Most objects are rectangular shapes, which got deformed.

Current list of deformers …
deformers_1

I try to keep these in a 2nd library, outside the SDF lib. But it is intented that they are used together.

4 Likes

Singh created an interesting hack to do simulation in GN Blender.

I tried something similar with SDF volumes. (At least Blender 3.4 needed)
sim_volume_sdf.blend (1.4 MB)

Start the ‘Anim Player’ (Space bar) will do simulation.
Each simulation step does an union of the buffer with its transformation.

There are some drawbacks. I have to convert Volume to mesh and use that mesh to create an SDF. Because currently there is no way to compose (‘union’) volumes directly.

Since I used Volumes, I rely on a coarse grid. I needed to be careful, because there are large rounding errors and heavy error propagation.

1 Like

Still exploring SDF.
Camera Culling also could be done with SDF.

You need a Cone SDF, and align/orient it to a camera object.
After, you could create a selection from SDF.

Example result …

Still dealing with strange SDF-Simulation problem.

Thats the setup. (Using new simulation branch, its easier.)

GN modifier has a small simulation which only generates mesh from SDF, and turn it to SDF again. Now see what happens

There is increasing loss of shape quality, until it completely shreds to noise.

2 Likes

Another experiment.

A spherical force field (singularity) looks like this …

The ‘calculate force’ node turns a distance-vector to a gravity vector.

And the simulation, which uses our gravity field …

The result …

4 Likes

I worked on something to make pull direction of a force field visible.

Thats a ‘donut’ force field …

However, we could use strength of force field vectors to check for positions where strength of a force exceeds a threshold. That way we could create a volume from a force field.

There is a Meta-Donut. It is created from a donut-shaped force field.

2 Likes

Empty as SDF transform control:

3 Likes

Nice … I like how you use transforms to do something with a position vector.

Would it be an idea to put your setup into a group?
(‘apply object transforms to vector’ …)

One could reuse same idea for different SDF’s …

… or it could be used for remapping textures / force fields / …
it is very useful.

1 Like

No problem!

I worked on the SDF-lib again. The Location / Rotation inputs got removed from shape nodes.


Now, the SDF’s are transformed by tweaking the position with Transform Coords nodes.

Both need to be ‘inverted’ to get proper results for SDF’s.

2 Likes