Halloween Costume ideas 2015
Articles by "stamp"
@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

This writing is a case study or research note while I am exploring Blender Dynamic Paint, PyDriver and PyHandler to create tool that does Particle Pointilism Art.

It is not a complex task, but does require a little bit of logic and understanding on how data may flow. The end result may not be something that is productive or polished, however, this one is a good example of procedural thinking.

FIRST TEST: Mario Mushroom Pointilism based on Mario Mushroom Pixel Art.

VISUAL DIAGRAM: Particle Pointilism with DP

I started by sketching diagram. The actual sketch is a lot rougher than below.

CONCEPT + IDEA

To be able to convert an IMAGE/PHOTOGRAPH into Pointilism Art that utilizes Blender Dynamic Paint and Particles.

PROBLEM

  • I believe the current Blender Particle has "limited" ability in term of data being carried on per particle basis. Although Blender Particle can emit Particles with RGB Color that seems to correspond to the objet Emitter UV Image Texture RGB Value, we cannot really easily query per Particle RGB color.
  • Dynamic Paint + Particle Color does not directly read UV Image Texture RGB Value. However, the color can be updated during animation and it assign that color to paint on canvas.

SOLUTION

Creating some kind of setup so that we can "sample" Pixel RGB Color (U and V) by referencing object position in 3D (X and Y).

STEP 1: Function to Track Object Position

import bpy
import math as math

ob = bpy.data.objects['ReferenceCube']

# If Reference Cube transform is different to actual pixel
# use ratio multiplication 
ratio = 1

# HELPER FUNCTIONS: Get Cube Position
def getCubePosition():
    x = ob.location[0]
    y = ob.location[1]

    print('X Position:', x)
    print('Y Position:', y)
    print('Pixel X Position:', math.floor(x / ratio))
    print('Pixel Y Position:', math.floor(y / ratio))
    
    return( math.floor(x/ratio),math.floor(y/ratio) )

myPos = getCubePosition()

Test the code and see if it is working:


Here I am tracking the X and Y position of an object called "ReferenceCube", which is a Float (decimal number) value and I know I will need to convert those value into Integer for Image Pixel Color on UV space. The RETURN value of this function is the final Integer value needed to sample Pixel Color.

ON SCREEN TEXT VALUE VIEWER (OPTIONAL)
I think it would be nice if we are able to see and visualize DATA VALUE changing while we are modifying object in real time or during timeline playback (if not real time).

I will attempt to do that using Text Object and Python PyHandler.


Below is an example of script that does it, providing we pass on value into the BODY of Text Object(s). Before running the script below, create a few Text Objects, give it a specific name to reference. I am using Text Object with name "floatXpos", "floatYpos", "xpos_text", and "ypos_text". But the name can be anything. I hard-coded the name of object to track just for simplicity.

# UPDATE TEXT
def updateText(scene):
    ob = bpy.data.objects['ReferenceCube']
    x = ob.location[0]
    y = ob.location[1]

    myPos = getCubePosition()

    fxpost = bpy.data.objects["floatXpos"]
    fxpost.data.body = str(x)
    fypost = bpy.data.objects["floatYpos"]
    fypost.data.body = str(y)
    
    xpost = bpy.data.objects["xpos_text"]
    xpost.data.body = str(myPos[0])
    ypost = bpy.data.objects["ypos_text"]
    ypost.data.body = str(myPos[1])

### SET PYDRIVER
frame = bpy.context.scene.frame_current

### SET PYHANDLER
bpy.app.handlers.frame_change_pre.append(updateText)


The PyHandler code in here is calling that helper function above that updates the Text object BODY value whenever one scrubs on the timeline and/or change the frame number by running the playback. This is totally fine for our purpose. We do not really need to see real-time update the text all the time.

This is the first time I use PyHandler and from my understanding, whatever assigned to PyHandler will get called when certain EVENT is happening. 

Real Time Update Using PyDriver
Alternatively, if we like to see a Real-Time value update, we can use PyDriver.

The simplest way I could think of is to create Custom Properties (set of Key and Value) that gets updated whenever there is changes happening.

Script goes something like below:

import bpy, math

ob = bpy.data.objects['ReferenceCube']

# If Reference Cube transform is different to actual pixel
# use ratio multiplication 
ratio = 1

# HELPER FUNCTIONS: Get Cube Position
def getCubePosition():
    
    print('-'*50)
    
    x = ob.location[0]
    y = ob.location[1]

    print('X Position:', x)
    print('Y Position:', y)
    print('Pixel X Position:', math.floor(x / ratio))
    print('Pixel Y Position:', math.floor(y / ratio))
    
    return( math.floor(x/ratio),math.floor(y/ratio) )

myPos = getCubePosition()

def floatXposVal():
    ob = bpy.data.objects['ReferenceCube']
    x = ob.location[0]
    return x

def floatYposVal():
    ob = bpy.data.objects['ReferenceCube']
    y = ob.location[1]
    return y

def xpos_text():
    xpos = myPos[0]
    return xpos

def ypos_text():
    ypos = myPos[0]
    return ypos

bpy.app.driver_namespace['floatXposVal'] = floatXposVal
bpy.app.driver_namespace['floatYposVal'] = floatYposVal
bpy.app.driver_namespace['xpos_text'] = xpos_text
bpy.app.driver_namespace['ypos_text'] = ypos_text


We are using PyDriver here. And the advantage of PyDriver is we can see the value updating in real time, whenever there is a changes. In some occassion, we need to force the update of PyDriver, but in this case, it will work nicely.

STEP 2: Function to Get RGB value based on X and Y

Next, we need another helper function that simply query and get RGB value based on specified Image. We have seen a usage of such function in here:

I will simplify the function so that it will simply query RGB value based on user specified X and Y value. The X and Y value will come from the Reference Cube position in 3D, as we have planned.

The code looks like this:

# HELPER FUNCTIONS: Get RGB value

D = bpy.data

test_file = 'mushroom.png'
img = D.images[test_file]
pixels = list(img.pixels)
grouped_list = [pixels[ipx:ipx+4] for ipx in range(0, len(pixels), 4)]

# Get width and height of image (in pixel)
width = img.size[0]
height = img.size[1]

def getPixelColor(x=0, y=0):
    r = grouped_list[x + y * width][0]
    g = grouped_list[x + y * width][1]
    b = grouped_list[x + y * width][2]
    # a = grouped_list[x + y * width][3]
    print(r,g,b)
    return (r,g,b)

# TEST GET PIXEL FUNCTION
# getPixelColor(4,6) # x,y

STEP 3: Set RGB value to Material Color of Reference Cube

Here, I will create PyDriver setup that query the RGB value in realtime and let it pass on the value into the RGB color. This color will then get pass on into Particle and Dynamic Paint automatically.

# SET DIFFUSE COLOR OF REFERENCE CUBE MATERIAL
name = 'PixelSampling_MAT' # reference cube material name
MAT = bpy.data.materials[name]

def setPixelColor(rgb):
    print ("set color of material to pixel RGB value")
    MAT.diffuse_color = rgb

def valueR():
    myPos = getCubePosition()
    rgb = getPixelColor(myPos[0], myPos[1])
    return rgb[0]

def valueG():
    myPos = getCubePosition()
    rgb = getPixelColor(myPos[0], myPos[1])
    return rgb[1]

def valueB():
    myPos = getCubePosition()
    rgb = getPixelColor(myPos[0], myPos[1])
    return rgb[2]

bpy.app.driver_namespace['valueR'] = valueR
bpy.app.driver_namespace['valueG'] = valueG
bpy.app.driver_namespace['valueB'] = valueB


STEP 4: Setup Dynamic Paint BRUSH and CANVAS

We are done with the coding actually.

All below procedure should happens and updates automatically:
  • When Cube is repositioned in 3D, particularly the X and Y location, we are tracking it.
  • The X and Y will correspond to the Pixel RGB color based on Image Texture we have specified.
  • If Cube is around position X and Y, let say X=1.42343 and Y=3.432523, then the Material Diffuse Color of the Cube will change to match the pixel position X=1 and Y=3.
All we have to do is to setup the Cube as BRUSH and create a Plane or something as Canvas.

Run the simulation and there we go, we have procedural POINTILISM ART machine in Blender. With little tweak, we could actually paint using the REFERENCE CUBE itself, Dot by Dot.

Remember that the Reference Cube can be any object and so we can have any shape of stamp, converting tiny square pixels into other shapes, when everything goes to plan.


All and all, at least you are learning some codes that can help you to drive value with another value. PyDriver and PyHandler are two things you want to explore.

The way I see PyDriver and PyHandler is like this:
  • If the value can be animated and can be assigned with Drivers, you can modify it using PyDriver.
  • If the value is sort of hidden (like Text object BODY data), you can access and modify it using PyHandler. I heard that PyHandler can create Modifier "on-the-fly".

BLENDER SUSHI SCRIPT: Pointillism Art (rough script with lots of hardcoded thing, needs clean up)


import bpy
import math as math

print('-' * 40)

ob = bpy.data.objects['SamplerCube']

# If Cube Transform is different to actual pixel
ratio = 1

# HELPER FUNCTIONS: Get Cube Position
def getCubePosition():
x = ob.location[0]
y = ob.location[1]

print('X Position:', x)
print('Y Position:', y)
print('Pixel X Position:', math.floor(x / ratio))
print('Pixel Y Position:', math.floor(y / ratio))

return( math.floor(x/ratio),math.floor(y/ratio) )

myPos = getCubePosition()

# HELPER FUNCTIONS: Get RGB value

D = bpy.data

test_file = 'mushroom.png'
img = D.images[test_file]
pixels = list(img.pixels)
grouped_list = [pixels[ipx:ipx+4] for ipx in range(0, len(pixels), 4)]

# Get width and height of image (in pixel)
width = img.size[0]
height = img.size[1]

def getPixelColor(x=0, y=0):
r = grouped_list[x + y * width][0]
g = grouped_list[x + y * width][1]
b = grouped_list[x + y * width][2]
# a = grouped_list[x + y * width][3]
print(r,g,b)
return (r,g,b)

# TEST GET PIXEL FUNCTION
# getPixelColor(4,6) # x,y

# SET DIFFUSE COLOR OF REFERENCE CUBE MATERIAL
name = 'PixelSampling_MAT' #material name
MAT = bpy.data.materials[name]

def setPixelColor(rgb):
print ("set color of material to pixel RGB value")
MAT.diffuse_color = rgb


def valueR():
myPos = getCubePosition()
rgb = getPixelColor(myPos[0], myPos[1])
return rgb[0]

def valueG():
myPos = getCubePosition()
rgb = getPixelColor(myPos[0], myPos[1])
return rgb[1]

def valueB():
myPos = getCubePosition()
rgb = getPixelColor(myPos[0], myPos[1])
return rgb[2]


# UPDATE TEXT
def updateText(scene):
ob = bpy.data.objects['SamplerCube']
x = ob.location[0]
y = ob.location[1]
myPos = getCubePosition()
fxpost = bpy.data.objects["floatXpos"]
fxpost.data.body = str(x)

fypost = bpy.data.objects["floatYpos"]
fypost.data.body = str(y)

xpost = bpy.data.objects["xpos_text"]
xpost.data.body = str(myPos[0])
ypost = bpy.data.objects["ypos_text"]
ypost.data.body = str(myPos[1])

rgb = getPixelColor(myPos[0], myPos[1])
rgbt = bpy.data.objects["rgbValue_text"]
rgbt.data.body = str(rgb)

### SET PYDRIVER
frame = bpy.context.scene.frame_current

bpy.app.driver_namespace['valueR'] = valueR
bpy.app.driver_namespace['valueG'] = valueG
bpy.app.driver_namespace['valueB'] = valueB

### SET PYHANDLER
bpy.app.handlers.frame_change_pre.append(updateText)





NOTE:
I do not know how Blender would handle large image. So far, I tested with 16 x 16 Mario Mushroom Pixel Art. I will give it a try with a larger image after I post this blog. Maybe it will crash or simply running really slowly on the machine.

However, all goes well and sometimes you got lucky, and Blender does magic one again.

TON (2013)

1024x1024 Pixels, 2500 Samples, 3 hours calculation, 3 x DP Brush in Torus Shape.

*Original photo of Ton is from the Internet, which is cropped and resized to 512x512 pixels. Copyright belong to photographer.













STEVE (2013)

1024x1024 Pixels, 2800 Samples, 3 hours calculation, 3 x DP Brush in Torus Shape.

STEVE JOB (2013).
Based from that famous photograph by ....
Below is a more detailed version, using Apple logo as dynamic Ink Stamping, instead of regular spherical dots. The point of every dots are procedurally spread across the image.

2048x2048, 4400 Samples, over 10 hours.







INSPIRATION: William Betts Surveillance Art (pixel art using CCTV image)
As part of the Creator Project, this artist is recycling CCTV image and create a setup that actually paint a giant canvas, dot by dot (like the old dot matrix printer). Quite clever.
http://thecreatorsproject.vice.com/blog/cctv-footage-as-art-the-work-of-william-betts

INSPIRATION: Street Art in Germany
Was Blender ever made for this kind of Art creation? Don't know, keep experimenting.
http://youtu.be/fhL3XgkMiMk

"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