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

Happy Feet Two of Matryoshka Dolls

The other day, I was laying on bed and imagining: I think Matryoshka Dolls can be made procedurally in Sverchok using just 2 Grease Pencil strokes. And that happens!

There is a bit of research going on regarding the techniques and concepts to create the mesh for the dolls. It is really super simple, however if you actually try to make such setup, you still will learn some interesting things in this simple exercise.

01 GOOGLE SEARCH RESEARCH

There is one Matryoshka Dolls shop in Sydney, located at Darling Harbour Shopping Center. I might go there to have a look and study some of the design.

For our convenience, we can always start by looking at some images on the Internet, I use Google Search for that. Overall, we understand the shape it is really simple.



I also found this Nested Pigs made of glass the other day, very cool:

Nested Pigs,
As a side reference, you might also want to see this Gordian Anime Robot:

02 THE TECHNIQUES

Like I said, it is actually a very simple procedure to create this. When I mean 2 Grease Strokes, I really mean it. One stroke for the smallest doll and another stroke for the biggest doll. That is it.

We can then do some kind of:
- Resampling
- Interpolation
- Lathe
- Distribution
- Alignment

What interesting is the simplicity of the whole setup.

Let's create the dolls!

03 PREPARE THE DATA

Our Data is a 2 x Grease Pencil (GP) Strokes.

GP strokes is always a heavy type of data, even 2 strokes can give back around 2000 points. Just to let you know. Unless you have "Simplify" turned on in GP Preferences.

In our case, it does not really matter much, 2000 points data is still pretty light to handle in Sverchok.

From our research, we know that the smallest doll is more like an egg or baby wrapped and the tallest doll has a bit of double curve for the head and body.


NOTE:
- Grease Pencil Strokes often are connected stroke when converted into Curve, you want to F6 and get rid of the ugly connected curve.
- Careful when drawing GP strokes with nothing in 3D scene (if you happened to delete everything, including Active Camera). GP needs to always be linked to an object, at least an empty or a camera. Otherwise you may not be able to get Curve that you expected.

04. ENTER THE MATRYOSKA

(Pardon my reference to The Matrix, I just need to do it.)

After converting the GP into Curves, simply brought the curve into Sverchok environment via the node-tree. We can manipulate, edit as we need to.

05. SEPARATE AND RESAMPLE

We know that we made 2 strokes as a single Curve object, we need to separate them first using SV Separate Loose.Once we have 2 data now, we simply use SV Vector Interpolation to "resample" each of the curve.

I just use 10 points sample for now. You can use different Count.

You should see something like below.


At the moment, you only see Vertices. You cannot bake the Vertices points. If you want to bake it, you can do that after you use UV Connection and connect the edges. But save that for later.

06. More Interpolation

Using SV Evaluate Line we can further "interpolate" between the 2 curves. Before that we need to specifically filter the 2 Curves using 2 x SV List Item nodes, one for each curve.



We know that with node that has "Factor" we can actually do some "in betweener" magic.



07. SPIDER WEB SITUATION

You are starting to see where this one is going. The next step is probably the trickiest bit, but you need to take a leap of faith.

The SV Evaluate Line actually convert all the data back into 1 array of data. Just points, but still has a nice arrangements or sortings.


[ SV List Split + SV UV Connect ] combo will split those "Points Data" every-N points. By doing so, we have Points data once again ready to be converted into Points and Edge, aka Lines. This will become something that you may encounter in the future. I am not the Oracle, but you can trust me on that.



08. CLONES

We are nearly there in our journey to make the M Dolls.

What I often did not show you in my blog writing when explaining about Sverchok is that I actually check the data a lot of time using SV Viewer Text. Especially important when we are dealing Array of Data or Vectorized Input.

Matryoshka Dolls case is a perfect example to explain this. It is very Pythonic too.

We are slicing Lines into parts. We connect them again using UV Connect node, with that node we can again take advantage of SV Separate Loose, this time, it checks if Points are connected by Edge and then it can "group" or "nest" the data back.

Sverchok is very good for this kind of Separating and Combining data. Normally if you were to model this using Blender normal environment, you might go back and forth of Object and Edit mode.

Of course, Blender has Array Modifier, Curve Modifier, Particle Instancing, DupliCloning, however, using Sverchok, we have an additional workflow that we can use to streamline the process.


Next node to use is SV Lathe Node. And we are pretty much done!




All we need to do is to present it better.

09. ARRANGE AND DISTRIBUTE

Nicely arranging the Doll and distribute them from the shortest to tallest is a fun Math task.

In our case, we do not really need to worry about sorting them from shortest to tallest. That could be another tutorial. It would also be fun if we are to "Shuffle" these dolls. That is also another different puzzle. What you may not know is that SV Objects In node has a new feature added "Sort Objects Components By Objects Name". Thanks to Nikita for this.

Even Distribution  of Dolls
Originally, I arrange the dolls using evenly spaced distribution:


However, a friend suggested me to distribute it more nicely, which takes consideration of the Dolls Radius and also an option to have "gap" or "spacing" in between the dolls.

Nicely Distribution of Dolls with Extra Gap
For this, you probably remember my previous post on SN Accumulator node? We can use that.

If we measure the Bounding Box of each Dolls, and Accumulate the WIDTH of each doll, we can arrange the dolls side by side in a nice way.

A more sophisticated solution is probably to use Radius of each doll and use Math formula to measure the position of each doll center. However, we probably don't need to go there, but you can certainly do that if you like to.



That is the story how the Matryoshka Dolls was made using 2 Grease Pencil strokes.

The nested dolls.

MATRYOSHKA DOLLS SV NODE TREE


Version 1:


Version 2:



HOUDINI STYLE MATRYOSHKA DOLL

[Add Link Here Later...]

Inspired by Hand Drawn art of Shigeto Maeda.

Time for more snippets. Small little useful recipes to help you make a more sophisticated dishes.

SMART MASKING

  • Mask List 
  • Mask Join
  • SN Mask Set

I learned this from Linus (thanks Linus!). He also made additional node that adds feature to the "masking" in Sverchok. This is the ability to specifically mask editing of some components.

Let see how it works in an example.

Supposed we have a Line made with 10 Vertices like below. I am using Index Viewer Draw so that we can see the actual Vertices Index number. The index started counting from 0, so for 10 vertices, we have index 0-9. Let say I want to specifically edit vertices with index number 2, 3, 6, 7.


I will summon the Mask List and Mask Join node. In the past, we only have the Mask Join node and although it is good for certain tasks, it is also limited. Mask List together with Mask Join can do more.



We know from before that in order to create "mask" we need to supply a True or False list, or a list with 0 and 1 numbers.

List pattern of 1 or 0 (True or False) can be generated using Formula2 node if the number has pattern and that is more procedural too. However, if we want to specifically give some list of index number, we want to use a helper SN script called "mask-set" from Ly.

When you download Sverchok ZIP, inside it you will find some "hidden" folder library of SN (Scripted Node) scripts. They are a collection of additional Python code that you can load into Sverchok Scripted Node and it will function like a real node.



We just want the "mask-set". I usually copy the script from its original folder into the main "node_script_templates" so that it will appear in Sverchok Script Node template library viewer.

Anyway, to cut the story short, just load the script into "Scripted Node" aka "Script Generator" inside Sverchok node-tree. After you "Import Template", just click on "Load".



Now, this little node needs its own setup to work:


In the Formula2 node, I specified the index of vertices that I want to mask. With List Length and List Range, we basically generate a list of all index numbers.

The Mask List itself will do the work and spit out True or False list like below that we can use with Mask List and Mask Join:


So finally we can edit and move those specific vertices:


I move up those vertices specifically.

Seems like a lot of work to do "mask" editing, isn't it? Well only the first setup. Because we can always re-use this "compound setup" for other purpose quite easily.

For example, I want to create a house shape from Box node, I simply move up vertices number 14, 15, 16.


And we can also create Procedural Star from Circle by selecting "every other" vertices and move it in or out. The total number of vertices need to be an even number in this case.


That's how really the basic idea to create procedural hairy creature the Susuwatari below.
Susuwatari (c) Studio Ghibli
Below we have Smart Masking setup example from the genius Nikita aka Nikitron:


LIST INPUT NODES AT WORK

Often time we are in situation where we need to have a single node that can output multiple values, that is when List Input Nodes can come in handy.

It seems really obvious that List Input can do this, however, sometimes I forgot.


The above setup is certainly better than below (not quite as elegant):

With List Input, we can take advantage of quick edit.


I use this actually for lofting each leg of Spider Limb.

BMESH BAKE OUTPUT MESH WITH MATERIAL

In recent version of Sverchok, we have now the ability to specify Material for our mesh. This is pretty self explanatory, but anyway below is such example.


PYTHON FOR SVERCHOK NODE TREE

This almost escapes my mind, but that is because I am still familiarizing to work inside the Node Editor. We can make use Python scripting handy when working inside the Node Editor. Just like when we are doing Compositing or creating Material in nodes, we can use Python scripting.

Sometimes all we need to do is to peek into the History and then reuse the script to modify the nodes.

Multiple Mesh Baking
Let say, we end up with node setup that require multiple mesh baking like below. We have many mesh that needed "Bake" button to be pressed.


If I manually click on the "Bake" button anyway and peek into the History, I will get the Python script that reflects what I just did.


It is pretty clear what is happening. We just click some nodes with certain ID Name (node name) from certain IDTREE NodeTree. More correctly, clicking the button actually runs those Operators to bake the mesh out.

You can copy and paste those code into Text Editor. Remember to do "import bpy" before running the code. The code can simply be like below:


You can tidy up the nodes even further, make the code more elegant, let say to take nodes with list of names you specified. No worries, you will learn about this eventually.

Next time you want to bake those nodes, you just simply run the script from Text Editor.

Resetting Values
Similar to above, you can also watch the History panel and see what Python script is executed when you change the parameters.


Eventually you will need to care more about Node Name + Label. Node Name is more important because it is what the script will be referring to. You definitely cannot have Node with the same name. But you can Label them with a same name.


I need to look around to find out how to do this below:
- Arranging nodes layout using Python
- Connecting/Disconnecting node using Python
- Creating and deleting node using Python

QUICK SNIPPET LINKING AND CREATING NODES 

Found this. But was a bit outdated and actually for Node Compositing.
http://blenderartists.org/forum/showthread.php?271813-Connect-nodes-in-python

Then I figure out we can do this:

import bpy

tree = bpy.context.scene.node_tree
comp = tree.nodes.new('CompositorNodeImage')
RL = tree.nodes.new('CompositorNodeRLayers')
comp = tree.nodes.new('CompositorNodeComposite')
link = tree.links.new(RL.outputs[0], comp.inputs[0])

However the layout then need to be arranged somewhat. So that is something to keep in mind.

Anyways, after a bit of trial and error, for Sverchok Node Tree, we apparently can find the node tree data inside the Node Groups:

import bpy

NG = bpy.data.node_groups['NodeTree']

OI = NG.nodes['Objects_in']
VD = NG.nodes['Viewer Draw']

# print out all the nodes name
for node in NG.nodes:
    print(node.name)
    
# link the two    
link = NG.links.new(OI.outputs['Vertices'], VD.inputs['vertices'])

# create a new node of certain type
VN = NG.nodes.new('ViewerNode')

Ugly code but seems to work. Just make sure we keep track of every node created.

And... this is if you want to change some node stuff for Materials.
http://blenderartists.org/forum/showthread.php?321177-How-can-I-add-material-Diffuse-BSDF-to-object-using-python-script

Have to do this:
bpy.data.materials['Material'].node_tree.nodes['Material'].inputs['Color'].default_value = 1,0,0,1

Instead of this:
bpy.data.node_groups["Shader Nodetree"].nodes["Material"].inputs[0].default_value = (1, 0, 0, 1)

Data digging in Blender is both fun and frustrating. At one point, I shall be more familiar with all this and hopefully all questions answered! :)

Creating Interface for Sverchok Setup
Now, what would be nice is to have those script as a Button or some kind of GUI interface. You can use Blender own's interfacing, but since we are doing it inside Sverchok, it would be nice if we can have a node with simple interface (Button, etc) and able to run the script, all from within encapsulated node.

That is when you want to look at Scripted Node (SN).

GETTING INTO SCRIPTED NODES (SN)

I wanted to cover Scripted Nodes (SN) in one big articles or many articles in near future.

I am really still a newbie in term of scripting and coding, slowly getting into it. Eventually there will be time when one need to be comfortable in both Coding and Noding, it will take you far.

You probably already know this fact:
Sverchok inside Blender is actually a perfect Add-On to help you becoming good with both coding and noding, to understand advanced procedural and parametric workflow.

By no means "easy", this is when you are exposed to complexity. Trust me, this used to be a lot harder, all these tools make learning complex things less steep.

Start from here:
ScriptedNode_documentation.md => find it inside Sverchok folder.

For example, below is a SN magic by Ko, generating Text on the fly using Sverchok data. Apparently the Formula2 node is also a single liner Python code executor.


HEAT MAP AND NODE BAKE TIME

When working inside node-tree, especially a complex one, we will start noticing the time it takes to update/refresh per frame update.

Sometimes we want to be able to know how long it takes to bake each node. What node is causing the "slow down". Which node is slowest to calculate.

You can print such data from the Sverchok Add-On Preferences "Print Update Timings" and look at the output on the System Console.





Sneak peek:


USING BOUNDING BOX CORNER AS MATRIX PIVOT


  • Matrix In
  • Matrix Apply
  • Matrix Deform

Spend some time inside Sverchok and sooner or later you want a better understanding of the Matrix for transformation of mesh.

I am also still in the process of having a better understanding of how we could use the Matrix Data. What more importantly is how Matrix is used to generate or modify mesh or to set the pivot point of mesh.

In general 3D, we normally don't care too much about Matrix data, although we are actually using it all the time, especially when we are doing things like: Transforming object (Move, Scale, Rotate from axis), Freeze Transform, Rotate from X pivot.

Try a setup like below, load the Default Cube into Sverchok and we will modify it:


Try changing the value of the Vector In that goes into Location and Scale sockets of Matrix In.


Now, that effect does not always work magically like above. Sometimes we do want that kind of transformation effect to happen. As if we moved the Transformation Pivot into a different point, whether it is an arbitrary point in 3D space, or Empty location, or maybe from Bounding Box corner.

Let's move pivot into Bounding Box corner, it is more fun.


To get the Bounding Box Corner Point, we use SN script below from Linus:

def sv_main(bbox=[[]]):    
    in_sockets = [
        ['v', 'BBox',  bbox],
    ]
    
    s_type = ["v" for i in range(8)] 
    name = ['D','C','H','G','A','B','E','F']
        
    if bbox[0]:# check that we have input
        data=[ [[bbox[0][i]]] for i in range(8)]
    else:
        data = [[] for i in range(8)]
        
    out_sockets = list(map(list,zip(s_type,name,data)))
    out_sockets.sort(key=lambda s:s[1])
    return in_sockets, out_sockets

The setup above does the procedure below:
1. Get Bounding Box.
2. Get a point from Bounding Box Corner
3. Prepare the Matrix, customize the pivot point for our mesh.
4. Edit and transform the object from the custom pivot.


That makes a point that we need to care about the Transformation Matrix of our Mesh. This is also useful when we are dealing with multiple objects and we are setting up Parent-Child Hierarchy.

If we have a simple head like Pinnochio head like this, we want to pay attention to the Transform Matrix of each parts of the head (hat, left eye, right eye, and nose).


If we set everything correctly, we will be able to have control over the mesh matrix transform while maintaining the structure and relationship.

Simple Procedural Pinnochio


MKRdezign

Contact Form

Name

Email *

Message *

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