Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Visual Logic Editor WIP

Discussion in 'Made With Unity' started by rytis, Aug 28, 2009.

  1. Havok

    Havok

    Joined:
    Aug 21, 2009
    Posts:
    36
    :eek: :eek: :eek: :eek: :eek: :eek: :D :D :D :D :D :D :D :D :D :D :D :D :D :p :p :p :oops: :oops:

    AWESOME!

    Rytis....WOW....Unity 2.6 now you show this!
    Can Unity get any better after this?

    I know it's not really committed for Unity... YET!?? :) but this is one HELL of a killer feature.

    I really hope this gets implemented soon!
     
  2. rytis

    rytis

    Guest

    Joined:
    Jul 11, 2008
    Posts:
    138
    I like your attitude! :)
     
  3. L-Roy

    L-Roy

    Joined:
    Feb 11, 2008
    Posts:
    2
  4. Havok

    Havok

    Joined:
    Aug 21, 2009
    Posts:
    36
    I like your VLE! :D
    :wink:
     
  5. runningbird

    runningbird

    Joined:
    Sep 3, 2009
    Posts:
    382
    I just voted.

    I think this would be an awesome addition to the Unity Engine... it just keeps getting better every day.
     
  6. deram_scholzara

    deram_scholzara

    Joined:
    Aug 26, 2005
    Posts:
    1,043
    I would ABSOLUTELY use this... I was actually considering building one with one of the programmers at my school.
     
  7. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    I know about AngryAnt's library, I have my own, I just would be very interested in the skeleton of this and how to create my own interface in Unity like this, his AngryAnt's AI library doesn't interest me. Thanks though.
     
  8. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    search for the graph editor beta on the showcase board, it includes all sources and shows how to procedurally generate textures on a very basic level
     
  9. lazalong

    lazalong

    Joined:
    Oct 13, 2009
    Posts:
    139
  10. daxx2k

    daxx2k

    Joined:
    Aug 10, 2009
    Posts:
    37
    node based logic is the future guys!
     
  11. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    It is certainly a fun way.
     
  12. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I just gave all 3 of my remaining votes to this project, hope it helps! ;)
     
  13. rytis

    rytis

    Guest

    Joined:
    Jul 11, 2008
    Posts:
    138
    AngryAnts library and this one was made (at least so far) without touching a line of Unity source code. So there is nothing special about making one yourself.
    Do you think for your interface you would need something more than current VLE does? How would your interface be special?
     
  14. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    Well, there are now several node-based coding systems in addition to yours (eg, Quartz Composer, C4D's Xpresso...) which all work essentially the same way. The purpose is different in each case, but the system for designing the graph is more or less equivalent in each case. With an XML format for node descriptions and graph connections, you could have a standalone editor with no execution engine at all simply to design the graph and save it as XML. Then, in principle, Xpresso, Quartz, etc, could load the XML and execute it, regardless of how it was created. The same editor could be used for project-specific graph systems like AI, magic, etc, and could easily be made accessible to end users.

    I'm really just saying I think there's an industry standard format waiting to happen and it would be great if it originated from UT.
     
  15. rytis

    rytis

    Guest

    Joined:
    Jul 11, 2008
    Posts:
    138
    It used to be in XML at first, in my view main benefit was to be able to merge conflicting sequences with file versioning systems. It caused more trouble than benefit though. Like how do you specify reference to a game object? Name is not good enough, and there is no other way to uniquely define it. Also I had to have IDs for all kinds of stuff instead of just having a reference in C# and let Unity's serialization system handle the rest.

    How do you then define code logic for each node? Would it be something like WiX installer where you write all ifs and whiles in XML? I had used that a bit. It's something to wake you up screaming at night :)
    What about links to scene objects? What about tool specific APIs?

    That is a different problem. We could make that editor extensible so users can do their custom editors in Unity. External ones... Nah :)
     
  16. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    You're not really getting what I'm saying :)

    The node set definition file (in XML) would simply define the name and inputs/outputs for visual display of a node. Something like:-

    Code (csharp):
    1. <nodeset name="UnityVLE">
    2.     <type name="RandomRange">
    3.         <input name="Lower" />
    4.         <input name="Upper" />
    5.         <output name="Result" />
    6.     </type>
    7.    
    8.     ...
    The graph itself is then defined by a list of nodes, in another file:-

    Code (csharp):
    1. <graph nodeset="UnityVLE">
    2.     <nodes>
    3.         <node type="RandomRange" id="ajhsdf9878" name="Choose array element"/>
    4.         <node type=..
    ...and a list of links:-

    Code (csharp):
    1. <links>
    2.     <link startnode="ajhsdf9878" output="Result" endnode="dfajhsdd8787" input="Index" />
    3.     ...
    This is essentially all you need to display and edit any kind of node graph.

    No functionality is coded with the XML. The execution engine can read in any graph built with the node set it understands, and execute it using whatever internal method is appropriate.

    This is powerful because anyone can now define their own XML node set and use an existing editor to create graphs (ie, they can make useful stuff without the effort of writing their own node graph editor). These custom graphs would be meaningless to VLE, but the users can write their own code to consume the XML and "execute" the graph. In fact, you could provide an API to construct a useful graph data structure from the file. Likewise, anyone can write their own editor (an external app or a web app, say) that can accept a given node set, edit the graph and generate the graph XML - this will interoperate with any execution engine. You wouldn't need to write an external editor, but if someone else did, it wouldn't be a bad thing, right?
     
  17. maxfax2009

    maxfax2009

    Joined:
    Feb 4, 2009
    Posts:
    410
    Hi rytis

    I think Unity should make this apart of Unity so you can work on it full time.

    I would vote - but I have no points left.
     
  18. rytis

    rytis

    Guest

    Joined:
    Jul 11, 2008
    Posts:
    138
    andeeee>

    I just don't see making super generic good-for-everything node editing tool as an important goal at this point in time.
    There are 10000 ways of doing node editor. If someone will want custom editor he will very likely also want to edit nodes in some different way.
    I'd rather approach of making something good for specific case and generalizing later.
    It would be like 0.01% of users making custom node editors you know :)
     
  19. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,364
    This is a must have. I have and artist and one designer waiting for this to happend, they both know how to do stuff on a visual way, but zero in code. So i have to handle everything related to code.
    It will be nice if we(the programmers) could make classes with functions, that our designers/artists could interact with and connect in a visual way. :D
    Cheers...
     
  20. HJP

    HJP

    Joined:
    Jul 8, 2009
    Posts:
    152
    that is true ... this kind of solution would be very helpful!
     
  21. felneymike

    felneymike

    Joined:
    Jul 16, 2009
    Posts:
    14
    This would be awesome if it was implemented. Kind of like the way of "coding" in Multimedia Fusion, except with a 21st century engine and not a compromised slow one that requires endless stupid workarounds just to get something as simple as an IF_ELSE function.
     
  22. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    I remember that thing. The only thing I like about that company is its automatic install maker thing. :D
     
  23. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    I want to know "how" to make it, for many reasons, I didn't think it touched a single line of source code, that was never even a though of mine nor did I mention that. I would want to see a skeleton of a simple way to start this. The shell for the screen, then the graphic and connectors. I have downloaded the other thing mentioned and will look over it some, but how mine would be working would be completely based off XML files, where they are also linked to CS files for which file houses the logic that goes with that node.

    Anyway, all I am asking for is a basic, simple way to begin, not taking someone elses work full bore and using it, but instead just a skeleton model that shows how to create and drag around and connect those objects in the interface. Hopefully the graph beta will give me what I am looking for, I didn't mean for this to turn into a "why would you need it" question and answer list.

    My AI uses FuSMs, FSM, Pre-processed node networks, and quiet a few other techniques, and what I want to do is do a logical flow network to tie into my node system and my different state machines to get a better visual of what is going on and when it is happening. I have LISP files that I read in, which allow me to change on the fly some values while the game is running and quiet a few other mechanisms in place. What I don't yet know how to do is make a graphical editor in Unity myself.

    Anyway, thanks for considering my request.
     
  24. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,364
    I think that most of people are unaware of this posible feature, they must know this could be a very powerfull feature for Unity :p
     
  25. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    May I ask how you are drawing those diagonal lines in the editor gui? are diagonal lines in gui available to end users at the moment?

    EDIT: Just realized you can draw Handles in the GUI :)
     
  26. SimonAlkemade

    SimonAlkemade

    Joined:
    Feb 4, 2009
    Posts:
    432
    This was what I was hoping for. I've worked with Virtools for 4 years and this is what could make unity much more accessible. Can't wait for a release.

    Also a suggestion would be to include JS scripts inside the nodes, so everyone can create these nodes themselfs.
     
  27. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    That would be really neat, and very good.
     
  28. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    The more I look at this and your VLE, the more I think the only things missing are a block for the source code that goes with the element. Like [srcFile][/srcFile] where we can state our logic file, like now we drag script files onto game objects, this would be almost no different, instead of dragging them on we reference them OR something like [EntryPointClass]myLogicClass[/EntryPointClass], then in that class we have something like VLEMain() method that is used first (like main() without parameters).

    What would be totally rad would be if the VLE is visible during test (not build, just hit play and like can view console, can view VLE), this way we can "watch" the logic as each element then gets highlighted. This would be very processor intensive, but well worth it for visual debugging. Would come in very handy per object, so if you select a game object in the scene that has an attached VLE elemtent, during "run" when you click that object, the VLE switches to what ever VLE logic is associated with that object and you can visually see all VLE elements trigger and when they trigger, so you can have object independent VLE, instead of just 1 VLE workspace, you have the ability to have a VLE workspace per object (and thus the VLE won't become convoluted with tons of different logic trees)

    For instance, I select Lerp in your scene, only VLE elements that are directly associated with LERP are visible, I select the elevator, only VLE elements associated with the elevator show up in the VLE. This idea hit me upside the head like a ton of bricks, the growth of this would be outstanding. However, this idea would probably require internal client code changes. But the OMG factor..
     
  29. rytis

    rytis

    Guest

    Joined:
    Jul 11, 2008
    Posts:
    138
    zumwalt please read the first post in this thread. There is a sample code for a custom node.
     
  30. Bael

    Bael

    Joined:
    Jul 21, 2008
    Posts:
    106
    Very cool stuff - I've been wanting a visual graph system like this for animation blending ever since I started working with Unity (and Unity desperately needs one to handle more complex character animation).

    Was that built entirely in editor script?
     
  31. DrHotbunz

    DrHotbunz

    Joined:
    Feb 14, 2009
    Posts:
    315
    This post totally freaked me out.

    I am still not sure what to make of it. It reminds me alot of PLC programming logic software.
     
  32. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,364
    Am making a similar node system to define states machines for our next project. Once finished, i will provably release it to the community. 8)
    Cheers.
     
  33. llde_chris

    llde_chris

    Joined:
    Aug 13, 2009
    Posts:
    205
    That's really cool.

    The programmers create custom nodes.
    The level designers use VLEs.

    That sounds like a much more productive workflow than what we currently have.
     
  34. SimonAlkemade

    SimonAlkemade

    Joined:
    Feb 4, 2009
    Posts:
    432
    Also have a suggestion to have a similair setup like in virtuals in the way that it's represented. So that the stream of activation deactivation of nodes is done in a horizontal flow and that the flow of paramaters and return values goes vertical. This way the readability of the flow becomes much clearer, I always found the problem with Quest3D (which doesn't make a distinction) to be that program flow becomes unreadible after a while when node graphs become larger.

    Also another suggestion to create more readability is to give the user the ability to group a node graph into a new node so that you have a depth hierarchy in you visual code. then you have only a top layer that has the functions like start, update awake etc and if you double klik on those they upon up and contain new node graphs and those nodes can contain new graphs etc etc.

    well just some interaction designy tips

    I would love to see a visual node based programming tool in Unity that would certainly speed things up on the high end side.
     
  35. maidamedia

    maidamedia

    Joined:
    Nov 19, 2009
    Posts:
    224
    Hello, I am new in Unity. I had experience with Virtools for many years. I am not a programmer and I loved very much the visual approach of Virtools. Perhaps most of You don't know Virtools and for this reason I attach 3 images to make you understand how it works. Now I am using Unity 2.6 especially because I like its integrated vision of the project and the terrain editor that is totally absent in Virtools.
    My results at the moment ar really bad on the interactive side, but I am very happy with the environments I can create in Unity. But without the visual organization of the building blocks I had in Virtools, I am doing something nice to see with 0 interactions! Too much lines of code to make a character move properly, while in Virtools just one building block solves the problem.

    I really hope that you inthe future can integrate the visual approach of Virtools in Unity!
    Sorry for my poor english
     

    Attached Files:

  36. maidamedia

    maidamedia

    Joined:
    Nov 19, 2009
    Posts:
    224
    I also forgot to tell you that if you need help I can be the right "monkey" to try your application.
    Stefano
     
  37. _-MADMAN-_

    _-MADMAN-_

    Joined:
    Nov 3, 2009
    Posts:
    40
    Hi,

    It is quite cool project. NODE's are always helpful. Hope this addon do not replace scripting, but unwrap it is power (as said before with custom nodes etc.).

    Looking forward.

    Regards,
    Mad
     
  38. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    Ditto, I would love to test it for you.
     
  39. frankrs

    frankrs

    Joined:
    Aug 29, 2009
    Posts:
    300
    This looks awsome. I'm a 3d artist and have very little programing knowledge. I got turned on to games by the blender game engine that has the same type of thing. scince then I've been serching for a "real" game engine that has the same type of logic nodes. I love unity for its visual 3d app type tools, and I recently found the quest 3d and virtools engines with the node editors and thought I'd have to choose between the two. Keep up the work this looks ultrasweet. How does the behave thing work?
     
  40. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    Definetly usefull would love to see triggers and events and firing and killing character through this editor easier then coding.

    I've been looking for this. Yes please put this in Unity Blender has it and it's unusable for any iphone and ipod touch work.

    I'm a 3d artist trying to learn coding this will make my life easier...
     
  41. StickyNavels

    StickyNavels

    Joined:
    Dec 13, 2009
    Posts:
    11
    Just stopping by to give my vocal support to this project. I think you're doing a great job. Keep it up! Can't wait to try it out myself.
     
  42. rytis

    rytis

    Guest

    Joined:
    Jul 11, 2008
    Posts:
    138
    Just wanted to say thank you all good people for support! :) Hopefully this project will turn into something useful ;)
     
  43. FreelandCJV

    FreelandCJV

    Joined:
    Nov 12, 2009
    Posts:
    221
    #1: I'm an artist that is making a game.
    #2: I'm a serious artist that is making a game.
    #3: I'm an extremely low level coder.
    #4: I just started actually understanding Js and C# script types.
    and lastly...

    #5: I NEED THAT SCRIPT!!!!!
     
  44. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    This was humorous and slightly annoying :D. Anywho, yes this would be great and I can't wait to see what type of stuff it is capable of.
     
  45. FreelandCJV

    FreelandCJV

    Joined:
    Nov 12, 2009
    Posts:
    221
    That's just who I am...
    Humerus, and slightly varying to extremely annoying.

    :D :D :D :D :D :D
     
  46. Havok

    Havok

    Joined:
    Aug 21, 2009
    Posts:
    36
    This thing done yet? :D
    It's 2010 already... geez! :D
    How is it going?
     
  47. rytis

    rytis

    Guest

    Joined:
    Jul 11, 2008
    Posts:
    138
    It's not getting released in the near future. But it's moving :)
     
  48. Mirek Uhlir

    Mirek Uhlir

    Joined:
    Dec 25, 2009
    Posts:
    124
    It looks really usefull! Good work!
     
  49. Jedimace1

    Jedimace1

    Joined:
    Jan 2, 2010
    Posts:
    119
    The extensibility is really nice, I could find some good uses for this. I can code just fine now so I'm not too excited about it, but it would definitely help with level editors working in Unity. I would hope this could come as part of the Unity install, to make life easier, even if it was just tan option at install time.
     
  50. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    Is there any way you can sell it as a plugin for Unity I'd be willing to pay for it..