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ā€.