Sabtu, 08 Februari 2014

Ok, lets get back into this topic of multiple trigger of effects. This is the extension of previous post.

WORKING ON SCRIPTING
I have not yet completed the script that can automate this method I am trying to explain to you, because I am still working on my python knowledge :] But, it is a good idea to learn how to do this manually. Understand the concept very clearly, perhaps you can improve the method yourself.


DYNAMIC PAINT RULES THEM ALL
The key that makes this trigger setup works really cool here is: Dynamic Paint. 

Dynamic Paint Brush by default can pass "VALUE" into Dynamic Paint Canvas Vertex Color, Pixel Color, Displacement, and Vertex Weight, in real time. I like this feature a lot, this is really cool.

I may not understand Dynamic Paint completely, or its full power has yet to be unleashed (because of limitation of current Blender Particle system), but hopefully overtime we can see more application of it especially when Particles in Blender got updated and take VFX to the next level.

MORE TRIGGER HAPPY
If on the last post I show you a setup using Displace Modifier and Transformation Constraint to trigger transform of an object or of multiple objects. Liero helped me to figure this out.

Taking this effect to next level, Drivers will be used instead.

The theory goes like this:
1. Based on either Image Texture data or Dynamic Paint vertex group data, we displace the mesh of object via Displace Modifier.
2. Track and measure the displacement value that is happening on each vertex of the mesh. Pass on this value to drive other value.
3. Using Drivers in Blender, the value can be used to control other value.

Lets try this on just on a single object. It is going to be easy to follow, I promise.

SINGLE OBJECT DYNAMIC PAINT TRIGGER DRIVER
1. Start with any object, I will just use cube. The idea is to create a setup so that Dynamic Paint can effect Material Diffuse Value of this object.

2. Next step, we want a single vertex created in the center of this object. So duplicate the mesh, go to Edit Mode and the Merge (Alt+M) all the vertices into a single vertex.

3. Create an Empty and parent this Empty into that single Vertex (create Vertex Parent). Then Constraint Location that single Vertex into the object (Cube). So we have an Empty parented to single vertex, which then follows the location of original object.

4. Apply Displace Modifier into the single Vertex. Apply texture to the Displace Modifier so that the single Vertex got displaced (moved in world space), I am using Blend texture (ramp) with just white color. We will track this "difference" value created by displacement using Driver "Distance Between".

5. Apply Drivers now, into any value you like to be triggered. You can apply this into any float value in Blender than can be driven, such as: Shape Key, Material Diffuse, Specular, Emit value, etc. For simplicity just set Driver Key into the Material Diffuse. Then track the value of displacement using Distance Between "Empty" and "Cube".


6. So we are basically done. Simply apply Dynamic Paint Vertex Weight into Displace Modifier, turn that single vertex into Dynamic Paint Canvas and create a dummy object as Dynamic Paint Brush. Any movement of Dynamic Paint Brush dummy object will now trigger and control the Material Diffuse value based on the distance.

7. In fact, for step 6, you can simply use texture to control the diffuse value.

WE NEED SCRIPT
Now, we just need to apply the same thing to many objects, taking consideration of what value we like to be triggered/controlled/influenced by the whole setup.

So we need Python script that does this step above.

Hope the step by step above is clear. I will probably make quick video tutorial on this.

UPDATE 20120302:
Interesting enough, my experiment here will create cyclic dependency (like in Maya!), albeit useful and still works. I need to fix the setup so that cyclic dependency error does not happen.

Quick fix: Parent the original mesh that is causing cyclic dependency into another single vertex. This can fix the cyclic dependency error message in the console. Use Lieros parent to vertex.

Related Posts by Categories

0 komentar:

Posting Komentar