Preserve Volumetric Textures when Fracturing

So there’s this marble that doesn’t retain the look after being fractured.
Is there a way to keep it clean?


Node Tree


Blend file

my initial reaction is “no” since the volume of the individual pieces are different than the whole. So if your texture says “purple here” then “here” is at a different location in a differently shaped piece.

Interesting problem, I don’t know of a way to bake a 3D procedural into a point cloud but that would be our ideal solution here. This is the kind of stuff Houdini is very robust for.

This is an interesting question that I did not expect when reading the thread title. You could rename it to eg: Preserve/keep consistent volumetric textures in shards when fracture the mesh.
Perhaps you could also pose this question in the fracture modifier thread.
Edit: thanks for rename the title :slight_smile:

So that kind of 3D/volumetric map exists in other softwares?

As close as you can get with Fracture Modifier :


But the more the shards move apart, the less “recognizable” the original pattern will become.

marbleSample1.blend (299 KB)

Note, blend works with Fracture Modifier Build only. The FM build can be found here:

http://df-vfx.de/fracturemodifier/

Dont know whether this thread will help - it was created before volumetrics came into cycles and so uses a very novel technique to achieve what you are looking to do:

1 Like

What texture coordinates are you using. If you select “object” texture coordinates - the volumetrioc texture should be preserved across the shards:

If that doesnt work - try merging all of your shards so that they form part of the same object.

This scene shows two cubes side by side = as you can see the volumetric texture is preserved across them.


Setting to object coordinates could work but it requires one step that the Fracture addon doesn’t do… That is to keep the fractured origin in the same position as the original object.

Select your original object, Shift+S>Cursor to Selected, select your shards, in the menu>Object>Transform>Origin to 3dCursor.

After this step, the object coordinates will work seamlessly.

I’ll keep this short because I have a habit of praising Houdini and I don’t want to be tedious : yes Houdini lets you manipulate data in all the ways you’d ever imagine. Yes, even that.

To follow up on the discussion, I didn’t realize the fracture modifier made shards into tiny objects… so I guess the logic works. Nice !

@scorpion81 thanks that’s adequate for my needs. Funny how the texture is stationary. And first time using this build. Why is it not built in trunk/root?

@moony It looks interesting but my node tree martial arts are a bit too basic for it.

@Secrop couldn’t get that object coordinate thing to affect it proper.

As a side note metaballs were tried to see if different textures could mix.

Well, it was rejected in review because there were differences in opinion about what design should be used and how it should be made “compatible” with official blender. To achieve the current state of functionality and (mostly) ease of use, i had to add relatively many changes, the entire FM code is about 25k lines now inside blender.
Most of those changes were workarounds around blenders slowness in handling many individual objects. Then i needed to actually fracture the mesh, keeping a cache of the shards because i cannot refracture in every redraw (too expensive).
Furthermore i needed to alter the rigidbody system so it deals with both regular rigidbodies (existing in blender) and the FM shards, and on top i added stuff like autohide and automerge to automatically let inner faces in glass disappear, and fixing smooth normals so it looks like unfractured when being intact.
Last but not least i added dynamic fracture, so fracture events happen while the rigidbody simulation runs, depending on impact points (which is a bit WIP still).
Ah, and i needed to reinvent the wheel of a constraint system inside the FM, between the shards, too.

in your setup you need to use the object coordinates in the noise texture as well. the object coordinates should drive all textures you want to ‘fix’ at the shards. you may need to scale it to keep the desire effect.

Hi. Thank you all.
We need some volumetric texture that allows to see better the effect, some kind of volumetric grid. I’m not good with nodes, anyway I did some tests.
This is with Fracture Modifier (For Fracture modifier Blender build):
http://pasteall.org/blend/index.php?id=44477

It’s like ‘kwikker’ had said, the texture looks stationary.

This with Cell Fracture:
http://pasteall.org/blend/index.php?id=44478

The sphere in the right is just the sphere after applying cell fracture. On the left is the sphere after doing what ‘Secrop’ had said about changing the origin. The simulation with rigid body looks inverted in shards, but the texture looks more consistent, but I’m not sure.

Edit:
I just realized that if I connect a glass material to “Surface”, IOR breaks all. So I do not know how reliable my experiment is.

Hmmm, in the Fracture Modifier you got the “problem” that only the mesh moves, but the object origin doesnt.
UV as input would work best in theory, but it has no effect on volume shaders, obviously. (as it is UV only and not UVW).
Then, “Generated” might help a bit too… it moves with the shards until they break, but as the shards are basically only mesh islands and no real objects, then the texture will not move with the shards correctly any more, because for blender just the shape of the object changed (and not the transformation).
So ideally one would need some builtin UVW volume texture grid… but i think even this one needs to be aware of the way the FM handles the shards. Bottom line, you might need real objects for now, either via cell fracture or converted from the FM.