Jason Posted October 26, 2005 Share Posted October 26, 2005 Hi there, I had a thought this morning (yes, in the shower) that Houdini has only one way of auto-arranging nodes. It's not very configurable, and in the case of VOPs, quite amazingly laughable (sorry SESI). So, how about trying to find some fun ways of improving it? Enter the first Scripting Challenge on odforce. There is freely available a package named "GraphViz" which will layout (and render) DAGs. This package is often installed on default Linux distro's and you can download it for Windows too. The executable is called "dot" and can output many formats, textual or image data. The challenge is to create a script that sends the nodes defined for a network (all or only selected nodes) to dot to get it to create a node layout and then you parse the results and relocate the node positions in Houdini (using oplocate). Points go to: */ is the code defensively written */ well commented */ cross-platform */ as simple as possible */ but supporting as many features of GraphViz as possible. If you can use HScript to perform the entire thing then all the better, but you may use PERL, Java or Python. Cheers! Jason LINKS: http://www.graphviz.org/ ... PS. Some other ideas were to somehow use the springs constraints with RBD Solver, the Wire Solver or the Cloth Solver to relax a solution to a node network. Also fun! Quote Link to comment Share on other sites More sharing options...
michael Posted October 26, 2005 Share Posted October 26, 2005 heh heh heh...nice challenge! PS. Some other ideas were to somehow use the springs constraints with RBD Solver, the Wire Solver or the Cloth Solver to relax a solution to a node network. Also fun! maybe the Pelt tool would work here also....might be faster... Quote Link to comment Share on other sites More sharing options...
meshsmooth Posted November 1, 2005 Share Posted November 1, 2005 Just a point on thinking in the shower.... Think fast your waisting water, but to do that I suggest using the mirror as a white board. It is good for nutting out the bigger ideas that need a little diagram. That is if you can see it at the same time as having the shower, same goes for shaving i guess. Quote Link to comment Share on other sites More sharing options...
Wolfwood Posted November 2, 2005 Share Posted November 2, 2005 Hi there,I had a thought this morning (yes, in the shower) that Houdini has only one way of auto-arranging nodes. It's not very configurable, and in the case of VOPs, quite amazingly laughable (sorry SESI). So, how about trying to find some fun ways of improving it? Enter the first Scripting Challenge on odforce. I'll be the first to say that this is no easy task...I got so fed up with VOPs one day that I pulled the L key off my keyboard. Before you jump into scripting take some time laying out the networks on how you want them to look. Then make rules for yourself as you do so. Sounds like tons of fun....I'm game Quote Link to comment Share on other sites More sharing options...
megalith Posted November 2, 2005 Share Posted November 2, 2005 Sounds like a good idea Jason. I'll poke around with it some as well. I've only really used GraphViz with doxygen before, so I'm not very familiar with it. Should be fun though! Is using the HDK out of the question?...please say no. ~megalith Quote Link to comment Share on other sites More sharing options...
malexander Posted November 2, 2005 Share Posted November 2, 2005 To all those about to create a sensible layout algorithm for VOPs - very best of luck to you! (seriously, too) Quote Link to comment Share on other sites More sharing options...
Wolfwood Posted November 2, 2005 Share Posted November 2, 2005 Sounds like a good idea Jason. I'll poke around with it some as well. I've only really used GraphViz with doxygen before, so I'm not very familiar with it. Should be fun though! Is using the HDK out of the question?...please say no. ~megalith 22318[/snapback] I'm pretty sure anything is allowed...as long as you can get better results than what is in there now. Quote Link to comment Share on other sites More sharing options...
megalith Posted November 2, 2005 Share Posted November 2, 2005 I'm pretty sure anything is allowed...as long as you can get better results than what is in there now. 22321[/snapback] Hehe....yeah, I'm not going to the HDK yet as I want to do a few tests first to see how fast it's going to be. In this case, I don't see scripting being limiting at all, and you can probably do the whole thing in HScript...but I'm not positive about that yet. Quote Link to comment Share on other sites More sharing options...
Jason Posted November 2, 2005 Author Share Posted November 2, 2005 I'm pretty sure anything is allowed...as long as you can get better results than what is in there now. 22321[/snapback] Oh, sure - HDK is allowed indeed. If you use HDK then you may have opportunities to use other opensource 3rd party DAG libraries, if you can find them. "dot" is just one scriptable route that I know can work. Just for anyone who thinks that this is too tricky, we've used dot before to layout production assets (with dependancies) here at DD for webpage perusal and its not as hard to do as you may think Quote Link to comment Share on other sites More sharing options...
megalith Posted November 2, 2005 Share Posted November 2, 2005 Oh, sure - HDK is allowed indeed. If you use HDK then you may have opportunities to use other opensource 3rd party DAG libraries, if you can find them. "dot" is just one scriptable route that I know can work.Just for anyone who thinks that this is too tricky, we've used dot before to layout production assets (with dependancies) here at DD for webpage perusal and its not as hard to do as you may think 22325[/snapback] At the moment, I'm just concerned about the speed of using hscript or some scripting language. If anyone finds another 3rd party library for this type of thing please let us know (I'd be interested anyway), but GraphViz will definitely do everything we need. Doing a few tests right now, so I should know really soon if it's fast enough. Quote Link to comment Share on other sites More sharing options...
Jason Posted November 2, 2005 Author Share Posted November 2, 2005 At the moment, I'm just concerned about the speed of using hscript or some scripting language. If anyone finds another 3rd party library for this type of thing please let us know (I'd be interested anyway), but GraphViz will definitely do everything we need. Speed is not really one of the goals of this Challenge because I seriously doubt any of the speed bottleneck will be the scripting portion. GraphViz does slowdown a bit when you have many dependancies but you do have controls over how thoroughly it searches for a solution. GraphViz itself would definitely be the slowest part of the process by a long way. Quote Link to comment Share on other sites More sharing options...
megalith Posted November 2, 2005 Share Posted November 2, 2005 Speed is not really one of the goals of this Challenge because I seriously doubt any of the speed bottleneck will be the scripting portion. GraphViz does slowdown a bit when you have many dependancies but you do have controls over how thoroughly it searches for a solution. GraphViz itself would definitely be the slowest part of the process by a long way. 22328[/snapback] Yeah, you're right. I just made a simple script that parses the operators, passes it to dot, reads in the new data and sends it back to Houdini...not really that slow at all. I do need some more involved networks, though. Anyone have anything insanely complex that I can test it with? I know it may not be necessary to make a plugin, but it still might be worth considering. Something really integrated into the Houdini workflow so that organizing your networks isn't such a pain. Quote Link to comment Share on other sites More sharing options...
megalith Posted November 3, 2005 Share Posted November 3, 2005 Yay! It's working! It's a Python script at the moment, so the next step is to add error handling, documentation, and then consider moving it to pure HScript (which would kindof suck) or to HDK. Would be cool if there were some sort of interface that gave the user access to some of the power of GraphViz...hm... Quote Link to comment Share on other sites More sharing options...
Jason Posted November 3, 2005 Author Share Posted November 3, 2005 Yay! It's working! Excellent work! Binding it to an F-key is one option and hopefully the process would be totally invisible to the end user. It should be as easy to use as "source graphVizLayout.cmd /obj" where it'll layout selected or all nodes in that network. Feel free to port it to hscript or HDK if you wish. Quote Link to comment Share on other sites More sharing options...
Daniel Posted November 3, 2005 Share Posted November 3, 2005 Good luck in porting to Hscript.. not a fun process. A nice thing to do would come up with some basic hscript expressions that are missing (mostly missing a lot of string parsing), write them in the HDK and make them available. I think extending hscript just a little will go a long way in simplifying scripts in the future d Quote Link to comment Share on other sites More sharing options...
megalith Posted November 3, 2005 Share Posted November 3, 2005 Good luck in porting to Hscript.. not a fun process. A nice thing to do would come up with some basic hscript expressions that are missing (mostly missing a lot of string parsing), write them in the HDK and make them available. I think extending hscript just a little will go a long way in simplifying scripts in the futured 22348[/snapback] Totally agree with that. Don't want to diverge too far from the original challenge, but if this is something more people are interested in, I think we should make another challenge or something to promote that effort. Using just HScript does indeed suck for this as there is a lot of string parsing, so I'm going to implement it with the HDK next. In the meantime, if anyone wants, I'll post the Python script. ~megalith Quote Link to comment Share on other sites More sharing options...
Jason Posted November 3, 2005 Author Share Posted November 3, 2005 Good luck in porting to Hscript.. not a fun process. All I can say is thank goodness SESI introduced a strreplace() function. This and arg() are the only functions that make this a little more pleasant than eating fibreglass. Although I'd love a more complex regex (grep) and regsub myself. Oh, and file access that's not a set poo=`system("cat thatfile.txt")` methodology Quote Link to comment Share on other sites More sharing options...
megalith Posted November 4, 2005 Share Posted November 4, 2005 All I can say is thank goodness SESI introduced a strreplace() function. This and arg() are the only functions that make this a little more pleasant than eating fibreglass. Although I'd love a more complex regex (grep) and regsub myself. Oh, and file access that's not a set poo=`system("cat thatfile.txt")` methodology 22359[/snapback] Alright, the HDK version is working!! It's at where the script was, but since now I have access to the width and height of each node, I have a few more tweaks to make. GraphViz defaults to having a huge separation between nodes, since it works with much larger node sizes by default, so there's quite a bit to change it seems. Almost there! ~megalith Quote Link to comment Share on other sites More sharing options...
Jason Posted November 4, 2005 Author Share Posted November 4, 2005 Alright, the HDK version is working!! It's at where the script was, but since now I have access to the width and height of each node, I have a few more tweaks to make. GraphViz defaults to having a huge separation between nodes, since it works with much larger node sizes by default, so there's quite a bit to change it seems. Almost there! ~megalith 22365[/snapback] Way to go! Keen to see it! Quote Link to comment Share on other sites More sharing options...
Jason Posted November 4, 2005 Author Share Posted November 4, 2005 Way to go! Keen to see it! 22370[/snapback] Hmm: just found this too... http://directory.google.com/Top/Science/Ma.../Graph_Drawing/ Tulip looks interesting: http://www.tulip-software.org/ And walrus is very pretty too ... http://www.caida.org/tools/visualization/walrus/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.