Halloween Costume ideas 2015
Articles by "drivers"
@dorothiar #arttips #interview 101 2 Column Template 2012 mentee 2013 2013 mentee 2014 2014 mentee 2014 Portfolio Winner 2014 SCBWI Portfolio Mentorship Winner 2015 mentee 3 Column Template 360 3d 3d print 3d printing 3delight 8bit Abbey McCulloch abstract acryla gouache acrylic action addon adobe Adobe Flash CS3 Adobe Illustrator Advanced Tutorials advection Advertising advice Agata Wierzbicka agents airplane Al Wiseman ALA Alan E. Cober Alan Lee Alex Ross Alexandra Compain-Tissier Alexandra Lekias Alexandra Levasseur Alexandre Korobov Alexis Winter algorithm alien ALT Amelie Hegardt Amit Shimoni amusement an Ana Aranda analog Andrea Hrjnak Andrea Hrnjak andrea offermann andreaoffermann andreazuill Andy Musser Angela DiTerlizzi Angelika Peißker animal logic animals animation animation nodes anime anisculpt Anja Kroencke Anna Higgie Anna Jensen Anna McKay Annabel Briens AnneBerry Anneke Krull Annu Kilpeläinen anstudy anthology António Soares ar arduino area armature arrange array array modifier arrow art art director art directors Art is fun! art reps art tools Artaksiniya arthictecture arthur rackham artists artwork ase Ashlyn Anstee Asian aspiring asset atom attribute attribute transfer audio Audrey Kawasaki augmented reality aurasma Aurelius Battaglia author illustrator automatic automation Autumn Whitehurst avatar Avrom Yanovsky AW14/15 award awards Babeth Lafon Babies baboon Baby Love Background background color bacteria bake baking ball Bamboo banner Banner images banner making Barbara Dziadosz barcode basic bbox beads beats Bec Winnel beginner Bel Johnstone Ben Denison Bernie Fuchs Berto Martinez Beth Krush better photos bge Bijou Karman Bike biscuit bishop black and white black and white art Blair Breitenstein blam blender blender game engine blender3d blending Blinkie Blinky blob blocks Blog Tips blogger Blogging Friends blogs Blonde blur effect in pixlr and photoshop blur images and pictures bmesh bmesh viewer bolognaragazziaward bombing bone bone modeling bones book book launch books boomerang bottle bounding box bowl bpy brian eno brian ormiston Brian Sanders brian won brick bridge Bridget Davies bright Brooke Boynton Hughes build modifier building burns business Buttons bvh cage Caitlin Shearer caldecott calibration camera camera settings camera tips Candle capcom card career Carole Wilmet cartoony Cassandra Rhodin cast Catherine Campbell Cecilia Carlstedt cell center pivot centipede cg cg photography chair challenge Chanel changin color in pixlr changing color chaos character Character Bible character development charcoal charles Charlie Dot Charlie Hebdo Children children's book illustration chocolate Christina Drejenstam christina forshay Christina K christinaforshay Christmas Cindy Derby circle circle dance city cityengine clock clones cloning cloth Cloud based clover CMYK Coco Chanel Cody and the Fountain of Happiness coffee collect collection Collections collision color color balance color cast color correction color mode color study colorful Commercial Use complexity component compositing composition computational thinking computer concept art Condensed Posts conference connect connect the dot connection Connie Lim Conrad Roset constrain constrast contagion content Contest contracts control converter copy copyright Corinna Luyken count Courtney Brims crack Craft craftsmanship Craig & Karl creative creativity creature cricket Cristina Garcia Martin critic criticism critique Crop Crop Tool cross section crowd csv cubism curve curve modifier custom Custom Blog Design Custom Blog Design Tutorial Custom Blog Designers Custom Illustration custom properties Custom Signature custom xml cut cutting plane cycle cycles dae Damien Florébert Cuypers Dan Hillier dance Daniel Egnéus Daniel Segrove Danny Roberts Daren Newman Dasha Tolstikova data data path David Blossom david diaz David Shrigley David Stone Martin Dean Hardscrabble Debbie debbie ohi debbieohi deform deformer degrees deleting background in pixler demo demoscene desaturation of images design design by numbers design process Design Tips dictionaries dictionary Different Text Writing in Pixlr digital digital paint Digital Scrapbook Freebies Digital Scrapbooking disk distance distractions distribute diversion DIY DIY Contest Dolf Veenvliet Doll Doll Bones dolls domino domino effect doodle Doodles door doraemon Doris Jackson Dorothia Rohner dots dpi draw drawing drill driven driver drivers dual versions dummy duplicate duplicates duplication dupliframe dvd dynamic dynamic paint dynamic text E Simms Campbell Easy easy pixlr Easy Tutorials Ed Graham Ed Vebell editing editing photos editors education effect effects ego Eleanor Dalton electric Elia Fernández eliza wheeler Elizabeth Mayville elizawheeler Emily Forgot Emma Zanelli emoticon happy-face Emotional storytelling empathetic characters empty entoforms envy epicycloid EPS Illustration Epson scanner erasers Erin Armstrong Erin Petson erinoshea ernest shepard Esra Roise euler evaluate line Eveline Tarunadjaja evenly spacing vertex event everywhere door exhibition Expandable Posts experiments explode exploded view export expression extrude eye eye color in pixlr eye trick eyeball face rig facial expressions facial setup factory Faiyaz Jafri Families fashion illustration fashion week fcurve feature Featured Fee Harding Feedback fence Fernanda Guedes fibonacci Fifi Lapin file File Types Finalists Finding Nemo fire fix photos Flash Tutorials flicker flip flip flop floor flop flow flower Flowers fnmatch focal point follow up font Fontaine Anderson Fonts food footage For Sale force form formula fractal fracture frame Frames Francois Berthoud Frank Bellamy Frank Furlong Franklin McMahon freckles Fred Steffen FrederiqueBertrand Free for Commercial Use Free for Personal Use Free Stock Photography Free transform tool Freebies Frenchillustration Fritz Siebel frosted mylar fruit ninja Fumi Mini Nakamura Fun function futurism FW2017 fx Gabriel Moreno Gabriella Ibarra game game animation gameart gamma gangnam style Garance Doré Gary Fernandéz gel medium generate generative generator geometric geometry Gerald Lazare Géraldine Georges GIF Gildo Medina Girl Giuseppe Castellano Giveaway glorar goals golden ratio google google docs Google Tools Grant Young graph graphite graphite transfer grease pencil grid group group node growth Gucci Guest Guil Godier gustave dore hair handbook Harper's Bazaar harpercollins Harvey Schmidt Haute Couture head Headers heat map Helena Hauss hexagon hexagonal grid Hiroshi Mizuno Hiroshi Tanabe Holiday Holly Black homology honeycomb hook horror houdini how to how to blur a face or an object in pixlr How to change eye color how to delete an object how to desaturate an image how to edit a image in pixlr how to erase an object how to fix red eye problem how to fix red eyes in pixlt How to fix the parts in pixlr in photoshop How to make a banner in pixlr How to overlap the nevus how to remove a object How to remove an object in pixlr how to remove red eyes How to Remove the Background of an Image in Pixlr How to remove the parts that you don't want in pixlr and photoshop how to replace color How to write a Patterned Text in Pixlr how-to Hsiao-Ron Cheng hsv hue humor Hyshil I love illustration magazine idea ideas Igor+André illusion illustrating illustration illustration board Illustration Books Illustration Intensive Illustration Now! Fashion illustration process Illustrations Illustrative Berlin illustrator Illustrator Intensive Illustrator Tutorials iloveillustration magazine image ediditing lessons Image Ready image sequences image theft imaginative import import text import vertex color improving photos inbetween index visualizer Info Ingrid Bockting ink inktober input Inspiration inspirational quotes install instance instance switching intensive interaction Intermediate Tutorials internet interoperability interpolation intersect intersect edges intersecting intersection interview introduction invoke subprogram io ipad Irana Doucer Isabella Hemmersbach islam islamic iteration Izzie Klingels Jack Hearne Jack Tremblay James Dignan James Gurney japanese Jason Brooks Jean Kim Jeanne Detallante Jen and Chris Creed Photography jen betton Jen Rofé Jenny Mörtsell Jeremy Combot Jeslyn Kate Jesse Auersalo Jessica Jessica Lanan jessicalanan jewellery jewelry jiggle Jim Schaeffing Joe Bowler Joe Cleary Joe Isom Joe Krush Johanna Goodman john maeda John Vernon Lord joint Jordan Sondler JPEG JPG jpop juana martinez-neal juanamartinezneal Judge Judit Garcia Talavera Judith van den Hoek Judy Byron Schachner Jules Julien Julian Beever Julie Verhoeven Jump Break Tool JW Anderson K-Fai Steele Kaethe Butcher Kareem Iliya karel zeman Kate van Harreveld Kathrin Kuhn Kathryn Ault Noble Kathryn Noble Katie Kath kdtree Kei Meguro Kelly Beeman Kelly Light Kelly Smith kelly sonnack Kelly Thompson keyframe keyframing kidlit kidlitartists kimberlygee Kirkus Review Kisoo Chai Kodak Konstantin Kakanias Korean illustration Kotaro Chiba Kozue Himi Kremos Ksenia Finogeeva KT Smail kuler Kustaa Saksi Lanan Laptop larry gritz lasso tool latte lattice Laura Callaghan Laura Laine Lauren Rille layer layering Layla Holzer layout leaf learning learning blender LED Leendert meets Ingrid lego length Leonard Starr lessons levels LFW A/W 14 liangzhu liero lightbox lighting lightning Lina Bodén Lina Ekstrand Linda Dorn line line connect line drawing lines Links Linky Love Linn Olofsdotter Lionel Gilbert Lisa Anchin Lisa Billvik Lisa Krannichfeld lisaanchin lisbeth zwerger Liselotte Watkins list list comprehension List First Last listing locator lofting logo Logo Design Lola Dupré London Fashion Week loop looping loops looptools Lorraine Fox lossless lossy lost weekend lostweekend lotte reininger Louis Glanzman louis vuitton Luciana Rondolini luciograph LULU* lv Lynnie Zulu Mac macgyver macouno maeda Magda Antoniuk magic Magnus Voll Mathiassen mailing mailings maker Makiko Sugawa making banners Malika Favre MAMP mandala manga map map range maplelam mapping Marcel George Maren Esdar Margot Macé Margot van Huijkelom Maribeth Olson Marie El-Ahmar Marilyn Conover Marina Esmeraldo Marine Marbleindex mario Marlies Niemeijer Marsha Riti Martha Rago Martin Krusche Martine Johanna mask masking material materials math matrix matrix apply matryoshka Matt Baker matte medium Matthew Woodson maya maze mdd Meagan Morrison measure megaman Megan Hess Meizhen Xu Mel Crawford memory mentee mentees mentors mentorship program Mercer Mayer Meridth McKean Gimbel mesh mesh cutter meshlab Meta Tags metal gear rising Meyoko Mia Overgaard Micca mice Michael Sanderson Michela Picchi middle grade midi miku Milan milipede minidom Minima Mio Matsumoto mirror cut Misc Miss Blackbirdy miss maple's seeds Miss Take Mitchell Hooks mixamo mixing Mobile Apps mocap mod model modeling modifier modular modulation modulus mold molecule molly idle Molly Ruttan Molly Ruttan Illustration money monitors monkey mono-zero monster monster university morph morpher mosaic mosquito motion motion capture motion capture mouse motion trail moto360 mountain muji Muriel Wood Murray Tinkelman mushroom Music and Podcasts My dead pony Nadia Flower Naiad Einsel Naja Conrad-Hansen Natalie Brockett Natalie Foss nathan vegdahl nautilus Nav Bar navigation needle-felting negotiating Neil Boyle neon nescbwi14 nested New Blogger Questions New Blogger Template Tutorials new user pixlr new year new york New York Fashion week Newbery nicholas nicholas bishop Nicholas Hong Niki Pilkington Niso Ramponi nla No Software node node-based nodebox noise non linear animation Non-Web Font normal Noumeda Carbone npr number NURBS NYFW object object color change object info octopus offset Ola Volo Olaf Hayek old formats opaque projector open movie open shading language open source openshadinglanguage opensoundcontrol optical organization origami original art show Ornaments osc Oscar Schlienger osipa osl outline outliner output Pages paint paint weight painting painting on illustration board painting on wood painting with movie painting with numbers Pair pandas panorama Paper paper lantern parabola parametric parent parenting particle particle info node particles pat david Pat Zietlow Miller pattern Patterned Text Paul Faassen Paul X. Johnson Paula Sanz Caballero PC pdb pebbles pencil Pencil Sketch pencils Penguin perfume perlin Peter Helck Photo CD.8B photo editing software Photo Reference Photobucket photographing art Photographs photography photomerge photoshop Photoshop Brushes Photoshop CS3 Photoshop elements photoshop pixlr desaturaion Photoshop tips Photoshop Tutorials Picture Book Builders picture books Pierre Louis Mascia Piet Paris Pietari Posti pingpong pinnochio pipes pixar pixel pixel art pixel generator pixlr Pixlr advanced Pixlr blog pixlr desaturate keep a colorful part pixlr editting pixlr express Pixlr forum Pixlr free transform Pixlr Lesson Pixlr lessons Pixlr mobile Pixlr resizing images pixlr shortcuts Pixlr tools pixlr tutorial pixlr tutorial with pictures Pixlr Tutorials pixlr white black pixlr.com plant plot plotting ply PNG PNG Illustration podcast point point color pointilism polka dots polyCut polygon Pomme Chan pop-overs portfolio Portfolio award portfolio showcase portfolio-advice portrait position Post Dividers postcard poster Posting pot powdered graphite powerhousemuseum Prada presentation print printmaking Prize procedular procedural process processing programming projection Promotion property prototype PSD psy publishing pulse puppet puppetry pydriver pydrivers pyhandler pyhandlers pyramide python quad quick select set quick tips qumarion Rabbit Moon Rachel Ryle radians radius ramp random random motion randomization randomize range float raspi Ray Houlihan reading reading XML READY-TO-WEAR realflow Rebecca Clarke rebecca dautremer Rebecka Skog rebuild recursive recursivedrawing red eye remove reducing glare reference referencing release remesh modifier remix removal remove remove red eyes remove unwanted objects Removing backgroung render rendering renderman repeat repeater repeating replace replacement replacing color representation rerouter resample resampling research Resizing image resolutions retopology retro review revolve rgb rib Ricardo Fumanal Richard Scarry rig rigging rigify Rikke Jorgensen ring ripple roadkill Robert Heindel Robert J. Lee Robert McCloskey Robert Shore Roberta Zeta Robin Rosenthal robot robotic rocks Rodolfo Montalvo Roller Coaster rotation Rousseau rsl Rubin Pfeffer ruler tool Russ Mills russian rut S/S14 S/S15 S/S16 Sabine Pieper sadako Saftey Pins Sainte Maria Sale Sam Weber Sanda Suy Sandy Kossin santoso Sara Andreasson Sara Singh Sarah Jacoby saturation artist tools scan scanners scanning scatter scbwi SCBWI 2015 mentee SCBWI conference scbwi germany SCBWI mentorship scbwi-la scratch scratchboards screensaver screw screw modifier script scrub sculpting seamless Seamless Patterns Search Engines select by material select by name select by type SEO sequence series set keyframe set keyframes shader shading shadow Shannon Stirnweis shape grammars shape key shapekeys shapes shards shatter Sheilah Beckett shell ship shipping shipwright Shoes SHOWstudio shuffle Sid Barron Sidebar Titles Signature Silja Goetz silkworm Simon and Schuster Simon Varela simple simplicity simulation sine Site Engine Optimization Sjoukje Bierma sketch Sketches sketching skin skin modifier skinning slice slicing slides sloth slow parent smoke smoothstep SN snake Sneek Peek snippet Snow Snow White Snowflakes soccerball social media Social Media Buttons Social Networking society of illustrators Society6 soft body softbody Sonia Menti sound sound wave space spaceship sparta special spider spiderman spiderweb spin spiral Spiros Halaris Spiros Halaris x Urban Decay spline Spot Healing Tool spreadsheet SS16 stack stacking stair stamp Stan Galli star starfish stencyl step Steven G. Dobson still Stina Persson stone stones storytelling strand strand info strands street art string stripes structure studies studio style stylistic summary Summary Posts Summer sun supplies surface Susan Farrington suzanne Suzanne Kaufman sverchok swatch switch sydney system table table of contents take out background Tal Drori tangent tangled Taschen teaching teapot Template Templates tentacle Tess Jacobson Tex Avery text text editor Text Formats Text Styles in Pixlr texture texturing The Cartorialist The Grudge Keeper The Purple Book thinker1 Thomas B. Sawyer thread TIFF tile tilecam tiling time time code Tina Berning Tina Kugler tips tips for artists Toby Neilan Tom Baxter Tom Bjarnason tombow tomie depaola tool tools topology tower Tracy Turnbull Train transfer drawing transferring sketch transform transformation transit travel triangle wave Tricia Springstubb trigger tris tristan lock tube tubes Tutorials twitter type tool typeface typography unbake unity3d universal unquad utah uv valentine Valentino Valerie Servais vanilla variable variation variety vase vector vectorized Velwyn Yossy venus Veronica Ballart Lilja vertex vertex color vertex group vertex paint vertex weight VFX Victoria Boysen video Videos viewer Vintage virtual virtual studio visualization vivid vividfestival VOGUE volumetric voronoi Vote voxel voxelated voxelation walking teapot Walter Einsel wand tool water soluble graphite watercolor wav wave we need diverse books web webbing Week Themes weight welcome Wendy magazine Wendy Plovmand what casues red eyes What is Pixlr Wherever You Go Wide Awake Bear wiggle Will Davies Winner Winnie Fitch Winnie Truong Winter wire wired wireframe wolfram Woman wood woodwork wool wooly wordpress work workflow World writing writing XML www.pixlr.com XML YA yayoi kusama Yelena Bryksenkova yoda Yoko Furusho Yuliya zaha hadid zen zsphere

In Computer Graphics, having the ability to control, trigger, and drive VALUE over another VALUE is something that is always intriguing for me. This is all related to something named DRIVERS in Blender.

DRIVERS should really attract your curiosity. In this post, I will explain in details on why DRIVERS is cool, and hopefully after you read this you gain some useful knowledge.

DRIVERS: CAUSE AND EFFECT

Previously, I have mentioned about this quite often and also written quite a few blog posts that talked about Drivers and how Blender Dynamic Paint in relation to Drivers can be really powerful.
http://blendersushi.blogspot.com.au/2012/02/animation-driven-by-x.html

I will write about DRIVERS again, but this time will be a little bit more detailed and advanced because we will utilize a bit of Python. Even if you are a beginner and never write a code, read along and try the exercise, you will learn something. Before knowing it, you can start connecting, referencing, and using expressions to drive objects.

It was only recently that I started to dig Python, PyDriver, and PyHandler in Blender. Everything started to make more sense once a bit of programming understood.

I feel that we can now starting to get deeper into complexity, while keeping it under control. A complex setup still needs to be simple on the surface, otherwise there is no point.

ANIMATION: VALUE DRIVEN BY TIME/FRAME
Like many of you, my first introduction to Computer Graphics (CG) was as a computer animator. I got driven to learn more about CG animation because it does both thing that I really passionate about: ANIMATION and COMPUTER.

I still remember when I first set a keyframe on an object at a frame and then set another keyframe at different frame, and then when I scrub the timeline, the computer does the in between.

That was amazing, right? We and many computer animators often took that for granted.

Not after few years later in my computer graphic journey that I started to get curious about "How does it really work?", I wanted to understand the technicality of things.

So, what is keyframing in CG?
  • In Maya: Driving Channel/Attribute and Value using Time.
  • In Houdini: Driving Parameter and Value using Time.
  • In Blender: Driving Property and Value using Time.
<<Luckily, those three 3D packages (that I just happened to be familiar with) has similar concepts and it helps me to understand "Animation in CG" a little better!>>

Keyframing is simply setting up (or a mapping) VALUE to be driven by another VALUE (in this case the other value is TIME).

We can think of TIME as the BEAT/PULSE/TICKER for our VALUE.

VALUE DRIVEN BY X
Sometimes though, we do not want to rely on TIME. We like one VALUE to be driven by something else. By arbitrary value, custom property, by another value that is a return value of a function, or any value that is a result of complex calculation.

Read about Custom Property here:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Extensions/Python/Properties#Dynamic_custom_properties

Anyways, in the end the value will be just INPUT and OUTPUT. It is still VALUE driven by another VALUE. This kind of concept is used by many 3D packages:
  • In Maya: Expression, Set Driven Key, Constraint, Node Network
  • In Houdini: using CHOP (curve, channel), Houdini Expression (fit(), etc), but in Houdini everything is quite a complex Node Network.
  • In Blender: Drivers, Constraints, PyDriver, PyHandler
Back to Blender context, let's really focus on DRIVERS because this is the most interesting feature for driving values and when we combine a bit of Python knowledge, Drivers becoming even more powerful, because we can apply Drivers to many objects at once without having to repeat the process. And there is also something called PyDriver and PyHandler which is interesting in itself.

ONE TO ONE RELATIONSHIP: MANUAL WAY



Let's start by doing an exercise on one to one relationship.

We can just drive TRANSFORMATION VALUES (either location/translate, rotation, or scale) for simplicity.

Firstly, add a single driver to any of this value of an object. RMB+Click on property, choose Create Single Driver. When we create a SINGLE DRIVER, Blender automatically assign a Generator Modifier Polynomial f-curve. This line looks like 45 degree angle steep line.

That Expanded Polynomial Generator Modifier just means we have a linear relationship 1:1 between DRIVER and DRIVEN value. Making the line goes the opposite way will give 1:-1 the inverse value. You can read about this later.

However, this Drivers relationship will do nothing at the moment, NOT UNTIL we specifically tell Blender what INPUT to evaluate.

NOTE: Drivers setup is located inside "Graph Editor" Panel. It is almost hidden.



The DRIVER INPUT is dependent on:
1. Driver Type
2. Driver Variable Type

First we must set Driver Type, you have 5 options:
  • Scripted Expression (default)
  • Maximum Value
  • Minimum Value
  • Sum Values
  • Average Value
Then we set Driver Variable Type, for each VARIABLE you create, you have 4 type to choose for:
  • Distance = measure distance between two object.
  • Rotational Difference = measure rotational difference, usually great for Bones
  • Transform Channel (default) = all kind of Transform you like to be INPUT
  • Single Property = usually for custom property.
For ONE TO ONE relationship, we can usually use Average Value and a single Variable with its type set to Transform Channel or other variable type. 

Another way is to use Scripted Expression set to "var" (default variable name) and then set the INPUT value via Variable Type, you can choose any of Variable Type.

TIPS: Do self-exploration Variable Type, they are quite intuitive and powerful.

The advantage of using the built-int Variable Type is faster calculation and real time update guaranteed.

ANOTHER WAY OF CREATING DRIVER
A faster way to add driver to an object is to write EXPRESSION directly via Property by using HASH + SINGLE LINE EXPRESSION.

Exactly how it is explained in here:


Doing above HASH+EXPRESSION inside a Property will pass that EXPRESSION and put it into the Scripted Expression field box.

If you type Scripted Expression directly in the field box, do not use Hash though.

NOTE: Expression function such as "frame", it will nicely updated in realtime, but some other expressions do not always get updated in real time, especially those values that are accessed via the bpy.data. You need to force Blender to update it. Same case if you happen to write your own PyDriver function, you need to hack it so that Blender will auto update the dependency. Read below.

You can use the hash + expression to directly pointing to ANY values via the Blender Python, or the bpy.data.[...]

Simple expression that can drive value is usually just a matter of finding the correct DATA PATH of a particular object in the scene. You need to know a little bit of Blender Python OOP, but not that hard.


I usually try to dig the data directly from Python Console.


Sometimes when I am not completely unsure about the Data Type, I hover on a Property, RMB click and then select Copy Data Path. That is a good hint.

For example, if I have Monkey and default Cube in 3D scene, we can create a quick setup there Monkey's Scale is driven by default Cube's Location. One of such expression is like below:


The expression I use as INPUT for Driver is as below:
bpy.data.objects['Cube'].location.x

Yes, it is a bit long, but we should already know that this is how Blender can directly access the value of any data of particular object because of its library structure.

Remember, almost any value type of data can be passed into another value.

ONE ISSUE: Using Scripted Expression, it does not update automatically in real time!
You may notice that the connection is made but when you move the Cube in Translate X, the Monkey Scale does not update automatically. You need to either: click on Update Dependencies button OR you set keyframe animation on the Cube and scrub the timeline.

There is actually QUICK HACK so that Blender will evaluate the changes: Simply by creating a VARIABLE that monitors and pointing to the object giving the INPUT value.

Even if you did not specify any property, as long the "var" is pointing into the correct DRIVER object, Blender will then forced to update the changes in real time.

Keep this in mind next time you create ONE TO ONE relationship that uses Scripted Expression.



VARIATIONS OF DRIVERS

Apart from assigning and connecting drivers, we can further Modify and Process the Value, before it is being passed on as input to the Driven Object.

VARIATION: Negative Relationship
You could INVERSE the relationship 1:-1 (negative relationship) by flipping the f-curve Generator.



VARIATION: Min and Max Relationship with Custom Curve
Now, in case we want ONE TO ONE, but with FLEXIBLE CONTROL over the F-Curve we can create our own animation Curve, instead of relying on the Generator Modifier F-Curve.


ACCESSING DRIVER F-CURVE MODIFIER VIA PYTHON
# To Create New F-Curve Modifier 
# ('NULL', 'GENERATOR', 'FNGENERATOR', 'ENVELOPE', 'CYCLES',
# 'NOISE', 'LIMITS', 'STEPPED')
bpy.context.object.animation_data.drivers[0].modifiers.new('GENERATOR')



To Delete Existing  F-Curve Modifier
# ('NULL', 'GENERATOR', 'FNGENERATOR', 'ENVELOPE', 'CYCLES',
# 'NOISE', 'LIMITS', 'STEPPED')
bpy.context.object.animation_data.drivers[0].modifiers.remove(modifier)

# INCOMPLETE --- still figuring out how this remove works...
# This took me hours of searching around and almost no documentation....

import bpy

fcurvetype = bpy.context.object.animation_data.drivers[0].modifiers[0]

bpy.context.object.animation_data.drivers[0].modifiers.remove(fcurvetype)


To do this, we first delete the default Generator Modifier F-curve and replace it by drawing our own animation curve, simply by CTRL+LMB click on the graph.

For example:
Monkey Scale X to be driven by Cube Location Z.
- First, delete the default f-curve modifier.
- Then for example, set our own curve 2 states:
  • Point 1 Frame: 0, Value: 0.1
  • Point 2 Frame: 10, Value: 2
This means:
When Cube Location Z goes from range 0 to 10, the driven Scale X of Monkey will go from 0.1 to 2. No matter if the Cube Location goes beyond or under 0-10 range, the Scale X of the Monkey will always be within the limit that we set.

NOTE: This is similar to fit() and fit01() function in Houdini.

Mapping range of values over range of values using Curve basically this one is. I do not know if Python or Blender has its own expression that does the same thing, if not, you can probably set it up using PyDrivers.

PS: This drawing of Curve can be Python scripted as well, I think... still researching how to do this without having to use the bpy.ops.*



VARIATION: Ups and Downs Relationship 
Use sin() or SINE Modifier.

TIPS ON XYZ:
Usually, for things like Scale that often has 3 value pair: ScaleX, ScaleY, and ScaleZ, we can either Copy and Paste the same Drivers from one to the other, which means it will be creating duplicates of Drivers.

Or we can tell Blender so that ScaleY and ScaleZ are always follow ScaleX value using "referencing". If we assign:
bpy.context.object.scale.x

bpy.context.object == is like "self", not 100% exactly "self", but so far I found that is the quickest way to think of this bpy.

However, I think the most correct is to use the Driver Variable Type, instead of Expression. Just because with Expresion, sometimes we need to hack the "Dependency Updates", etc, etc.

IS DRIVER REALLY THIS COMPLEX?

Blender Drivers is just slightly feels complex because it has a lot of function in it. Expression function, Modifier (function generator), Limit, Value Averaging, and many many things packed into one feature: DRIVERS. Surely, it may be slightly intimidating for first timer, but don't be.

Also, the way Blender displays and accessing DATA PATH is also a little bit complicated if you are not used to Object Oriented Programming.

In Maya and Houdini, we can get, set, connect, disconnect, values from data path, by just specifying the Nodes Name and Attribute/Parameter Name. The advantage of node-based architecture and hundreds of simple commands to modify them. Writing expression in Maya and Houdini is indeed easier for general users.

MAYA EXAMPLE OF EXPRESSION
Example expression in Maya to connect Transform node named Suzanne with Cube:
Suzanne.scaleX = Cube.translateY;

In Blender, we need to dig a bit and the path name is long. Pointing to an object named 'Cube', for example, the data path looks like this:
bpy.data.objects['Cube']

# Data Path to Translate
>>> bpy.data.objects['Cube'].location.x
0.0
>>> bpy.data.objects['Cube'].location
Vector((0.0, 0.0, 0.0))

Data Path to Rotate 
>>> bpy.data.objects['Cube'].rotation_euler
Euler((0.0, 0.0, 0.0), 'XYZ')

>>> bpy.data.objects['Cube'].rotation_euler.x
0.0

Data Path to Scale
>>> bpy.data.objects['Cube'].scale
Vector((1.0, 1.0, 1.0))

>>> bpy.data.objects['Cube'].scale.x
1.0

ADVANTAGE OF BLENDER
Blender processing of expressions is A LOT faster than Maya's Expression. In term of speed, Blender expression calculation is about as speedy as Houdini. While Maya's expression is slowest. Blender also always cache the calculation automatically like Houdini, which is nice.

Blender Python uses Object Oriented Programming (OOP) paradigm to access data, apart from being A LOT FASTER TO PROCESS, is also more flexible, allowing users to quickly customize and make custom functions.

In fact, in Maya, in order to get the Object Oriented Paradigm for scripting, they actually need PyMEL. PyMEL is a more Pythonic wrapper of Maya programming. And PyMEL is slower. Using MEL script in expression is also slow. So that is Maya. With Maya, Autodesk is your boss.
https://code.google.com/p/pymel/

While with Blender, you are the boss, Blender Python is already Pythonic. Everything is Python. Wait till Blender has PyNode and we can continue this kind of topic.

So, anyway the concept of DRIVER, EXPRESSION, is really similar across Blender, Maya, Houdini. Very similar. In fact, you can easily write Python code that will contain the Data Path into simpler variable name.

Once you understand the key concept of Blender DRIVERS, this one feature is really useful for animation, rigging, and lots of complex and exciting effects. This is another reason I write this long detailed post on Drivers to share with you.

One thing I have to mention though, unlike Maya, Blender Drivers does NOT provide:
- Set Driven Key window
- Attribute Connection window
- Create Expression window
- Simple Python script to get, set, connect, disconnect property.

Those "easy to use functions GUI" above in Maya are allowing users to easily create connections. Especially "Set Driven Key" window, which is very similar to Blender Drivers to create custom Curve creation for Drivers relationship.

It would be nice if Blender have those kind of features. However, everything is actually there in Blender. I mean, possible to do your own customization of connection using Python scripting.

I think SOMEONE can certainly make "interface" like above in Maya, inside Blender, to connect things faster and easier, OR make a simple Python script that actually does the job.

I will attempt to show you a little bit of this "automation", although not yet with GUI style.

ONE TO ONE RELATIONSHIP: PYTHON WAY

Ok, now let's take a look on how we could Python script one to one connection. Why do we need to do this? Because eventually setting up DRIVERS gets tedious, especially when we need to drive an array of objects.

Let's learn the basic first.

1. Tell Blender what value we like to create a Single Driver.

# drivers for all three location XYZ
myDriver = bpy.context.object.driver_add('location') 

# single driver for location X
myDriver = bpy.context.object.driver_add('location',0)

# single driver for scale Z
myDriver = bpy.context.object.driver_add('scale', 2)

# single driver for rotation X
myDriver = bpy.context.object.driver_add('rotation_euler',0)

# add driver to custom property named "myProp"
myDriver = bpy.context.object.driver_add('["myProp"]')

# add driver to shapekeys 'Key 1' 
ob = bpy.context.object #currently active selected object
myDriver = ob.data.shape_keys.key_blocks['Key 1'].driver_add('value')

# add driver to modifier 'Mesh Cache'
ob = bpy.context.object
myModifier = ob.modifiers['Mesh Cache']

myDriver = myModifier.driver_add('eval_frame')



You got the idea. You simply need to specify the PROPERTY that you like to be driven.

Above, I am using variable "myDriver" as container of this Driver, we just created. This will be useful as we go along and modify the Driver. You can use any valid variable name.

How do I know the name of PROPERTY? Simply by hovering on any PROPERTY in Blender, RMB click and select Copy Data Path.

Sometimes you need to be more specific, for example to create driver for specific Material "Diffuse Intensity" property, you use code like below. You need to dig the bpy via bpy.context or using bpy.data until you found that data you need to add DRIVER into.

myDriver = bpy.context.object.data.materials['Material'].driver_add('diffuse_intensity')

2. Specify Driver Type

# by default should be 'SCRIPTED', but in case you want to change 
# the driver type, you have other option

# ('AVERAGE', 'SUM', 'SCRIPTED', 'MIN', 'MAX')

myDriver.driver.type = 'AVERAGE'


3. Enable DEBUG mode.
Enabling the feature below will display the actual Value being returned and used by DRIVEN object.

# enable Debug Info
myDriver.driver.show_debug_info = True


4. Specify VARIABLE and VARIABLE TYPE
Here is the fun part. Following the above variable convention, we can add LOCAL VARIABLE to our Drivers setup.

# DRIVER VARIABLE

# create new variable
newVar = myDriver.driver.variables.new()

# variable name
newVar.name = "varA"

# variable type

# PLEASE PICK ONE
#newVar.type = 'TRANSFORMS'
#newVar.type = 'ROTATION_DIFF'
#newVar.type = 'LOC_DIFF'
#newVar.type = 'SINGLE_PROP'

newVar.type = 'TRANSFORMS'
newVar.targets[0].id = bpy.data.objects['myTargetObject']
newVar.targets[0].data_path = 'location.z'
newVar.targets[0].transform_type = 'LOC_Z'
newVar.targets[0].transform_space = 'WORLD_SPACE'


NOTE:
At some point in time, you might want to check the actual Drivers data via bpy.context, below is how you may check it:

list(bpy.context.object.animation_data.drivers)

bpy.context.object.animation_data.drivers[0].driver.expression = 'frame'

Driver is kind of data that is almost hidden and hard to dig, unless shown.

REFERENCE:
http://www.blenderartist.org/forum/showthread.php?287330-Adding-driver-to-pose-bone-constraint-through-Python


Alrightly, now you should know how to quickly create Drivers for an object. You simply need to put all the above script into one nice re-usable code.

I will give some script examples:

EXAMPLE
Connect Monkey Scale X to Cube Location Y.

Make sure you have Cube and Monkey in the scene. Select Monkey and run the script below.

import bpy

# single driver for scale X
myDriver = bpy.context.object.driver_add('scale',0)

# driver type
myDriver.driver.type = 'SCRIPTED'

# enable Debug Info
myDriver.driver.show_debug_info = True

# specify the script
myDriver.driver.expression = "bpy.data.objects['Cube'].location.y"

# add DRIVER VARIABLE to FORCE UPDATE

# create new variable
newVar = myDriver.driver.variables.new()

# variable name
newVar.name = "var"

# variable type
newVar.type = 'SINGLE_PROP'
newVar.targets[0].id = bpy.data.objects['Cube']


ALTERNATIVE (although limited, probably this is a better way, since we are using the built-in method to track thing)

Make sure you have Cube and Monkey in the scene. Select Monkey and run the script below.

import bpy

# single driver for scale X
myDriver = bpy.context.object.driver_add('scale',0)

# driver type
myDriver.driver.type = 'AVERAGE'

# enable Debug Info
myDriver.driver.show_debug_info = True

# specify the script
myDriver.driver.expression = "var"

# add DRIVER VARIABLE to FORCE UPDATE

# create new variable
newVar = myDriver.driver.variables.new()

# variable name
newVar.name = "var"

# variable type
newVar.type = 'TRANSFORMS'
newVar.targets[0].id = bpy.data.objects['Cube']
newVar.targets[0].transform_type = 'LOC_Y'
newVar.targets[0].transform_space = 'WORLD_SPACE'

ONE TO MANY RELATIONSHIP:
MANUAL VS PYTHON WAY




We already knew how to setup ONE TO ONE relationship manually.

If we want to do ONE TO MANY, we can simply copy and paste the driver into other Property values. Let say, we already create Driver for Scale X, and we want to copy to Scale Y and Z, we simply Copy and Paste Driver. However, this could be tedious.

This is when you want to use Python to script things, in case if you want to connect 1 object to drive 100 objects.

EXAMPLE SCRIPT:
Make sure you have a Cube and many monkeys. Select the monkeys and run the script below:

import bpy

selected_objects = bpy.context.selected_objects

for object in selected_objects:
    
    # make each object active one by one and do everything below
    bpy.context.scene.objects.active = object

    # single driver for scale X
    myDriver = bpy.context.object.driver_add('scale',0)
    
    # driver type
    myDriver.driver.type = 'AVERAGE'
    
    # enable Debug Info
    myDriver.driver.show_debug_info = True
    
    # specify the script
    myDriver.driver.expression = "var"
    
    # add DRIVER VARIABLE to FORCE UPDATE
    
    # create new variable
    newVar = myDriver.driver.variables.new()
    
    # variable name
    newVar.name = "var"
    
    # variable type
    newVar.type = 'TRANSFORMS'
    newVar.targets[0].id = bpy.data.objects['Cube']
    newVar.targets[0].transform_type = 'LOC_Y'
    newVar.targets[0].transform_space = 'WORLD_SPACE'

I hard coded the 'Cube' above for simplicity.

You can of course modify the script below and then create a nice beautiful Python function with kwargs* stuff so that user can:
1. Select a bunch of Driven objects.
2. Select lastly (active) the single Driver control.
3. Run script.

I might as well provide such function here:

### Reminder for myself: Write beautiful ONE TO MANY function here ###

REAL APPLICATIONS OF DRIVERS

One-to-One and One-To-Many relationship can be used to:
1. Create directional Eye Rig (translation to control rotation of eyes)
2. Create Advance Facial Rig to drive Shapekeys using "joystick" style.
3. Many other things you can think of, for example:
- If you have 100 doors and you want to create a setup where the door should open one after another... that is possible with drivers. Automated or semi-automated Domino kind of effects can be setup using Drivers.
- If you have a lot of Tentacles kind of joints, you probably want to use Drivers too.

Do a bit of reading of book by Jason Osipa "Stop Staring" for Maya if you are keen. The concept is simple, basically instead of having hundred of Property/Parameters/Channel/Shapekeys to control, we are using few and much less controllers to drive those values. For example:

  • Mouth Smile and Mouth Frown will not happen at the same time. So a 2-directional control that goes Up or Down can be used to drive Smile and Frown.
  • Mouth Wide, Narrow, Open, Close == can be combined into a single 4-direction control.

There are some video tutorials out there that teach you how to create Advance Facial Rig in Blender. I suggest you to search on that. I will list them in here when I found a good one:
https://vimeo.com/15022068

Anyways, all of these can be automated using Python. But good idea for you to do it manually first. I have a feeling that someone out there has already created such automatic script to create "Osipa Style" Facial Rig setup. If not, maybe I have to do it.

MANY TO ONE RELATIONSHIP: MANUAL WAY



Having multiple Drivers to affect and to drive an object is really interesting and useful.

EXAMPLE:
DRIVERS: 2 x Cube ('CubeA', 'CubeB')
DRIVEN: 1 x Monkey ('Suzanne')

import bpy

# single driver for location X
myDriver = bpy.context.object.driver_add('scale',0)

# driver type
myDriver.driver.type = 'SCRIPTED'

# enable Debug Info
myDriver.driver.show_debug_info = True

# specify the script
myDriver.driver.expression = "var"

# add DRIVER VARIABLE to FORCE UPDATE

# create new variable
newVar = myDriver.driver.variables.new()

# variable name
newVar.name = "var"

# variable type

newVar.type = 'LOC_DIFF'
newVar.targets[0].id = bpy.data.objects['CubeA']
newVar.targets[0].transform_space = 'WORLD_SPACE'

newVar.targets[1].id = bpy.data.objects['CubeB']
newVar.targets[1].transform_space = 'WORLD_SPACE'

REMOVING DRIVERS USING PYTHON

Select an object with drivers first, below are some examples snippet to remove the drivers:

# this will clear all kind of animation data from an object
# including custom property
bpy.context.object.animation_data_clear()

# remove animation data from specific materials
bpy.context.object.data.materials[0].animation_data

Sometimes you want to specifically remove driver from particular DATA PATH. So you probably want to LIST DRIVERS' DATA PATH for currently selected object:

import bpy

ob = bpy.context.object
drivers = ob.animation_data.drivers

for driver in drivers:
    print(driver.data_path)


Once listed, we can specifically remove the driver like so:
bpy.context.object.driver_remove('location')
bpy.context.object.driver_remove('scale')
bpy.context.object.driver_remove('rotation_euler')

# To remove Drivers from custom property
bpy.context.object.driver_remove('["myProp"]')

Or just do it all at once:

import bpy

ob = bpy.context.object
drivers = ob.animation_data.drivers

for driver in drivers:
    print(driver.data_path)
    ob.driver_remove(driver.data_path)

NOTE: If I understand it correctly,: "Drivers" in Blender does not have particular name that we can point into, it is simply just an index pointing to FCurve data.

MANY TO MANY RELATIONSHIP (ARRAY DRIVERS)


This will be the most complex setup, which usually require a little bit of planning.

The simplest MANY TO MANY relationship is when 1 Driver has connection to each 1 Driven objects. So we have 100 Driver and we have 100 Driven objects. I think some kind of naming system can help a lot in hooking up relationships.
DRIVER: driver.000, driver.001, driver.002, and so on.
DRIVEN: driven.000, driven.001, driven.002, and so on.

We can then use Python to pair them. Can you write Python code that does this? Should not be too hard, just another FOR loop task.

However, do we always want 100 Controls to drive 100 Objects? Hmm.. probably we do not want that. What would be the point?

Just like if we wanted to control Particles, Debris, Crowds or simulation, we need a SINGLE easy to control MASTER/BOSS to drive an array of objects.

In this case, my proposition is to use DYNAMIC PAINT below.

"ATTRIBUTE TRANSFER" USING DYNAMIC PAINT TO DRIVE ARRAY LIKE A BOSS

I call this "Attribute Transfer", just like how it may be done in other 3D package like Houdini. In Houdini, there are many ways to transfer VALUE from one object into another.

Similarly, in Blender, we have "Dynamic Paint". In theory, it works similar to Houdini, but more practical. Dynamic Paint transfer "Vertex Weight" and it will also Paint Map if we like. Vertex Weight of Dynamic Paint can then be used by some other Blender Modifier and with Dynamic Paint. This works in real time and it controls ARRAY of VALUES, perfect for what we need.

I have attempted to do this kind of crazy setup in the past. It works, but I actually MANUALLY set everything and it takes me quite a while to step-by-step assign the drivers. I remember to setup 64 array, it took me more than hours.

I said to myself back then "This is not the way to go, I need to learn Python to set all these automatically!"
http://blendersushi.blogspot.com.au/2012/03/vfx-multilayers-triggering-of-effects.html
http://blendersushi.blogspot.com.au/2012/03/demo-dynamic-paint-multi-trigger-in.html

Fast forward to today, I think this is now possible and can be automated using Python. The concept is really super simple and I actually have shown this concept a couple of time in the past.

VERTEX GROUP WAY
One alternative clever hack is by using some array of VG (Vertex Group) and Transformation Constraint, in combination with Displace Modifier and Dynamic Paint, of course. I learned this from Gerardo (Liero).

Remember the "Procedural Flip Card" setup?
http://blendersushi.blogspot.com.au/2013/05/python-advanced-procedural-flipping.html

That was actually the similar kind of setup, using the help of Python to make it happen. Again, I got help from Gerardo aka Liero (Blender Artist) back then to understand this VG + Transformation Constraint trick. It works nicely for all kind of transformations. I have to give Gerardo a credit.

If you like to take it to the next level, we really need to use DRIVERS.

I believe the reason Gerardo suggested me to use VG and Transformation Constraint because it is simpler to modify and setup, it does work amazingly well for Translate, Rotation, and Scale. Usually that is all you need, really.

However, if you then want to drive other things: Material Intensity, Shapekeys, Animation, or even trigger NLA actions animation based on event. I have not gone that far yet. I think I am heading into BGE (Blender Game Engine) kind of thinking, although still far.

In BGE, we can easily Trigger Events, but BGE realtime environment is kind of a different environment to the Blender 3D environment. Currently, I am not sure how to hook them together yet. Neither how BGE really talks to the normal Blender 3D environment. There is a potential there.

DRIVERS WAY

The Recipes:

  • Liero's script Parent to Mesh (Padre script) --> this script will do Vertex Parentings for bunch of objects into a single mesh.
  • Blender Displace Modifier
  • Blender Dynamic Paint
The Procedures:
1. Array of Empty A that will stay in position. Use Parent to Mesh script.
2. Array of Empty B that is driven by Displace Modifier. Also use Use Parent to Mesh script.
3. Array of Drivers that measure the Distance of every array pair of Empty A and Empty B and pipe back the OUTPUT into any properties you like to be Driven.
4. A Dynamic Paint setup that will drive the Displace Modifer.
5. OPTIONAL: Array of Custom Property to store the buffer values

Remember that we need a good naming system to keep everything under control. I wrote one big script that does this setup.

SCRIPT COMING SOON, still WIP....
but you can write your own script using what I have written above
and by searching around for similar ideas

CONCLUSION

I think eventually this setup can be done more streamlined via Particle System and Dynamic Paint to pipe the values back into Object Level.

For now, this is really the most logical way that I could think of.

In theory you can use this concept to setup:

  • Simple Crowd system that stand, sit and waves on command
  • Piano keyboard that auto triggers based on distance to fingers
  • Avatar style plant that shy away or opens up when "touched"

"Shy Plant"


Anything that can be Keyframed, can be Drivens. Keep this in mind.

PYDRIVERS...

Here come the most interesting feature: PyDrivers. Save the best for last.

This hidden ability allows you to create all kind of complex function that takes any kind of INPUT and RETURN value to be used to drive the DRIVEN object.

Yes, that is all for now. I let you research about PyDrivers yourself.

I wrote so little of this but I think a lot about what kind of PyDrivers we can plug into Drivers Expressions.

I think, when Blender PyNodes is ready for big exposure, then we have a lot more possibilities. Well, maybe what you wanted to do is "the same", but it will be a lot easier anyways. You can achieve more complexity, but a whole lot simpler.

Talking about PyNodes, I am actually curious about PyNodes implementation thus far for Blender Compositing and Blender Material Cycles. Maybe that is next thing I should look into...

CREDITS TO THE MASTERS

If you are a Visual Artist with high passion in Computer Graphics, you need to learn scripting. Read a bit of Math and expressions. I think it should be easy for you, younger generations of artists.

Python and C++ (eventually) are a must. At least, learn Python, Python scripting is actually one of the easiest programming language to learn.

My Python learning journey is a lot more fun because of Blender.

Below are list of some top Blender Artist at Blender Artist Forum (www.blenderartists.org) that you need to keep eyes on. Read through many of their post on the forum and also at their own blog and scripts:

"B in Pink & Purple" (2013)
Painted at local Library in one afternoon using Blender.
Driving one object using another object in 3D is an interesting area to explore and study in Computer Graphics (CG) in general. Although I have not yet explored everything about how to "hook" and "trigger" one value over another value in Blender, but this one area I continuously study and hoping to master one day.

One big reason why I kept at it is probably because of my interest in Real-Time interaction, Open-CV, proceduralism and those kind of stuffs. It is deeper than I thought. It involves a bit of Math too sometimes.

These are some of key features of Blender that I think has interesting potential to create driver-driven relationship:
  • Manually keyframed or procedural animation (changing time over value)
  • Object Constraint
  • Bone Constraint
  • Drivers
  • PyDrivers (PyExpression?)
  • PyHandlers (event trigger)
  • Blender Game Engine
PyDrivers and PyHandlers are two most interesting topics in my mind at the moment. I only found out and understand a little bit about. I am hoping that I could understand more about it by actually writing and do something with it.

INSPIRATION: Light and Time / The Visual Art of Brian Eno

As a starter, have a watch at this video about Brian Eno and his philosophy in creating his art.

I quoted some of his talks:

"Design the system, but you let the sytem take over and make it for you. And of course it will make it infinitely. That's what I like. I don't go for scale, I go for length. I just want thing that can go on forever..."  
 - Brian Eno

"You can specify a starting point,
you surrender to the thing growing in its own way"
 - Brian Eno

For me and perhaps most of you, Visual Artists, what is even more interesting that changing value or driving value over another is to be able to SEE, TRACE, CAPTURE and VISUALIZE the result of the ever changing driven values on screen. From when it starts, until the end. Or maybe there is no end. Hopefully in real time, but at least we could preserve that beautiful ZEN moment in pixel.

This started to sound like a geeky philosophy. Let's stop talking and get some blending happens.

THE ART OF STAMPING USING DYNAMIC PAINT

"Untitled RED" (2013)
"Untitled Random RGB" (2013)


Although the concept is not totally new, but I figure out that if marriage the idea of "capturing an ever changing value" with Blender Dynamic Paint, we can create some interesting original artworks.

Dynamic Paint is special because this feature in Blender captures / leaves a Brush mark on a Canvas and add more to it. It accumulates and adds more pixels without using too much of computer RAM.

While a huge amount of Poly Counts and Particles will crash any 3D package or render it impossible. If we use the "stamping idea" and accumulate the pixel, we can just keep going and going forever.

Kind of like how 2D Computer Graphics Art actually works, but Dynamic Paint is still happening in 3D environment, so it is very cool.

SEE ALSO:


Imagine artworks created by stamping shapes of different size, color, position, rotation. Those the basics, and more.

INSPIRATIONS:

THE TECHNICALITY OF DYNAMIC PAINT STAMPING

Before we get into the actual stamping art creation. We will cover a bit of technicality first.

Also read this "Dynamic Paint Guide" by Miika first before continuing so you have better idea about it:
http://www.miikahweb.com/en/articles/dynamic-paint-guide

In actuality DYNAMIC PAINT is not technical at all. I am sure you have read and watched some tutorials about Dynamic Paint. You simply specify any 3D Mesh as BRUSH and CANVAS and bake the result as Images. The BRUSH can be manually keyframed and animated.

As you explore Dynamic Paint further, you will find that there are flexibility of type of BRUSH in relation to CANVAS.
However, we can take the idea further and more procedural. This is when thing can be a little bit technical. But do not worry about it, I will take you through every step.

STEP ONE: Prepare Canvas and Brush
Start with a simple Blender default Cube (this will be our BRUSH).

Create poly plane CANVAS of size 10 x 10 units. It can be any size as long it is Square but position  the canvas like below, when we are looking at it from Top View.

Do UV unwrap on this CANVAS mesh, this to ensure it will have a nice layout for image baking later.

I want to simplify it like this for now. Imagine 2D Cartesian graph with only positive X and Y axis.

Work in 2D Top View only, for now.
STEP TWO: Randomize POSITION of the Brush
How would you like to randomize the position of the Cube (brush)? Since we will not be doing manual keyframing, we need some kind of Drivers. For this purpose, I am going to start using PyDrivers. Keep in mind that I am still new to this PyDrivers.

Watch this video again, this is my starting point of understanding this:
David Miller "Variations"
https://vimeo.com/40389198

I write the PyDrivers like below. The name of script need to end with *.py, then I make sure the "Register" checkbox enabled so that Blender will auto-load the script whenever the Blend file is re-opened. It will work like Blender Module to ensure all the setup works as it is without you having to re-run and refresh the dependency manually.


RANDOM WITH SEED VS RANDOM WITHOUT SEED

### RANDOMIZE POSITION USING PYDRIVERS WITH SEED VALUE
import bpy
import random as random

def randPos(min=0, max=1, seed=0):
    random.seed(seed)
    val = random.uniform(min, max)
    return val

bpy.app.driver_namespace['randPos'] = randPos

Above is one example Python script on how we can create a PyDrivers expression that can be plugged into POSITION values of our BRUSH.

How do we apply it? Inside Blender Drivers panel. Just simply plonk the name of the Function you created in script editor to generate random position value into the Scripted Expression.


The above PYDRIVER is more restricted and will generate a more predictable pseudo random numbers that CAN be repeated. The SEED value is the value that can be changed to get variations.

You can also do it like below if you want to have totally random unpredictable result that CANNOT be repeated, able to move and reposition the brush in 3D.

### RANDOMIZE POSITION USING PYDRIVERS WITHOUT SEED VALUE
def randVal(min=0, max=1):
    val = random.uniform(min, max)
    return val

bpy.app.driver_namespace['randVal'] = randVal

I decided that I will try all the possible variations that I could think of at the moment:



import bpy
import random as random

frame = bpy.context.scene.frame_current
seed = 123

def randPos(min=0, max=1, seed=seed):
    random.seed(seed)
    val = random.uniform(min, max)
    return val

def randValS(min=0, max=1):
    random.seed(seed)
    val = random.uniform(min, max)
    return val

def randVal(min=0, max=1):
    val = random.uniform(min, max)
    return val

bpy.app.driver_namespace['randPos'] = randPos
bpy.app.driver_namespace['randVal'] = randVal
bpy.app.driver_namespace['randValS'] = randValS

# The randPos() there is probably not a good naming
# because after all we can simply reuse the value
# for ANYTHING
# randPos is more like the one where seed can be changed
# on the fly, maybe with FRAME

You can use the one without seed value for now, just for simplicity. Just keep in mind that if you actually want the "same" and more predictable result of pattern, you want to have SEED in it.

The one without SEED has the most freedom and most unpredictable (maybe that is what you want), the RANDOM POSITION will get updated whenever we scrub the frame in the timeline or when we make changes in values or when we attempt to move the BRUSH in 3D View.

I suggest the one with SEED value but with FRAME to trigger the changes and make variations.

However, if you want to be totally Zen, and don't care about the previous frame and what comes and just be surprised with the outcome, simply use any random value as you please without any restriction.

FINAL STEP: Paint and Bake using Dynamic Paint
Now, after we now we a setup of BRUSH Cube that updates and reposition itself automatically, we can run the Dynamic Paint simulation and visualize the changes.

If you want a real time result, you can do that by using Vertex Color Painting. If you want a result that is more precise, non-real time and can be saved, you use Paint and Bake Image Sequences.

With Image Sequences, the final result will be sequence of images outside Blender that is in 1:1 Ratio Square format. While with Vertex Color Painting, we have more freedom of the Canvas Size and Ratio.



Increase the resolution of mesh to see a better presentation of Vertex Color Painting:


Here is a result after 250 frames. I reduced the OPACITY so that it is not 100% opaque.


With SPREAD activated. The color will bleed and blends to the nearby vertex.

That is basically the process. Simple, right?

What is interesting now is that we can EASILY apply all kind of variations, simply by reusing our PyDrivers.

DYNAMIC PAINT STAMPING: Random Position XY, Random Scale XY



DYNAMIC PAINT STAMPING: Random Position XY, Random proportional Scale XY 


DYNAMIC PAINT STAMPING:  Random Position XY, Random proportional Scale XY, Random Opacity



DYNAMIC PAINT STAMPING:  Random Position XY, Random proportional Scale XY, Random Opacity, Random RGB Color (based on Material)


"RGB Softsquare"


DYNAMIC PAINT STAMPING:  Random Position XY, Random Rotation Z, Random Color, Random Opacity. 

With Rotation, make sure you use math.pi in expression (PI = 180 degree). Blender rotation expression works in Radian.

  • randVal(-pi, pi)
  • randVal(-math.pi, math.pi)



Sharp RGB Lines (2013).
DYNAMIC PAINT STAMPING:  Random Position XY, Random Rotation Z, Random RG Color, Random Opacity, Variations in Wetness.

Blurred Lines (2013).
RGB Blurred Lines (2013).
Are we tried of Square and Lines yet? Let's try 3D Sphere. Simple replace the Mesh data with Sphere.
Wet Spheres (2013)
Endless RGB Fountain (2013).
How about Suzanne?

Rocking Suzanne (2013).
Tears of Water Dragon (2013)

Did I tell you that RGB color is a little "ugly"? Then we need a more controlled Color for the BRUSH. Either using HSV or just use Kuler. Below, I use 4 x Brush, each with different color.


SPECTRUM CONFETTI (2013)








Now, we can started to see:
  • What actually works? What does not work?
  • What looks beautiful and appealing to the eyes and what not?
  • How much range of color do we need?
  • Less is more? More is more?
  • Does random always work? Or less random?
  • Which shape pattern is nicer to the eyes?

REALTIME VERTEX PAINT vs NON-REALTIME BAKED IMAGE
Remember there is a big difference between the Real Time VS the Final Image Sequence if you actually bake the result.

Real Time VERTEX PAINT

Baked PAINT.

The CANVAS and BRUSH are 3D, just in case you forgot about it. I often forgot actually.


UV is Flat. But 3D is 3D.

Vivid Expressionista de Suzanne (2013).
I do not know yet the final result I could get from this. Maybe you try it yourself and send me some of your artworks. Have fun~ Think of title of your Painting as well :)

DYNAMIC PAINT MATERIAL+UV TEXTURE:

Do you know that Dynamic Paint BRUSH also respect Material UV Texture? I actually just found out today while experimenting and consulting about Dynamic Paint with Miika.

What does this mean for us? This means awesomeness. By using TEXTURE to procedurally paint, we can really easily produce all kind of abstract interesting Procedural Dynamic Paint Arts.

B&W VIVID CHAOS (2013) 

Originally this is a photograph of B&W abstract light/shadow at night.







LIKE A DIAMOND (2013) 
Using sequence of photographs that I took at Sydney Vivid Festival. Stamping applied using Icosphere.







SHREDDED DESIRE (2013) 
Here, I am using Blender Sapling (Procedural Tree Add-On) as a Brush and some random photograph of autumn leaves to just randomly paint the Canvas. The result is something that is quite dynamic.










DYNAMIC STAMPING WITH TEXTURED ALPHA:
Texture Alpha for stamping actually works as well. Although I did struggle to get it work at first:

Read about Blender Image Alpha here:
http://www.katsbits.com/tutorials/blender/scene-view-alpha-transparency.php

Then we need to make it to work with Dynamic Paint. To be honest, this is not as straight forward as it may seem because I kept getting this weird result (when using PNG+Alpha as one file):

What is going on there, Alpha?
(Will update when I finally get it right and list all the steps....)

If you set everything correctly, you get the Stamping with Alpha Texture, which is less abstract and behave more like a stamp without edges. The Image Texture with Alpha in theory should just work just like Miika's official example on Dynamic Paint Guide where he did stamping using Blender logo and even paint with Smoke! Not sure how he did it at first, he is the Dynamic Paint Wizard.

UPDATE 20130609: 


Alpha is now behaving.
So, after some tweak, Alpha Texture is indeed working, you just need to set it up properly following the article post at Katsbits above. Most important is to ensure Alpha checkbox is ticked under Texture setting. You can use Alpha either by providing texture with built-in Alpha channel already or simply use other image as Alpha.

Lastly, ensure that you also point and specify the correct Material underneath DP Brush setting. All goes well, Alpha will work fine. No bug here, just need to set thing properly.

Layered Texture is apparently works together with Dynamic Paint and you can use Blender's own Procedural Texture and layer a complex texture, which is really amazing in my opinion.

What nice is that we are still controlling the objects in Object Level (animated manually or procedurally via scripting), but we sort of have access to all kind of Pixel Level-like stamping ability via Dynamic Paint.

BACTERIA BILLBOARD EFFECT
Suddenly, I think to create "CONTAGION Bacteria Billboard" effect in CG seems possible and perhaps simpler to setup than I originally thought.
https://www.youtube.com/watch?v=LppK4ZtsDdM

All made possible because of Dynamic Paint. Well, for Shader guru, you probably can create OSL or some Cycles Shader node network that does this CONTAGION effect. It should be a fun challenge. However, for Artist in general, the idea of creating Random Stamping is easier to understand.











THE BALLAD OF FLOWER PASTELS (2013) 
Using Force to drive the Paint.
100 frames.

100 frames later.

700 frames.

1000 frames and continues....



STARING EYE OF PYTHONIC VORTEX (2013)









BALLET OF BANSHEE (2013)






I have not yet explored all the possibilities that can be achieved using BRUSH of Dynamic Paint.

I encourage you to really explore Dynamic Paint and use some knowledge of Drivers to Stamp texture to create your own interesting beautiful ART piece: 

I guarantee this post may grow overtime and you will discover some interesting feature of Dynamic Paint that you think impossible.

For example: Particle Instancer + Dynamic Paint, gives you direct access to Particle Instance Texture to stamp. I did not know that this was actually possible, until Miika pointed: as long Particle Instance Modifier is applied before Dynamic Paint, you can stamp the Instancer this way.

The setup.

Resulting Stamping from Particle Instance (via Modifier).

COMING SOON:

  • Particles Pointilism: can we use Python to tell Dynamic Paint to create rain of particle that reads a specific Image UV?
  • Procedural Animation using Python: Linear Interpolation, etc.
In the meantime, I have to study more PyDriver and PyHandler first.... there is just something about these two that seems magical.

Below is some of my readings for the next few days:
http://blenderscripting.blogspot.nl/2012/09/python-driven-animaion.html
http://blenderartists.org/forum/showthread.php?240729
http://blenderscripting.blogspot.com.au/2012/09/python-driven-animaion.html
http://aligorith.blogspot.com.au/2011/01/rigging-faq-addedum-info-on-drivers.html
http://blenderscripting.blogspot.nl/2012/09/text-animation-using-frame-change.html
http://learningblender3dsoftware.blogspot.com.au/2012/10/messing-around-with-prepost-handlers.html
http://blenderartists.org/forum/showthread.php?233979-how-to-run-bpy-app-handlers-load_post-every-time-after-file-loaded
http://www.blender.org/documentation/blender_python_api_2_60_6/bpy.app.handlers.html
http://www.blender.org/documentation/blender_python_api_2_60_4/info_best_practice.html
http://blenderartists.org/forum/showthread.php?266579-RealTime-script-link-python-driver-UPDATED-TO-quot-Frame-Change-Event-Handler-quot-thread
http://blenderartists.org/forum/showthread.php?245450-Real-Time-Python
http://opencv.org/
http://www.calebmadrigal.com/facial-detection-opencv-python/
http://creatingwithcode.com/howto/face-detection-in-static-images-with-python/


MKRdezign

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget