It looks like you're using an ad blocker! I really need the income to keep this site running.
If you enjoy BlenderNation and you think it’s a valuable resource to the Blender community, please take a moment to read how you can support BlenderNation.

Blender DNA, RNA and extreme backward compatibility

28

Blender DNA, RNA and extreme backward compatibility  blender Here's an interesting look into both Blender's past and it's future: In an excerpt from a discussion on IRC, Ton Roosendaal explains about Blender's existing DNA and upcoming RNA structures. DNA powers an often overlooked Blender feature - it's amazing backward compatibility. Thanks to DNA you can read Blender files back to version 1.00!

Ton writes:

Q: do DNA and RNA actually stand for anything?

They're analog to the biological meaning. Blender DNA is as old as Blender, it's a long string with encoded types for the entire internal structure of Blender's data, saved in every .blend, and in every Blender binary. With this DNA it can read older or even newer files. Blender is even "aware" of its own data types, i.e. you can give it a pointer, and Blender can find the item named "vertex" in it. This makes .blend files still readable, even when saved in 1.00 (try this example - an original Roosendaal).

Q: .. and RNA?

That's a 2.50 feature, a system to wrap DNA into a nice API to read/set Blender data and properties. It actually means "messenger DNA", which is not totally correct, because RNA makes DNA in cells.
Our RNA can auto-generate a Python data-access API, and will allow feature "everything animatable", auto-button-list-view of data and it will even handle dependencies in future.

A lot of educated engineers hated this DNA, thats why all rumour in past to replace it with XML. :) There are still people who think XML is superior... the funny thing is that Google, for all internal development, replaced XML for a similar DNA system! You drop human readability of files, but have the same flexibility, and lots of lots more speed. Afaik, Blender is the first public app doing this.

Share.
  • henk

    Interesting concept, although the biological analogy is, well, wrong...

  • http://www.hessiess.com Hessiess

    That blend file wont open in 2.46, at least not the version I compiled some time ago.

  • Eelko Gielis

    It opens just fine in 2.48 Windows build, and renders injust 00:00.67

  • Charlie

    If someone needed to, I'm sure that an xml importer/exporter could be written.

  • BLENDER BOY!

    ("There are still people who think XML is superior… the funny thing is that Google, for all internal development, replaced XML for a similar DNA system! You drop human readability of files, but have the same flexibility, and lots of lots more speed. Afaik, Blender is the first public app doing this.")

    Ton , thank you!
    really
    Thank you for being on the bleeding edge of software engineering. That's why Blender is the only open source software that I think has a bright future.

  • Mantar

    I'm not sure XML really qualifies as "human readable" anyway. Heh!

  • http://www.ivogrigull.com Loolarge

    I am really looking forward to "everything animateable" :) Like being able to animate the stretchyness of an IK chain on and off. Blender frigging rocks, i love it!

  • http://www.smoofles.at Samo

    If Blender moves to XML it should first be rewritten in Java, of course. To be portable and all! ;o)

  • Mateus

    Samo, make blender web app too! ¬¬

    Like blender isnt very portable already...

  • http://www.blendernation.com Bart

    @Samo: didn't you have some deadline to meet? Shoo! :)

  • Agile

    You guys have a luck:P I am biotech insider.

  • nawabz

    is it possible to jpin the meetings. if so what days are they and where.

  • BlenderLovingSquirrel

    wow I'm impresses - that's really neato

  • http://www.playsign.net/ Toni

    Nawabz,

    the meetings are on Sundays on #blendercoders on FreeNode,
    and the agendas and minutes are on the Blender wiki -
    http://wiki.blender.org/index.php/BlenderDev/SundayMeetingAgenda

    ~Toni

  • http://www.anicator.com AniCator

    The KoesWous Logo loads fine here.
    I love Blender's backward compatibility.
    RNA would make it even better. It's a relief that this RNA isn't used to build DNA.
    If that would happen Blender's system would report this:
    If you're happy and you know it, syntax error!
    Syntax Error

    Viruses use RNA to screw with our cells. :( I hate viruses. I'll beat the crap out of HIV if it tries to get close to me.

  • Aka

    For all those who don't know this: http://www.youtube.com/watch?v=pExPlt_yUew .

  • BlenderLovingSquirrel

    hey bart how'd ton put that hole in the middle of his curve like that?

    thanks! x3

  • http://ustherobots.com Sam

    Ton is very smart like that.

  • scrag_10

    @BlenderLovingSuirrel

    In edit mode at another curve, it should do it by itself.

  • Bozo

    Sounds very interesting, is there any development documentation available on that, or does one have to dig through the sources for conceptual details ?

  • FishB8

    @Bozo: There is no development documentation (that I'm aware of). There is a nice abstract documentation that gives some insight to the concept: http://www.blender.org/development/architecture/ But developer documentation is best found looking through the code, or bugging devs on IRC.

    RNA has a wee bit of API documentation:

    http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNA
    http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNATasks
    http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataAPI

  • gat

    wow that RNA sounds awesome, can't wait to see what they will come up with!!!!!! :D

  • irowebot

    I'm really interested in this DNA approach to programming. I think it's ingenious and i would like to learn more about it. I've been searching google and its tough to find anything relating to it. Mostly what i find is about programming actually DNA to do computing, not programming that mimics DNA. I think its always smart to use nature as a template to work from because most of the work has been done for you. I would love it Bart or Ton if you can post anything more about this.

  • http://advanced-lemon.blogspot.com/ epat

    Hey there - I've always thought that the DNA was one of blender's strengths! XML is awful if you want to load files quickly!!

    Here's an idea though - sometimes forwards compatibility gets slightly broken between releases, although backwards compatibility gets patched. How about if Blender went one step further? How about if it could read an external file for the forwards compatibility patching code (maybe a dynamic library that comes packaged or built with the program) - that way, when a new feature in blender breaks forwards compatibility, somebody could write code to read it back into the previous version of blender as nicely as possible, so getting an old blender version to read a newer file correctly would be as simple as replacing the old external file with the latest one and running through the patching code to the required level each time a file was loaded with a DNA saved by a newer version of Blender than the version reading the file!! If the library with the code was stored user-wide (e.g. under ~/.blender in linux), then each new version of blender could replace the file automatically with a newer one when run for the first time, thereby causing all older versions of blender installed on the same system to read the newer files correctly using the new patching code.

    My idea reminds me a bit of the import __future__ statements in python. Of course, getting developers to maintain the code properly could be an issue, though it might be reasonable to assume that if something breaks backwards compatibility, it must also break forwards compatibility, or am i wrong?

    Just an idea.
    ~epat. :P

  • Bozo

    @FishB8: Thanks a lot for the links, they are very helpful for getting an overview on this topic !

  • Nemesis

    I am looking forward to 2.50 and RNA.

    Glad there is no XML, it is an annoyance at the best of times.

    Also hope the X64 version of 2.50 comes out at the same time as the X32 version.

    Keep up the good work, it is much appreciated by me.

  • Charon

    Funny and amazing! I even tried the linked file, great!!

  • http://pan0.net halcor

    This concept quite reminds me of the Extensible Binary Meta-Language (EBML), that is used in the Matroska project. Cool stuff.
    http://ebml.sourceforge.net/

Share.