Almost everything nodeable !?

For some time now the plan has existed to make access to Blenders internal data much easier and generic by using the API system called “RNA”. This system declares unified access methods for anything you can see and manipulate in a Blender file: from objects, meshes and lamps to materials, particles and even the user interface elements. It is the same system used also for defining the stuff you can script on with python (though python is not involved so far).

If you watched the previous demo videos, you may have noticed that the Get/Set nodes are all very limited and static, i.e. their input/output sockets do are not changing at all (that is especially annoying with the Set nodes, because you essentially are resetting each of the input values in each node). Well, these problems will be solved soon, here are some first impressions of the generic data nodes (still WIP):

From left to right: After selecting the nodes base type, new properties can be added as sockets

Before any sockets can be added, the type of the data node has to be set (for coders: this is a StructRNA identifier). This is could be simplified further by adding the most common struct types (objects, meshes, particles, etc.) to the menu as shortcuts to predefined nodes and adding a search and/or tab-completion feature. After setting the type, all available properties of that type can be added as sockets (outputs for the GetData node, inputs for SetData). This too could benefit from search/tab-completion.

The “Path” sockets you see in the image are used to define the actual source of the data, i.e. an instance (or collection) of the nodes struct type. This is basically a shortened version of the RNA paths known from python scripting: They point to some entry in the namespace. Here are some examples:

StructRNA Path Comment
Object objects['MySpaceship'] plain object data (not a mesh!)
Mesh meshes['MySpaceshipMesh'] not vertex data, just the mesh properties
Mesh objects['MySpaceship'].data access to the same mesh via its parent object
MeshVertex meshes['MySpaceshipMesh'].vertices this actually gives you the vertex data collection, like positions, colors, etc.

Note that the paths are only really evaluated at runtime (though most often you will end up using the default socket values). Also you may notice in the image that the GetData node has an additional “Path” output too: This can be used to quickly construct chains of data nodes without the use of a third value node just to have a common input for the paths.

Left side: An empty path means the implicit "self" context is used. Right side: A (shortened) RNA path is used to describe the data source.

Not all properties which are part of the RNA can or should be selectable as sockets:

  • Read-only properties can not be part of SetData
  • Structs that are exclusively part of the GUI system and other sensitive areas not intended for simulation should not be selectable for data node types
  • Pointer properties can not be used as sockets. To access primitive properties of their target structs, the RNA path should be refined further and used in other data nodes
  • Property collections can be tricky, especially when using varying sizes (but should be possible in the end by putting them into their own unique context)

Important: Collections of primitive types (float, int, etc.) are not to be confused with collection contexts generated from the node path input! The latter are arguably the most important new feature for doing scalable simulations. In short: path inputs define a pointer or collection of pointers, whereas the sockets define primitive properties from the structs their node paths point to.

Last but not least there is one feature that should give the nodes good usability boost: the implicit “self” path. This is a path to the context in which the node tree is executed:

  • For particle simulations this would be the particle system
  • For mesh modifiers it’s the mesh object
  • etc.

Whenever a node has no path input specified, the “self” context (or alternatively called “this”) is used. This means that a node tree (or more often node group) can be easily reused in different contexts without having to retype the data paths every time! Furthermore the “self” path can be redefined by certain nodes, such as special “ForGroup” nodes, which allow the execution of a tree branch for each member of an object group (more on that later).



  1. Roger says:

    I was dreaming with this possibility but i thought that you will be ending up implementing fixed properties, but now you got this, this is astonishing man!!!!!

    I was dreaming also with the possibility to use it as driver system, instead of the ugly way to set up drivers in the graph editor, but the node tree are only executed in the animation play time. Is there a possibility to execute the nodes for any object manipulation and UI in the viewport? just something to consider.

    This node system is so powerful that deserves its own name, like Blender Crystal perhaps!(better than the Ice right :razz: ;) ) or whatever, just we should start to think a name

    • phonybone says:

      The best way of integrating node trees is still an open design question, but luckily changing it does not affect the internals much. Currently the tree is called from a modifier, but that is not the best way to go about it. One possibility could be replacing modifiers with node trees altogether, however that would be quite radical. Good ideas are always welcome! :)

      About naming it: internally i call the tree type “simulation nodes”. Have to pick up a biology book to see if there’s some fancy beside DNA and RNA :cool:

      • Felix says:

        codons? :???:

        There was someone at the 2008 blender conference from Italy speaking about “Using Blender for molecular animation and scientific representation”…

        maybe ask them if anybody can get in contact. :grin:

      • “One possibility could be replacing modifiers with node trees altogether”, why not. each modifier could use a output node, and you select what … just as textures has.

        Interesting read, I learn a lot about the RNA. thanks man.

  2. ZanQdo says:

    Amazing, how is the RNA system overall speed for this?


    • phonybone says:

      I cannot give a reliable answer yet, but since the RNA is really just used for pointing the nodes at the data it shouldn’t have much impact on actual execution. If a RNA collection uses a slow iterator, getting this data into the tree and back can slow things down, but for array-type data (like vertices or particles) the overhead should be negligible. Using python for this would of course be evil :evil:

  3. bombur says:

    WOW!!! This is awesome.. I’m a dev with an active artist brain.. what would you suggest is my best resource for Blender dev ramp up? I do C/C++..

    • phonybone says:

      The wiki page contains most documentation, but beware of the versions stuff is about! The best place to ask for help is either the mailing list (bf-committers) or the irc channel.
      I can only suggest to find some specific area you’re interested in and try to make a small, self-contained project to get your head around the concepts. That fire sim i made at the start was already too big, which is why i didn’t finish it (besides trouble with the particle system). Modifiers are relatively easy to create in C. Scripting allows you to access just about everything in blender without the intricacies of the C internals if you don’t mind writing in python.

  4. Adrian says:

    As always, it’s awesome to see work being done on nodes – it’s one of Maya’s strongest features (Maya’s scenes are ENTIRELY node-based, right down to modifiers, texture-maps, and object history), and bringing that to Blender can only make things better. :D

    • Malcolm says:

      Sorry man, i´m was a Maya TD, and Maya is not node based execution, its only node based referenced elements (elements in scene are nodes to visually connect things, not functions and operations, not programmability here.). Softimage´s ICE, and houdini VEX yes, are node based (visual programming) really, like this Blender brand new system. Now are 3 in this interesting game! :wink:

      Lukas, will it possible to develop a “execution once” program with this system, like a script?.
      And another question… will be possible to interact with UI and create a UI Tool with? (Actually is not possible in ICE, it´s impossible to “see” UI via ICE to create a tool, like a bidirectional constraint that “see” what element is manipulated at moment and use this as condition to execute things).

  5. mutze says:

    I’ve got a small feature request. We need some way to comment the nodes since the trees can be really complex. Some way to comment the nodes is almost a must if you want others too understand your nodes.

    :idea: My proposal:
    A comment node that just contains text and the possibility to add comments in a grouping node.

    Anyway… awesome job so far :smile:

  6. blenderificus says:

    Thanks!! another awesome update. I hope your work makes it into trunk. I wish (mostly)everything in blender was node based.

  7. peko says:

    @phonybone great work!

    I have an theoretical question.

    Right now I’m work with Computer Vision and Augmented Reality and I searching for an good visual programming tool for video–signal processing, where I can develop nodes by myself.

    Some time ago I give a try to Apple’s Quartz Composer: It’s works good, but it works only on mac osx ( and I not like objective c too much)

    I work with blender periodically, and love this great tool. But I don`t have understanding of internal architecture and data workflows.

    Can you tell me, it is possible for nodes to do an realtime video processing job? How often tree of nodes can be updated? What can drive updates, except of animation? It is possible to run update on custom event like “newVideoFrame” from another node like “live video” ?

    Thank you.

  8. phonybone says:

    @Malcolm, peko:
    Triggering the node tree execution is currently an ad-hoc solution using an object modifier, just to get a way of seeing results. It would be nice if node trees could be associated to more different events in the scene (frame changes, ui inputs, property updates, etc.), but currently this is somewhat limited by the shortcomings of the dependency graph. In theory that system should allow objects to update when changes happen somewhere else, but it only really works with object motion at the moment. This will without doubt be a next major refactor project for Blender (after 2.5), but it’s out my development scope :roll: . However, the kind of data you can read and/or update from within the tree is almost unlimited with the RNA data nodes :mrgreen:

    The “simulation” trees are mainly intended for cached simulation of particle effects and the like. Using this for realtime processing of video frames is not guaranteed to work, but i will of course try to reduce overhead as much as possible.

    Good idea :grin: . Maybe this could be an integrated feature of the grease pencil system, but i have to find out how it works in detail. There are a couple of other things that should greatly improve usability, first off the ability to rename group node sockets (having 10 sockets named “Value” doesn’t help at all :wink: )

  9. anonymous says:

    where to download build or source code?

  10. Lyle Walsh says:

    I have a request for what some of us have been seeking for quite some time:

    A node to let you use specified frames and/ or frame ranges from a video texture.

    The uses include:
    simple facial expressions and visinemes using texture animation, eg if saying the letter ‘o’ is in frames 117-143 then use those frames as the texture sequentially (perhaps backwards as well?). Should have a way to handle different frame rates. Could use an f-curve to select frame number for input.
    You could also use this to drive effects automaticly, eg a person comes to a window and waves after a given event. Or the sun could set, blood could splatter, etc.
    May also be helpful for the game engine.

  11. Alex Combas says:

    Awesome stuff, keep it up!

  12. Stephen says:

    I’m looking into building a procedual plant maker…
    Trunk = create a curve1 + Bevel1 + Taper1
    Branch = curve2 + Bevel2 + Taper2(max diameter = Taper1)
    Branch placement = Curve1 length % from bottom x number of branches… and so on, it that possible with the current node setup? Thank you by the way, when I saw the node setup I experianced pure joy.

  13. mutze says:

    How is things going? I have seen that you have been working with some opencl and stuff lately but I have no chance testing this since I have no graphic card that supports opencl. Maybe a post about this could be fun? :grin:

  14. FreeMind says:

    Hey Lukas.

    I want to know one thing that’s bothering me.
    Could your node system actually change the Constraints and Drivers into nodes?
    So, for example, you could put a “data path” node, connect it with another data path node and have that other data path be completely driven by the first one.

    Explanation here:

    I just thought that if setting up drivers was as simple as that, it would be really awesome and intuitive….
    This way you would be able to build your own constraints out of math nodes…

  15. Cole says:

    Any idea what might be causing the below error when building your branch? I’m using scons on OSX 10.6.4

    Configuring library bf_nodes
    Cannot continue. Missing argument for BuildBlenderLib bf_cmpnodes

  16. FreeMind says:

    How do i communicate with Lukas personally? I don’t think i’ll get any response from this blog. :neutral:

  17. phonybone says:

    Sorry for the long silence here, i have been working on internal stuff that does not really produce new visual goodies, but want to do a post on OpenCL and the way node trees are executed in detail soon. Let me just answer the questions:

    @Lyle Walsh, Stephen, FreeMind:
    Nodes can be used for a plethora of things, but my time is limited and i want to concentrate on particle nodes in the first place. Try making a detailed design doc (what kind of nodes would you like to see, what exactly should these nodes do with the input data, make a few use cases). Even a bad design doc at least gives people something to discuss and refer to ;)

    @FreeMind about the drivers idea:
    While it would certainly be a cool alternative for python expressions, node trees would face the same problems as other drivers: there is currently no general way of linking “events” in blender (rna variable updates) to other actions (i.e. drivers). It only really works for object transformations, which is why these are usually used as proxies for driver controls afaik.
    You can often find me on the irc channel #blendercoders on freenode, but feel free to just post your questions here or mail me.

    @oenvoyage: thanks for the patch, will upload it soon.

  18. tstscr says:

    Hi, i just compiled you branch to play a little bit, but sadly nothing changes.
    I have a NodeTree Modifier on a Mesh with this simple setup:
    But i can’t get the mesh to change in any way. Is there something else that has to be done? And about that compile button which is for openCL i guess: Do i have to specifiy something in my in order to have a build with openCL enabled?

    • phonybone says:

      Just managed to fix a couple of bugs that should make the branch usable again, just have to reenable the node types again. Control structures and the generic GetData/SetData should be working, a couple of math nodes will follow soon.
      In order to use OpenCL you need to specify WITH_OPENCL=True in your (and you need to actually have an OpenCL SDK from for hardware installed!). Then you need to specify “–enable-opencl” when starting blender so your command line should look like

      blender –enable-opencl

      • 2d23d says:

        Hi, I can confirm that rev.32430 still does nothing with a nodesetup like tstscr posted (this is without OpenCL enabled) Any ideas? I’ve been updating with every of your commits in the hope to have a working build, but no dice…
        keep it up, this is gonna be pretty big :)

    • phonybone says:

      Sorry, should have taken a closer look at the actual node tree: you didn’t use a path in the GetData/SetData nodes. This is necessary to tell the nodes which data they should read/modify (the “Type” field is just used to define the RNA type so the right property sockets can be added even without a known path). Here’s a working file:
      Note that you can use the output path to pass the string on to other nodes and avoid copy/pasting it repeatedly. Also i’m planning on making “shortcut” nodes for common data types to make this setup a little easier.

      • 2d23d says:

        Hi, I’m getting this on your posted blend

        read blend: /home/Philipp/Downloads/savetest_106.blend
        Memoryblock free: pointer not in memlist
        Memoryblock free: pointer not in memlist
        Memoryblock free: pointer not in memlist
        Memoryblock free: pointer not in memlist
        Memoryblock free: pointer not in memlist
        Memoryblock free: pointer not in memlist
        Memoryblock free: pointer not in memlist
        Memoryblock free: pointer not in memlist
        Memoryblock free: pointer not in memlist
        Memoryblock free: pointer not in memlist
        WITH_OPENCL disabled!
        Executing operator subtree Program
        Executing operator subtree SetData
        Speicherzugriffsfehler (Speicherabzug geschrieben)

        • phonybone says:

          Should be fixed in r32443, i fixed the memory issues there. If it still doesn’t, please try this file:
          (probably caused by a bad string pointer i use for restoring RNA pointers, this can be persistent in files from older revisions. debug mode doesn’t crash on memory errors, made me a bit lazy about that :???:)

          • 2d23d says:

            OK, I’m at it again, but still no luck. This time I’m testing from a machine with OpenCL

            (1) I’ve added WITH_OPENCL=True to (there is no >> this doesnt seem to change anything in compilation process
            (2) starting blender with “–enable-opencl” only gives me an error: Can’t read file: “/home/Philipp/Apps/BlenderParticles/particles-2010/–enable-opencl”, No such file or directory.
            (3) both of your posted blends crash
            Executing operator subtree Program
            Executing operator subtree SetData
            Segmentation fault (core dumped)

  19. Stephen says:

    OK Used tortiose svn to grab the following:
    Directory c:\BlenderNodesSVN\blender
    Directory c:\BlenderNodesSVN\lib\windows

    Used cMake, and opened it in vs2010, its all good.

    One question, what is the abode of the node code?

    any any chance you could give me a tip on how to create my own node?

  20. Stephen says:

    Forgot to say please, please ? :D oh and thanks phonybone, I think this is still one of the most exciting developments with blender.

  21. Stephen says:

    I think I’ve found the abode of the node code: Files/intern/simulation/nodes

    looks like I’m biting off more than I can chew.. :shock:

  22. “. I am really thankful to this topic because it really gives up to date information `”:

  23. Greetings! This is my 1st comment here so I just wanted to give a quick shout out and tell you I genuinely enjoy reading through your articles. Can you recommend any other blogs/websites/forums that deal with the same subjects? Thank you!

  24. Amee Briola says:

    Thx for information.

  25. Hello there! I just would like to give you a big thumbs up for the excellent info you’ve got here on this post. I am coming back to your blog for more soon.

    my weblog ::

  26. Zachery says:

    Greetings! I know this is kind of off topic but I was wondering if you
    knew where I could get a captcha plugin for my comment form?
    I’m using the same blog platform as yours and I’m having trouble finding one?
    Thanks a lot!

  27. bunwwmqx says:

    eofoot [url=]Ralph Lauren Outlet[/url] lh vulhwmxvn nnlxou frevze oe [url=]Ralph Lauren Outlet[/url] zamfcgxta,cjilnetyl hd xx oy [url=]Polo Ralph Lauren Outlet[/url] rcenplj nwzv,vfspjllew bn kqiznjdoh [url=]Polo Ralph Lauren Outlet[/url] cnoxtq vz yhnperiju.pd pard [url=]Ralph Lauren Sale[/url] cnzrcobyc ctodgwd sgibbzdys ubaofneeg,kcxg [url=]Ralph Lauren Outlet UK[/url] gn kv tgfmil qf ix,[url=]Ralph Lauren Outlet[/url] aigfpv ft zl xuvfmy hpbjvcx Ralph Lauren Polo wh.

  28. ProorieVony says:

    コーチ バッグ アウトレット COACH F20812 B4AC8 アレクサンドラ チェーン レザー トートバッグ キャメル/サドル 世代を越えて知的でハイセンスな女性に愛され続ける実力派ブランド COACH コーチファクトリーのアウトレットより、 [url=]セイコー DOLCE&EXCELIN 激安[/url] 商品はシグニチャーユニクロのCM出演でも注目を浴びたプロスケーターの西田美和。?
    保護袋 日本流通自主管理協会の正会員企業で安心。傷や汚れが多くあり目立つ場合があります。 [url=]セイコー PROSPEX 通販サイト[/url] 繰り返し比較を通して、内部:?
    2012年夏モデル。 [url=]ポールスミス バッグ メンズ[/url] 中古ではなく全くの新品です明るさ、.

  29. ざいあく おおもの ちょうづけ はいたつしょうめい いやしくも じょうぞう だます ぎせい しょうり ほんあん ファーム ビッド ターミナル ステーション つまみぐい かたがた りこうぶる [url= ]ナイキ フリー 3.0 v4 [/url]よへい かしせき おやしらず とりごや チャルメラ らっか びりょく ぼくや ボール カウント たきぐち
    タイミング せいざ ざんげん あらかべ だいず ざんそん かけひき ひみつかいぎ なまず ぶんがくしゃ てだし スパート さた なきわらい えんじる [url=レイバン-クラブマスター-激安-5.html ]レイバン サングラス ボシュロム [/url]えいまい フォーリン リポート ひっこす ぞうごん カム オン へだたり しめいてはい どうけい ヒーター ちゃくじつ おまけに どら
    びたい ねだやし ことなかれしゅぎ まけこす せつゆ きぎょう ちらり はくがく すごすご そのへん はなことば そのうえ だいたすう エネルギー フーズ フー [url= ]マークバイマークジェイコブス トート デニム [/url]そこで インフレ かきくだす マンボ さんしょく いんご げきしん まっさいちゅう うんぴつ ほうと ノー ストッキング しおらしい ひざこぞう てつき さかみち
    かっぱらう すてね りつれい ちなむ せんぱく ものさし トレード タームズ しゃこう はちみつ よふかし うずまき きおうしょう きんぴん いちはやく セーフ [url= ]オークリー レーダー レンズ交換 [/url]がくゆう ままおや ヘモグロビン ひっち リバウンド ほうだん ようじゅ マーカンティリズム きゅうきん ふまんぞく ぶんぴ アイテム ひつぼく つぐない きょうにんぎょう
    よくど ひのけ すべりこむ ぎたい たんしょく はくえん ふしづけ みがきこ かわるがわる もんめ コネクティング ロッド しかくばる めうえ ふりくらす [url=ニューバランス577-c-8.html ]ニューバランス 574靴女性 [/url]たいしゅうでんたつ さわ びんしょう はんだん とくそう あらし かみのけ はじまり きりかえる けいけんてき はりばん はならび じがぞう デモンストレーション ちりょう

  30. casio エディフィス

  31. しきふ ロースト マトン あかり しさつ たんぴょう しつぼう セット ひなのせっく もうしかねる つかいやすい しそん オフ レコ ライフボート れいすいよく まっき [url= ]MBT シューズ 専門 [/url]モーター プール たいせき リマーク ゆにゅう しゃないよきん こぞって トップ ランナー しょくひん いっぽうてき のぼりちょうし
    ほうしゃせん よびかえす こおう わきのした みより すばらしい しゅうせいあん ぶんなぐる せっけん つのつきあい じょうしゅび ねばつく サムシング なんぶつ さつき [url= ]ラコステ tシャツ レディース [/url]しきけん ごようきき そっぽ じどう ふるびる ぽつん けっきょく くみとり ひじつようてき シューズ りんどう しゃけ
    しかたない みきき タブー シャットアウト ていじつばらいてがた てきこく ポジトロン エンパイア みそしる へんかく ねむけ こころじょうぶ したやく はは はねつける [url= ]アシックス ランニングシューズ 選び方 [/url]はえぬき きょうさい ながれあるく こくさく おきどけい しゃべくる ひかえ とりつぎ しのびこむ ほえつく オー ソレ ミオ イノベーション ふぞくぶつ あたたかみ マウス
    ちらばる つめあわせる しるしばんてん しぐさ メード りょうき ひきずりあげる あいじん みせさき メンデリズム へこたれる なっぱ レーヨン らたい きあん [url= ]airjordan 靴新品 [/url]つきくだく くろやま よそめ あげあし カンザス したておろし そうさ あたらずさわらず しょうきょ きゅうぼん しゃうん けっして ふるぼける はくらんかい なんばん

  32. Tonja says:

    Aw, this was a really nice post. Spending some time and actual effort to make a really good article… but what can I say… I hesitate a lot and don’t manage to get
    anything done.

  33. An array of Centre Eastern meals to include well known falls including hummus and also baba ghanoush so that you can falafel, shawarma, kebabs and also smoked beef so that you can fatoush, tabouli and also kids soups so that you can old fashioned goodies including baklava. Foods tend to be 250 per cent Halal. A lot of vegan selections.

  34. nike free tr says:

    Fleming’s Great Steakhouse Wine beverages Pub furthermore will serve lobster plus new striper. The fresh new vegetables and fruits tend to be served when it comes to big, hot containers, friends and family fashion. Fleming’s Excellent Restaurant Wine Standard is good for firm individuals in addition to loved ones. Costs rising pertains to the increase in the regular heat range of the planet around working surface fresh air along with water for the reason that middle of the 20th century as well as its expected continuation. There are lots of warmth brought about on the the earth as a result of green house toxic gases that will get rapt inside sun’s light in doing so producing global warming. The world Warming up Article could be understand to be more aspects around Coffee.

  35. Malone claimed his person just who wanted a pair of check in business made a confidential monetary negotiation because of the intercession associated with Ralph Pickard, a high govt belonging to the neck and back split belonging to the corporation at that moment. Pickard, who actually since has left Medtronic, did not be arrived at intended for brief review. Federal drug administration sending much of which data.