Closed Roger8 closed 5 months ago
I used imgui-node-editor for an heightmap generation tool (heightmap are basically images...), you can have a look there https://github.com/otto-link/Hesiod/tree/v.imgui-based
I am working on this kind of work, as shown in the picture, which is very interesting. The UI work is not very good, but the overall process is still good. Run the operators on all nodes through a deep traversal strategy, and the code just completed today enables it to run normally
@otto-link Great work ,bro. I think it may help me a lot. Thanks very much. I'll keep on watching.
Very nice work, @GengGode . You did well , looking forward to your updates.
You got great answers here. Nicely done.
My take on the problem is to build processing pipeline and use node editor mearly as a way to represent them in ImGui. That does keep visualization code separate from bits doing heavy lifting. It is more work, line separating two isn't always obvious but I think it is worth the effort in the long run. This is how I usualy think about any editor integration.
Mixing your processing solution with ImGui code is ok too. Everything depends on your intent and how do you like your library to look after you built it.
Bit of trivia. Node is just like child window in ImGui. An rectangle you can put your images in. You can show intermediate textures with ImGui::Image()
just fine. Code that produce/update those textures is something that you write and fit your idea.
I have a idea, assume each node is an image or an image processing operator , then by connecting them using nodes of different types, i can get different output image. How to realize the node ?