jacobsjo / density-function-editor

Visual Editor for Minecraft Density Functions
MIT License
3 stars 0 forks source link

[Suggestion] Better previewing of nodes #2

Open FlashFyreMods opened 1 year ago

FlashFyreMods commented 1 year ago

Hey. As I stated on discord a while back I find the node based approach to density functions to be incredibly useful so I reckon it would benefit a lot from better viewing of nodes.

I've spent some time using Substance Designer recently which has a similar node based workflow but is intended more for designing seamless textures and materials. The way previews work in that is there is a preview window, and double clicking a node sets the preview window to its output. This would already be really useful as opposed to hovering over the circles and not being able to see the preview while making adjustments.

With a separate section for a preview that is visible at all times somewhere, you could also add some things to make adjustments next to it such as:

The only other thing that is kinda annoying is when an output of a node can only be connected to one input. A one to many relationship would be useful as it's a benefit that's possible when not working in json directly.

jacobsjo commented 1 year ago

That seems like a reasonable suggestion. It would probably also be good if you can preview the result between diferent density functions (i.e. preview the final density while editing the offset df)

The only other thing that is kinda annoying is when an output of a node can only be connected to one input. A one to many relationship would be useful as it's a benefit that's possible when not working in json directly.

The issue with that is that right now you do edit each json file individually. Having a one to many relationship would mean either duplicating code in the resulting json to automatically splitting it into multiple density function files. Having a single view where you can edit all density functions at once and it exports as many json files as needed would be a nice idea, but is rather out of scope for now. If you want you can make a separate issue for that.

FlashFyreMods commented 1 year ago

It would probably also be good if you can preview the result between diferent density functions (i.e. preview the final density while editing the offset df)

Yeah. In Substance Designer, that's why double clicking sets the preview to the clicked node, so then you can single click a different node to open the menu while the preview is of the original node. In this density function editor all the options can be configurable from the node itself so that's even fewer clicks. A little circle or something around the previewed node would work well if this is implemented.

The issue with that is that right now you do edit each json file individually. Having a one to many relationship would mean either duplicating code in the resulting json to automatically splitting it into multiple density function files. Having a single view where you can edit all density functions at once and it exports as many json files as needed would be a nice idea, but is rather out of scope for now. If you want you can make a separate issue for that.

Gotcha. I didn't know that the website is basically editing the jsons as opposed to loading them and storing them in a reusable way like the node graph, so I can see why that would be out of the scope. I'll make a separate issue just so that the suggestion is out there.

aki-art commented 8 months ago

If not this level of improvement, way to pin the preview or have the final output be visible at all times would be really helpful too. Currently this tool is very tedious to use because the preview has to be manually opened after every tiny change of any value.

Additionally, a pinned or separate preview box could allow the actual map to be hovered with a mouse, and the final values to be displayed. Sometimes it would be very useful to know if a final value is -0.01 or -10. the pixel color is not always a good indicator of final values.

Seeing and configuring what Y range I'm looking at would also be incredibly useful. For example, I'm using this tool to help with my custom dimension, and when trying to configure a gradient in relation to my surface at Y220, the preview stopping at Y ~136 is really not useful, and so I'm stuck with going back and forth with Misode's app for previewing and this one for editing.