I've developed a force directed graph system for a game I'm working on, and am curious if there is any interest out there in me polishing it up and putting on the asset store? Here's a quick demostration video (showing the editor used to mess with the physics settings until you're happy with them). The library is designed to be easy to use but flexible and powerful, for instance, the code used to spawn each node in the video above is: Code (CSharp): nodes.Add(root.SpawnInside(new Thing("Node"), nodePrefab, nodePhysicsSettings) .RepelFromAllSimilarNodes() .WakeUpAllSimilarNodes() .AttractToNode(Util.RandomElement(nodes)) .LinkWith(Prefabs.instance.connectionPrefab, 0.25f) .Appear()); Where the "new Thing("Node")" is the thing the node represents (which can be anything). I imagine it being useful for game maps, skill trees, puzzle elements, or in my case, network topologies. It also functions in a 2D mode, which flattens the graph onto a plane and could be useful for other applications. I guess I just want to gauge any interest in such a library, to decide it would be work tidying it up for the asset store and pop it up on there for a few bucks
I am playing with pulling some graph data from graphX into unity and think your library would be a good starting point. I would spend the money if source is included. I plan on using VR to explore graph data
Source would be included, physics stuff like this can always use a little fine tuning for each use case.
Looks great, this is something i could use in my current project! I am looking for a way to visualize a large data set. Any plans to add 2d graphs?
I added 2D graphs, which can be used exclusively, or mixed with with 3D graphs for interesting UI possibilities. http://imgur.com/53q13gg EDIT: Keep in mind the 2D mode is simply a 3D graph projected onto a plane, either defined by a normal or camera facing. It would be fairly trivial to add a pure 2D mode that uses sprites instead of meshes, there may even be some mild performance gains.
Nice, could one populate the data at runtime? The data set I have can be static, parsed from a json file, or dynamic based on runtime analysis. What is the time line for your project? If it's relatively soon I'll certainty hold off on the visual portion on my project
The data is exclusively populated at runtime, as is the requirements for my game. Each use case would need to write a small layer between their parser and the library to generate the graph using static data, but once generated, more nodes can be added at runtime with ease. I'm currently finishing off an editor which makes it easy to play with different physics settings and generates .phys (JSON) files which the library can use at runtime. I'm a bit of a perfectionist, but if you need the library in short order, I can forego some of the polish (it's already quite usable).
The format is up to you, as the nodes are added at runtime. It should be trivial to write a layer that generates nodes based on any kind of file. If the demand is there, I'd be happy to add some generators for some common file types, but to be honest, I don't really know much about any existing standards in this area, as my experience is primarily in games.
Here's a web demo of the current version of the library. All the work is done on the GPU now for substantial performance improvements. Unfortunately it will not run on OSX currently as they don't support Compute Shaders (Apple has not kept very up to date with OpenGL). Also, run this in something other then Chrome, as I'm sure most of you're aware, Chrome doesn't like Unity's web player any more, and WebGL hasn't caught up with Compute Shaders yet. http://www.klaxon.eclipse.co.uk/ForceGraph1/ Any feedback would be appreciated, or if anyone encounters any problems with it. I'm currently working on documentation then I will start the process of submitting it to the asset store.
Would just like to say this looks awesome, and I'm looking forward to seeing it on the Asset Store! I'd like to visualise the node graph of a choose-your-own-adventure type game I'm working on. I'm doing that with Python and GraphViz currently, and it's not that great
yes please, I would buy it immediately. also, please add a cutoff time after which the layout freezes. While the slow floating looks cool, it also absolutely eats CPU+battery
Is this going to be offered on the Asset Store? If not, would you be willing to share some of the layout concepts? Thanks!
Finally solved the problem on my own. This open-source software was a big help for me: https://github.com/gephi/gephi/tree...tPlugin/src/main/java/org/gephi/layout/plugin
I'm afraid the library I've been working on has been caught up in a data visualization start-up company, so as much as I wanted to release it on the Asset Store, it's looking unlikely this will happen any time soon I'm sorry everyone. All I can do is suggest you read up on "force directed graphs", "constraint relaxation" (as opposed to using spring forces, which are much less stable at low frame rates), "verlet integration", "compute shaders" or "OpenCL" (which is more cross-platform), and perhaps "barnes-hut simulation" and "oct-trees" (mostly if you take a CPU approach, less important with GPU approaches). The trick for large graphs is getting as much of the math running on the GPU. Good luck if you decide to have a go yourselves!
Oh no, I could really have used that - just out of curiousity, where would that startup be located? ^^
This may help for those wanting to dig in: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch31.html
Hey @doombob this is an old thread but I just wanted to see if all that IP lockup story is still a thing or if you could resuscitate this or share a little more I am on a small team and this is exactly the wheel we are trying to re-invent. Anyhow, thanks for the pointers we see the same problem using Springs too !
Hmm, interesting thing! The usecase that comes to mind for me as I'm about to start that: Using this as the core of a coral generator. For ones like these: https://as2.ftcdn.net/v2/jpg/03/13/65/97/1000_F_313659737_rzKBruxYcGN31T5sjhStHzAsLdFpKIH1.jpg https://i.pinimg.com/originals/eb/d5/ca/ebd5cacbceb284eceb4d5b61853cffea.jpg