Today is 20th of July 2013, and Blender just got another update to version 2.68.
Every Blender update always brings a lot of excitements, apart from optimization in performance, the new release always comes with a lot of interesting features.
Blender Realtime Rendering (BPR) for Blender Internal Renderer, just like Blender Cycles. No one can see this coming, well I don't, but this is nice. CTRL + B to render region.
Blender has major updates every few months. It also has quick updates built daily, for bug fixes, etc. I think the Blender development is really impressive, can't be thankful enough to Ton Roosendaal and Blender Development teams, you rocks.
THE TUBE PROJECT When you run version 2.68, you will see the new Splash Screen from "The Tube", Blender Open Movie, which you can follow and support from their website: http://urchn.org/post/category/blender
Splash Screen from "Tube" Open Movie Project
Some of the best Blender Artists are working on The Tube. I am definitely looking forward to the release of this short film.
In the meantime, there is one feature of Blender 2.68 that catches my eyes... "Use Modifier Stack" for Particle. In short: ability of Blender Particles to emit from Faces that are generated on-the-fly using Modifier Stack. Particles and VFX lovers, this feature will excite you.
PARTICLES: Use Modifier Stack
What is the news with the "Use Modifier Stack"? Well, you probably have done this in the past, where you use one of the "Generate" Modifiers on mesh object, then you add or stack Particle System at the end, and then you are getting a funny result.
For example, here I created an Edge mesh and then add Skin Modifier to it and then lastly stack Particle System at the end hoping for the Skin Modifier mesh to emit Particles.
However, when you see in 3D View, you are getting something like below.
Funny result.
However, from 2.68, we have "Use Modifier Stack" added to the Particle System. The option is available under Particles Property tab. It is a toggle, you can either have it ON or OFF.
TIPS: In my opinion, this cool effect should be ON by default. Remember to always turn this on next time you create Particle effect.
If you enable "Use Modifier Stack", you will now get a more expected (I say: exciting and significant) result where Particles are born from Faces of the mesh. And this is actually a Procedural/Generative effects which means Particles can be generated LIVE from mesh that is changing.
Awesome result.
This is actually really cool.
I have a feeling that Blender Particles system will start to get more development throughout until Blender version 3.0. Maybe we will even get Node Based Particles sooner? Let's keep hoping and supporting Blender Development.
BLENDER SMOKE AND FIRE SECRETLY HAS IT...
This "ability to generate X (emitting from face) with respect to Modifier Stack" feature has always been available for Blender Smoke and Fire and it is always ON by default and we all take it for granted.
Emitting Smoke and/or Fire from LIVE Skin Modifier mesh from edge, for example, has always been possible back in previous versions of Blender.
... FINALLY IN BLENDER PARTICLE.
And now, Blender Particles finally has IT too.
Having the ability to emit Particles that respect the Modifier Stacks really allow us to do some advance Particles setup, with ease. This adds additional level of flexibility of being able to tweak and modify the mesh to update to Particles.
No longer one needs to "Apply Modifier" to the mesh object, to have it to work with Particles, we simply keep stacking the effects for Particles setup.
I guess this is a very good time to revisit some Blender Generate Modifiers and see what effects we can do with Blender Particles.
BUILD MODIFIER > PARTICLES
The Build modifier slowly (re)builds your mesh based on Face index number (which can be Sorted beforehand). It comes with option to randomly re-generate faces from whatever mesh you feed into it.
I believe at some point, when we have less baking, everything is more procedural. I like to see one day between Curve to Mesh is no longer separate. We cannot emit Particles from Curve yet, but Curve object in Blender actually has some interesting live Remeshing-ability too, which I think potentially needs to be hooked up with Particle Emission.
Next, "Mask Modifier" below is even nicer.
DYNAMIC PAINT > MASK MODIFIER > PARTICLES
Mask Modifier is one of those Generate Modifier that one can easily overlooked. I only paid attention to it when Dynamic Paint actually works together with it. Dynamic Paint generates Vertex Grouping on the fly, which is transfered into Mask Modifier that will actually Delete the Face on the fly.
Particles does not respect the Modifier back then... so this masking thing may not be too significant, however, it is super significant now.
So, Mask Modifier, can "mask" out or delete Faces on the fly. You can also inverse the effect where it will delete non selected. Very Houdini like (Group and Delete)!
Who will be the first to update and create realistic updated Burning Paper effect? :]
VFX POTENTIAL: Advance Dispersion or Dissolve effect, emit blood or dust from collision.
ARRAY MODIFIER > PARTICLES
The infamous Array Modifier needs no introduction, now this works with Particles so you could build Particles Arrays source.
PARTICLE INSTANCE MODIFIER > PARTICLES
With this stacking thing, we can now pretty much emit Particles from emitted Particles, if you know how to set it up. Not very obvious, but basically you Instance some meshes (using Instance Modifier) and then add Particle System to the object with Instance Modifier.
Make sure you have "Use Modifier Stack" turned on.
VFX POTENTIAL: Fireworks, explosions with debris, comet, meteor, arrow with fire, blood splatters, rolling puffs effect.
CONCLUSIONS
I guess that is all for this quick write up of "Use Modifier Stack". There are many other Modifiers that will work in interesting way with Particles.
Again, I have only highlighted small bits of this additional particle update called "Use Modifier Stack". However, this certainly something not to be missed. Seems small but very significant.
High in wish list is the ability for Particles to carry Color and all kind of per point attributes from Mesh Point. It is kind of there, but not really, but can be rendered somewhat.
Now it is a great time to create practical and more polished effects.
Time to think for a more interesting complex effects with Particles. With power comes responsibility, right? Layering effects, Lighting and Rendering, and Compositing. Those are next areas I certainly have to cover. Must take the VFX to polished level Andrew Price aka Blender Guru quality.
However, with Blender Sushi philosophy, it is always a good idea to experiment and to explore time to time, especially whenever there is a new Blender updates.
Be curious, do research, study reference, write notes, and make your own original works. That is the principle you could apply in everything.
So, one more thing...
Dynamic Paint > Boids Particles
This is Blender Particles live boids that generates/eats mesh of faces on the fly.
Few posts ago, I wrote a very long article about Array Drivers and Python. There are plenty of information in there and you probably will not get everything at once. Trust me, one day you will need some of those information when it comes to Drivers.
Anyway, I think it is best if we put the knowledge into practice.
WHAT WE KNOW ABOUT BLENDER DRIVERS
Blender Drivers are very useful for animation. We can setup all kinds of Drivers relationship to control almost anything that can be animated. Remember what I stated earlier: "Any keyable property can be driven".
Drivers can reduce multiple animation control into a single control.
Why do we use Drivers instead of directly adding Animation Curve or NLA Action Block? Because often we need to have some kind of additional layer of control (ideally automated) on top of MANUAL animation or animation that is ACTION based.
With Drivers in Blender, we also have potential ability to procedurally orchestrate our animation using Dynamic Paint.
Drivers is often closely related to Character Rigging / Animation Setup and that is probably the next area I would like to explore in near future.
DOMINO EFFECT = ONE-TO-MANY Driver Relationship with OFFSET In Computer Graphics, Domino Effect Animation is probably one exercise that one will encounter. You can tackle this animation problem with all kind of ways: 1. Physic Simulation. 2. Expression Driven Animation (procedural). 3. Action Driven / NLA 4. Manual Animation (hopefully this is only the last resort).
At the moment, I happened to be enrolled in this "Houdini Intro to VFX" 8 weeks workshop with Spencer Lueders and so far I gained a bit of understanding or "proceduralism" here and there. http://workshops.cgsociety.org/instructor.php?userid=37720
There is one class where Spencer does the Domino Effect using Houdini Expression. The advantage being Houdini is that everything can almost be 100% procedural, from the setup of Domino until final Domino animation using powerful Houdini expressions. Here, I am adapting Spencer's trick inside Blender using DRIVERS.
Just like when we do NLA animation using Python, Driving ONE-TO-MANY objects using a single control is always more interesting if we do slight OFFSET for each drive object.
NOTE: Domino Effect is not necessary need to be DOMINO. It is basically an effect where we have one object doing something that trigger another object doing similar thing, then continue to the next object, and so on.
IMPORTANT: Always watch the NAMING of array of objects.
We want to be able to quickly select objects IN ORDER. This is really important to ensure that we avoid SORTING PROBLEM and create proper matching Drivers relationship. We don't want to create wrong relationship pair, don't we?
#### QUICK SELECT BY NAME, NOW MORE PYTHONIC import bpy # Get all objects named "NAME*" and put it in a list mesh = bpy.data.objects sel = [item for item in mesh if "NAME" in item.name] for item in sel: item.select = True
Below is one trick if you want to quickly rename objects with naming convention: {objectname}.{digit} for example: Sushi.000, Sushi.001, Sushi.002, Sushi.003, Sushi.004 and so on.
### QUICK RENAME HACK, NOW MORE PYTHONIC import bpy # Get all objects named "NAME*" and put it in a list mesh = bpy.data.objects sel = [item for item in mesh if "NAME" in item.name] for item in sel: item.name = "newname.000"
In addition, below is a useful Python script to check the sorting of object in list.
#### RETURN INDEX NUMBER OF OBJECT BASED ON SPECIFIC NAME bpy.data.objects.find("Cube")
### EXAMPLE LOOP TO CHECK INDEX ORDER MAYBE USEFUL FOR SORTING import bpy mesh = bpy.data.objects myList = [item for item in mesh if "Cube" in item.name] for x in myList: print(x.name, mesh.find(x.name))
2. DOMINO PROCEDURAL ANIMATION SETUP
Before I gave you one long example script that does the setup the Domino Procedural Animation automatically, I want to make sure you understand the concept first.
THE BASIC:
We want to DRIVE the rotation axis of Domino "Rotation Euler" using DRIVER value.
The rotation in Blender Drivers is in Radian (we need math.pi)
We need to also specify the MIN and MAX value. Why? Because when we setup the DRIVERS, we do not want the domino to continuously rotating given the input value.
DRIVEN = Rotation Euler in X/Y/Z axis. Depending on your Domino object. DRIVER = Current Frame or other value, maybe we can use an Empty Location value.
The Driver value can be the Current Frame, but can also be ANY VALUE we pipe in as INPUT.
DRIVERS MIN & MAX LIMIT, The Python Way
In Houdini, there is a handy expression that can map values based on MIN and MAX. fit(INPUT VALUE, old min, old max, new min, new max) fit01(INPUT VALUE BETWEEN ZERO AND ONE, min, max)
In Blender, we can actually create our own Min and Max Expression and assign it as PyDrivers.
However, we can also use Driver Animation F-Curve which we can draw manually to specify the MIN and MAX. To draw manually each time is a hassle, so we use Python script like below.
Example Driver Setup Using Python - WITHOUT MIN & MAX LIMIT: # Select at least an object and run script below:
import bpy import math ob = bpy.context.object # add driver to Rotation Y axis myDriver = ob.driver_add('rotation_euler', 1) # assign driver type myDriver.driver.type = 'SCRIPTED' myDriver.driver.show_debug_info = True myDriver.driver.expression = 'frame * 0.1'
Example Driver Setup Using Python - WITH MIN & MAX LIMIT: # Select at least an object and run script below:
import bpy import math ob = bpy.context.object # add driver to Rotation Y axis myDriver = ob.driver_add('rotation_euler', 1) # remove the default fcurve modifier 'GENERATOR' fcurvetype = ob.animation_data.drivers[0].modifiers[0] ob.animation_data.drivers[0].modifiers.remove(fcurvetype) # add keyframes manually --- this is MIN and MAX ob.animation_data.drivers[0].keyframe_points.insert(0, 0) ob.animation_data.drivers[0].keyframe_points.insert(1, 2 * math.pi) # assign driver type myDriver.driver.type = 'SCRIPTED' myDriver.driver.show_debug_info = True myDriver.driver.expression = 'frame * 0.1'
You see that with MIN & MAX Limit, the object will rotate from 0 degree to 360 degree and stop. While the one without specified MIN & MAX will continue to rotate.
BLENDER SUSHI SCRIPT: Domino Effect based on TIME (Current Frame)
import bpy import math # http://blenderartists.org/forum/showthread.php?278678-copy-paste-a-f-curve-driver # Get all objects named "Cube.*" and put it in a list mesh = bpy.data.objects sel = [item for item in mesh if "Cube." in item.name] # Starting OFFSET value offset = 10 for ob in sel: myDriver = ob.driver_add('rotation_euler', 1) # remove the default fcurve modifier 'GENERATOR' fcurvetype = ob.animation_data.drivers[0].modifiers[0] ob.animation_data.drivers[0].modifiers.remove(fcurvetype) # add keyframes manually ob.animation_data.drivers[0].keyframe_points.insert(0 + offset, 0) ob.animation_data.drivers[0].keyframe_points.insert(1 + offset, -0.36 * math.pi) offset += 1 # assign driver type myDriver.driver.type = 'SCRIPTED' myDriver.driver.show_debug_info = True myDriver.driver.expression = 'frame * 0.1'
Once you created the setup, you can easily modify and tweak the setup using the code with a slight modification, for example like below, I commented the code above that we really don't need. We will not create new variable or modifier, just modify existing elements.
import bpy import math
# Get all objects named "Cube.*" and put it in a list mesh = bpy.data.objects sel = [item for item in mesh if "Cube." in item.name] # Starting OFFSET value offset = 1 for ob in sel: #myDriver = ob.driver_add('rotation_euler', 1) # remove the default fcurve modifier 'GENERATOR' #fcurvetype = ob.animation_data.drivers[0].modifiers[0] #ob.animation_data.drivers[0].modifiers.remove(fcurvetype) # add keyframes manually #ob.animation_data.drivers[0].keyframe_points.insert(0 + offset, 0) #ob.animation_data.drivers[0].keyframe_points.insert(1 + offset, -0.36 * math.pi) ob.animation_data.drivers[0].keyframe_points[0].co = 0+offset, 0 ob.animation_data.drivers[0].keyframe_points[1].co = 5 + offset, -1 * math.pi ob.animation_data.drivers[0].keyframe_points[0].interpolation = "LINEAR" ob.animation_data.drivers[0].keyframe_points[1].interpolation = "LINEAR" offset += 1 # assign driver type ob.animation_data.drivers[0].driver.type = 'SCRIPTED' ob.animation_data.drivers[0].driver.show_debug_info = True ob.animation_data.drivers[0].driver.expression = 'frame * 0.2'
Of course, what would be nice is actually to create FUNCTION and maybe USER INTERFACE (UI) that does all above for easy modification.
F-CURVES ANIMATION & DRIVERS ANIMATION What also interesting is the not so distance sibling relationship between the normal F-Curve keyframe animation and the F-Curve of Drivers. We could actually GET the list of keyframes from normal F-Curve and then SET it to Drivers quite easily using Python. This means that we can animate an object like normal where TIME is the only INPUT, and then use the Animation Curve as Drivers F-Curve. Getting the coordinates of normal keyframe animation points will be like below: >>> bpy.context.object.animation_data.action.fcurves[0].keyframe_points[0].co Vector((24.0, 6.7004075050354))
This is certainly something to explore in our own time.
BLENDER SUSHI SCRIPT: Domino Effect based on Empty Location
import bpy import math
# Get all objects named "Cube.*" and put it in a list mesh = bpy.data.objects sel = [item for item in mesh if "Cube." in item.name]
offset = 0 for ob in sel: myDriver = ob.driver_add('rotation_euler', 1) # remove the default fcurve modifier 'GENERATOR' fcurvetype = ob.animation_data.drivers[0].modifiers[0] ob.animation_data.drivers[0].modifiers.remove(fcurvetype) # add keyframes manually ob.animation_data.drivers[0].keyframe_points.insert(0 + offset, 0) ob.animation_data.drivers[0].keyframe_points.insert(1 + offset, -0.36 * math.pi) offset += 1 # assign driver type myDriver.driver.type = 'AVERAGE' myDriver.driver.show_debug_info = True # DRIVER VARIABLE # create new variable newVar = myDriver.driver.variables.new() # set new variable attributes newVar.name = "var" newVar.type = 'TRANSFORMS' newVar.targets[0].id = bpy.data.objects['Empty'] newVar.targets[0].transform_type = 'LOC_X' newVar.targets[0].transform_space = 'WORLD_SPACE'
A MORE ADVANCE EXAMPLE: Array of Doraemon's Everywhere Doors!
Here we have another example case of "Domino Effect" that is using Linked Grouped Objects which happened to be duplicated along Curve Path. This is trickier than you may think.
When bringing LINKED GROUP object to be duplicated and driven we need plan thing properly...
0. Give proper clear naming system.
1. Linked object actually comes as EMPTY + Dupli "Group"
2. When we do Dupli Frame using Curve Path, it will only duplicate the EMPTY, we need to tell Blender to do Dupli "Group"
3. Do "Make Duplicate Real" to make the actual Dupli "Group" real.. However, the Data is still shared
# this handy ops command will make DUPLI real but have to do it in order! sometimes I stay away from bpy.ops when scripting, but in this case, this is the easiest.
4. Tap L to Make Local - "Object, Data, Material". This to ensure Blender did not crash when we do the next step.
5. Finally do "Make Single User" to all the Dupli "Group".
6. If all good and naming system works for every animated object, we can simply run the Driver script. Careful with naming so that ANIMATION ARRAY DRIVEN IS OFFSET nicely.
WHEN ARRAY SORTING IS AN ISSUE... DYNAMIC PAINT COMES TO THE RESCUE!
Sometimes it can be really difficult to keep all the array objects sorted. In such case, we can setup Drivers that does not rely on the order but still controllable. We need DYNAMIC PAINT Driver Setup. It is quite simple as I have explained it below. We simply just have some kind of trigger mechanism based on Distance.
A more complex setup probably involving a better trigger mechanism and NLA Action Editor. Because we don't always want to map "Animation Sequence" directly to the "normalized Distance". This is still a concept, but really, I think maybe in Blender 3.0, when BGE becoming more like Interactive mode, all this will be easier, I reckoned.
A. PREPARE OUR ARRAY OBJECT
1. Pre-created Objects, each with variation + similar attribute to drive
2. Create or duplicate object on EVERY POINT OF ARRAY as needed
B. SET EMPTY STATE A AND B - Parent to Cloud
Run the automatic "Parent to Vertex" by Liero to create State A and State B of array.
It will be nice to convert each as Empty, instead of duplication of object.
The Canvas will be one of the Empty that is parented to Point Cloud, it will be driven by Displace Modifier, which is affected by Texture and finally Dynamic Paint.
OTHER SCRIPTS SNIPPET THAT MIGHT BE USEFUL FOR YOU
SCRIPT: Create Empty On Every Vertex of Mesh
import bpy # for every point, create Empty and do vertex parent # FIRST ATTEMPT #ob = bpy.context.object #verts = ob.data.vertices #for num, vert in enumerate(verts): # print(vert.co) # Set active scene and object activeScene = bpy.context.scene currentObjs = bpy.context.selected_objects for item in currentObjs: print(item.name) if item.type == 'MESH': # Make meshdata # this is important! # we create a fake object for Blender (Apply Mesh Location) meshdata = item.to_mesh( scene=activeScene, apply_modifiers=True, settings='PREVIEW' ) vert_list = [vertex.co for vertex in meshdata.vertices] for vert in vert_list: vert = item.matrix_world * vert # this is important! # Create Empty At Vertex Location bpy.ops.object.empty_add(type='PLAIN_AXES', location=vert) # Rename every Empty right after being created selectedObject = bpy.context.selected_objects selectedObject[0].name = "emptyB.000" # Remove meshdata data bpy.data.meshes.remove(meshdata) # there will be some array of EmptyOrig (PARENTED TO VERTEX) and EmptyDisplaced # do vertex parenting
# each will have attribute driver that measure the Distance between # let the value drive other attribute as needed
SCRIPT: Create Cube On Every Vertex of Selected Meshes
import bpy # Set active scene and object activeScene = bpy.context.scene currentObjs = bpy.context.selected_objects for item in currentObjs: print(item.name) if item.type == 'MESH': # Make meshdata # this is important! # we create a fake object for Blender (Apply Mesh Location) meshdata = item.to_mesh( scene=activeScene, apply_modifiers=True, settings='PREVIEW' ) vert_list = [vertex.co for vertex in meshdata.vertices] for vert in vert_list: vert = item.matrix_world * vert # this is important! print(vert) # Create Boxes At Vertex Location bpy.ops.mesh.primitive_cube_add(location=vert) selectedObject = bpy.context.selected_objects selectedObject[0].name = 'jimmy.000' selectedObject[0].scale = 0.1,0.1,0.1 # Remove meshdata data bpy.data.meshes.remove(meshdata)
SCRIPT: Set Drivers for Material
# http://www.blenderartist.org/forum/showthread.php?287330-Adding-driver-to-pose-bone-constraint-through-Python import bpy # select bunch of objects to drive # each object has naming convention with number # need to be sorted # DRIVER and connection will be added based on number # get the number string # blah.split('.')[-1] # we do not care the name # (assume the name of object is the same): cube.001, cube.002 def driveManyToMany(num='000'): # DRIVING THE SCALE XYZ OF ONE OBJECT USING OTHER # ADDING DRIVER VIA SCRIPTING # add driver for location X of currently active selected object # locXDriver = bpy.context.object.driver_add('location', 0) myDriver = bpy.context.object.active_material.driver_add('diffuse_intensity') # by default should be 'SCRIPTED', but in case you want to change # the driver type # ('AVERAGE', 'SUM', 'SCRIPTED', 'MIN', 'MAX') myDriver.driver.type = 'AVERAGE' ####myDriver.driver.type = 'SCRIPTED' # enable Debug Info myDriver.driver.show_debug_info = True # scripted expression ####myDriver.driver.expression = 'var' #bpy.context.object.animation_data.drivers[0].driver.expression = '#jimmy' # DRIVER VARIABLE # create new variable NUMBER 1 newVar = myDriver.driver.variables.new() # variable name newVar.name = "varA" # variable type # PLEASE PICK ONE #newVar.type = 'SINGLE_PROP' #newVar.type = 'TRANSFORMS' #newVar.type = 'ROTATION_DIFF' #newVar.type = 'LOC_DIFF' newVar.type = 'LOC_DIFF' newVar.targets[0].id = bpy.data.objects['emptyA.{num}'.format(num=num)] newVar.targets[0].data_path = 'location.z' newVar.targets[0].transform_type = 'LOC_Z' newVar.targets[0].transform_space = 'WORLD_SPACE' newVar.targets[1].id = bpy.data.objects['emptyB.{num}'.format(num=num)] newVar.targets[1].data_path = 'location.z' newVar.targets[1].transform_type = 'LOC_Z' newVar.targets[1].transform_space = 'WORLD_SPACE'
objs = bpy.context.selected_objects for obj in objs: bpy.context.scene.objects.active = obj # get that string number thing of currently active object myNum = obj.name.split('.')[-1] driveManyToMany(num=myNum)
CONCLUSION
What started as simple Driver setup now become slightly complex. I have done hundred of trials and errors for every procedural script. With great power really comes great responsibility.
What to do next is probably to create a nice UI or some kind of easy ways to modify the setup.
I found that the most stressful part when coding Blender Python is to convert bpy.ops into proper bpy.data flow. Sometimes documentation is next to nothing, however in recent version if you look through the methods or functions attached to certain functions, it will give you nice description. What would be nice is some examples.
Anyways, after sometimes, digging functions and data becoming a little bit more fun.
SOME MORE INTERESTING DRIVER RELATED PYTHON PROCEDURAL ANIMATION
Dynamic Human Array using Dynamic Paint. Rendered using Blender Freestyle.
VIDEO DEMO
THE PROCESS
0. Prepare 3D Model from Make Human
1. Rig and Control using Mixamo Auto-Rig in Maya
Since I just need a quick dummy rig, I quickly use Mixamo free auto rig (for under 10000 tris model) and download it into Maya. Thanks to Mixamo.
2. Pose and Animation in Maya
I have to rely on Maya with rigging and animation. I have been using Maya for rigging and animation in the past 10 years, so please pardon me.
Eventually I will produce everything using Blender. I can see that Blender has nice auto-rig and plenty of rigging tool, but it takes time.
3. Export animation into Blender using MDD Mesh Cache.
MDD Mesh Cache Modifier is super handy. Animation Cache import from Maya is a breeze.
4. Setup Dynamic Paint Array using Python in Blender
Let Python do the job of connecting Drivers.
5. Animate Human Array in Blender
I realized that with this setup, we are really using a lot of RAM and processing power. Blender handles it quite well and the effect is still interactive.
I need to think of optimization. Obviously few millions of moving vertex with 6 GB will be a bit slower. Need more RAM.
There is this particular "Voronoi" effect I have been wanting to do for years. I have tried to achieve this particular effect using other 3D packages like Maya and Houdini.
Houdini is definitely the perfect contender for this. It is all procedural, so you can pipe in all kind of mesh and it will spit out different result each time. This is kind of effect I want to re-create
Made in Houdini in 2008. You can do this in Blender today, way faster
And surely one can do the same thing using Maya and SOuP plugins, but it is a little bit more tricky.
We can now do it inside Blender with such ease and really fast. For a quick job.
I don't know what to call it, but basically I want to have a "Cage" that is more or less based on Voronoi pattern. It is really simple actually. Just wireframe in 3D and with additional trickery to make it look interesting.
Such as if I we start with a Cube or Box like below:
I want Blender to automatically turns the box into this:
I guess I can call that Voronoi Cage effect.
This is achieved by using Blender Skin Modifier and Cell Fracture, we finally able to do this really fast, stable and with surprising ease!
This is a Box + Monkey Fracture. The inner structure is actually Monkey.
CELL FRACTURE The Cell Fracture in Blender itself is I found to be surprisingly robust. I am both surprised and excited.
I have not got time to explore the art of fracturing in Blender yet. I am sure, in no time, one of the Blender artists out there will be creating a lot of fracture effects.
For now, I just wanted to show you how to create Voronoi Cage effects as previewed above.
VORONOI CAGE The Voronoi pattern is probably one of the most abused in Design and Architecture in recent years. If you Google Search for Voronoi, you will find all kind of works created based on this pattern, just for the sake of this. Well, the pattern is quite beautiful and you find this pattern all over the place in nature: your skin (if you look via Microscope), Leather, Spider Web, Giraffe pattern, even on Bubbles!
Check this video for interesting dynamic voronoi cell dancing on skin of Squid!
Well, we are not attempting to create something that cool like above. Maybe some other time. You can create above effect using Dynamic Paint though.
We just want the Voronoi wireframe pattern and we can achieve that using the Cell Fracture.
Let say we have a 2D flat plane:
I will emit some particles from this mesh, to be used by Cell Fracture to create fracture.
Next thing to do, simply apply Cell Fracture:
The shards make up this neat Voronoi pattern.
Really cool. You can actually paint some weight and locally scatter Particles to get fracturing that is totally in your control. There are a lot of other options inside the Cell Fracture itself.
This effect is a once off business, so it is really simple to do.
For the purpose of creating Voronoi Cage, I actually just need the "wireframe edges", so I join the Shards back into a single mesh (CTRL+J). And apply Skin Modifier, then I get something that is more like below:
Unfortunately the Voronoi pattern may be lost IF we auto-clean up using Remove Doubles. So, it depends on your Remove Doubles setting to merge back the overlapping points. That is more like Delaunay structure.
You wanted something that looks more like this:
Now, this is Voronoi structure! Achieve something like this by manually selecting the Voronoi-edge result or some other clever ways.
Skin Modifier here is actually doing a fantastic job handling such complex edge mesh branching, processed it and giving us back a clean Cage Mesh.
Unfortunately, it is not perfect voronoi Pattern as expected, just because the Cell Fracture actually creates more points than needed and when merged back (using Remove Doubles) it tends to turn into just boring Triangles pattern. I may need to consult Blender Forum gurus to have cleaner Voronoi mesh wireframe pattern.
I want to all keep N-sided Poly which altogether creates an interesting Voronoi Cage. At this moment, I can do this by manually cleaning up the shapes.
VORONOI FRACTURE ON TEXT Anyhow, you still get an interesting result if you apply this to any 3D mesh. For example Text Object:
It is amazingly cool that you can achieve such clean fracture in a very short time and if you playback, you have support fast dynamic like below:
Cell Fracture is really cool.
But, wait, that is not what we are trying to do here...!! (sorry, I just cannot help myself to keep fracturing object because Cell Fracture is just so good!).
We just want the 3D wireframe Voronoi cage. So, just back join all the shards, and apply Skin Modifier to it.
NOTE: This process can be processor intensive, but Blender will do the job, even if it takes a bit of time for a really complex object. The one below takes few minutes to calculate, not too bad for such complex mesh. Over 1000 shards, each with Dynamics, Blender will start to slow down. There must be a way to optimize this, but for now, we just try on something simple.
Here is the result:
Quick Render in Cycles:
Close up:
The interconnected mesh is clean. This is Skin Modifier at best.
At this moment, I think the effect already looks interesting, although not 100% perfect. What is it looking like? Neuro-alien like? Exoskeleton of Alien spaceship or buildings.
Certainly need clean up here and there, but overall result, just by applying Cell Fracture + Skin Modifier is just brilliant, this effect is not what they are meant to do, but it works :)
What do you think?
Here is one more that looks more like Spider web.
VORONOI FRACTURE USING GREASE PENCIL
Grease Pencil for Fracture? The developer behind Cell Fracture is just brilliant. They give more than asked for.
THE STEPS IN SUMMARY Remember the steps:
Cell Fracture (any setting as you please).
Remove Doubles (adjust the merge of vertices, this help to clean things for Skin Modifier)
Skin Modifier
Smooth Modifier
This is really just a 3D meshing of wireframe lines, using Skin Modifier. But there is also a Voronoi pattern procedural works behind it that is interesting and you will get quite clean mesh if you know what you are doing.
So, why not let Cell Fracture and Skin Modifier do the hard work for you!
NOTE: You need to know your Computer RAM limit to prevent crashing. In general it is pretty stable, you need to save a lot when doing something like this.
This is Monkey with the Voronoi Cage procedure applied, but it is not perfect because I probably applied too much of Remove Doubles, hence turning the object into just triangles on the outside.
TIPS: It may be possible to get the clean Voronoi structure just by using Cell Fracture and then Boolean Modifier. May crash often though. So you need to play around with it. Save often, adjust parameter, crash = no problem, adjust the parameter again until it works.
Inside Voronoi and Cycles Glass. Imagine printing out something hollow like this.
This technique can give you quite nice result, especially if just want the Voronoi structure on the surface area, hollow inner.
1. Prepare your original 3D mesh. Maybe you want to use Remesh. 2. Do the Cell Fractured and get the fractured objects, then joined them back into one piece. 3. Do Solidify Modifier on the original 3D mesh, you want some kind of thickness for "surface only" Voronoi structure. 4. Do Boolean "Difference" between 2 and 3.
The resulting mesh should be awesome for 3D printing.
NOTE: To prevent crashing, you need to make sure that the original object is good to fracture (no Double Vertex overlapping, etc)
UPDATE: REVERSE VORONOI The "reverse" of this Voronoi Fractures shapes is also interesting. You can achieve this using the powerful Blender Boolean, just use "difference" mode of original shape and the fractured shapes:
It is certainly more interesting if you manage to get a clean result! Anyhow, since this one is pretty experimental, do it with care.
This is Blender Sushi logo, The Snail ,with Voronoi inside. Mummified Snail.