UV+W, 3D mapping for Cycles

Here comes my new craziest material:


I kinda invented a 3D UV mapping with memory of shape. :smiley: What it allows to do is to use a procedural material which remains constant when you cell-fracture the object where it’s applied.

Imagine a sphere where the material inside is red to blue and green from the core to the surface. Now, break it. How do you make the material of each shard remember where the core of the whole object was? I found a way. :eyebrowlift:


(I was thinking of a geode but I forgot a little detail: The hole in the center…) There’s more than simply a change of color from the core to the surface here. The “geode” has a crust which isn’t paper thin. There’s even a Displace modifier used on it… And a subtle bump map on the faces of the shards too.


Still not a geode but there’s a hole in the center now. :wink: (Same material, different colors.)

It’s a bit difficult to see the progressive change of color. That’s why I have a video in preparation where it’s more obvious. (If I ever finish to render all the frames. I have always something better to do than watching the paint dry.) :wink:

In these 2 images, the sphere was cell-fractured, the shards were dropped on the floor as rigid bodies and re-joined in a single object. The material didn’t change during the whole process. The center of the sphere is long gone but the material still remembers it. :eyebrowlift:

Let’s see if I can explain clearly how it works.

Take an object. (It doesn’t need to be a sphere or a cube. Uneven dimensions work as well.) Create an UV map with "Project from View (bound) from the top orthographic view, and a second one from front orthographic view. That’s it, you’re done! :smiley:

Well, almost… :wink: You put the 2 UV maps in a node tree as Attribute inputs. You plug a separate RGB to the vector outputs. The first map gives you U, V and zero. The second one gives you U, W and zero. You take one U, V, W and you combine them into a vector. Here were are. We have the representation of our object as UVW coordinates in a virtual cube of 1x1x1.

All that is needed is to join the shards to create the 2 UV maps. You separate by loose parts, reset all the origins to the center of geometry and then you can play with Bullet physics.

All the procedural textures from Cycles work in 3D. That’s really useful. (Expect some weird things with geometric textures like the checker… And I suddenly realize that I haven’t tested the brick texture.) :wink:

We can do all kind of calculations on this UVW vector to use it as factor, or even calculate the distance in between a point and a “center” (which doesn’t need to be in the middle of the object) and also turn it into a factor. (That’s exactly what the “Distance2Fac” group node does.)

No blend file this time. I must still implement the spherical randomization part which goes with the “Distance2Fac”. (The idea is just here, waiting to flow trough my fingers into Blender.) :wink: And I have the moon to break in another thread!

I hope that was interesting (altho long). :eyebrowlift2::eyebrowlift::wink:

(You can you call me crazy. I’ll take it as a compliment. I prefer that to being ignored by a bunch of silent pedestrians while I’m shaking my sign “Can you see me?” at the corner of the street.) :spin: :smiley: And while I wait for the men in white, I go on…


(Image of reference: http://en.wikipedia.org/wiki/Internal_structure_of_the_Moon )

Of course, I exploded the Moon. :smiley:


Motion blur definitively works well on particles. :wink:

I used exactly the same material on the 2 moons and it just works. (If you look closely, you should notice the darker crust.) It’s just a pity the explosion hides the glowing core…

Very nice, and very ingenious use of textures :smiley: I love this, do you plan on making a video tutorial covering this as well? I am very impressed with all the materials you’ve made in the past, but this is excellent!

very clever use of nodes !!! will have to find time to try this out

big thumbs up

Looks really good. I may give this a try when I get home.

Would you be able to post the blend file for this - or show screenshots of the node groups expanded.

Thanks

Nice one! I’ll definately try this. Using procedural textures in 3D is common, using 2 UV-maps is a great idea. What I still don’t get is how the fractured objects keep their materials,even if they are separate objects after fracturing?

Thank you every one, it made me feel all warm inside. :wink:

@Moony: Lucky you! I suddenly felt too lazy to do all these snapshots so, here is the blend file for the first image. Enjoy! :smiley:

UVT 3D Geode.blend (635 KB) (Updated: Without the missing and unnecessary HDRI.)

@Galingong:
That’s quite easy. The UV mapping is the most resilient thing for meshes. As long as you don’t move the vertices around, the UV map won’t change when you separate or join meshes. You can even apply the rotation, move the origin, etc, etc, the UV map won’t flinch. :wink:

your walking on a thin line or near the edge of genius and/or crazy LOL
nice work indeed
if i remember well this is the old trick of adding a UV map then separating in parts and the UV will be seperated too!

very interesting use of the seperate node to work with the UVW UV coordinates

are you preparing a tut for the cheese moon ?

did you look at the explode/build modifier may be or only the new fracture too?

thanks

@RickyBlender: I’m thinking of doing a tutorial for the whole process… Maybe the Moon, maybe something else. I haven’t decided yet.

And no, I haven’t tested with the Explode modifier. When I want to break things, the first thing that comes to my mind is “Cell Fracture”.