-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modules and blocks #82
Comments
Interesting. In the manner of functions and procedures in programming, I'd propose the ability to construct modules as collections of modules, using "first-class" modules provided by vkdt and/or other modules defined in, say, .mod files. Like a "named network". The "blend" module and it's ilk would need a new connection type, multi-input... ?? There's published research on such networks; maybe there's already proposed formal definitions? |
this looks great! i think some high level primitives like this are necessary, yes. so far, blocks are subgraphs that contain one input and one output connector, along with an instance name shared between the modules in the block. i suppose that could be extended to an arbitary number of i/o connectors, so the subgraph templates could be created from a number of selected nodes, and also inserted as such. ideally the gui would provide the high level overview as in your last screenshot here, and be able to expand it if required. so i think (a)-(c) are straight forward, (d) would need some (gui only) data model that keeps information about which modules should remain grouped as blocks. in addition to that, i see a need for i think #70 needs to be resolved before this: we want to have a common place where to store such gui extra information along with a graph. i'd really like to read about formal graph interaction methods, if you find any links that'd certainly be interesting. |
I think VKDT is more and more interesting with already great capabilities and has a bright future ahead of it. My regret is that I am not able to help you much more. I'm just an photographer... |
..not saying anyone should do anything here, just putting together a roadmap how features could be implemented. will likely do that myself, time permitting :) thinking about it maybe such large graphs will likely need a more feature rich backend: https://github.com/thedmd/imgui-node-editor |
Powerful constructs need careful consideration, avoid dooming our
descendants with inflexible tools. E.g., params are a good start, need to
try to not lock in to a particular UI implementation...
I'm at limited Internet this week, but working intermittently on compiling
vkdt with MSYS2.
…On Mon, Mar 27, 2023, 7:55 AM hanatos ***@***.***> wrote:
..not saying anyone should do anything here, just putting together a
roadmap how features could be implemented. will likely do that myself, time
permitting :)
thinking about it maybe such large graphs will likely need a more feature
rich backend: https://github.com/thedmd/imgui-node-editor
—
Reply to this email directly, view it on GitHub
<#82 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC4RLEDP6UEQH3LCU635BTW6GL67ANCNFSM6AAAAAAWHMWBRM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
conceptualising a bit, with request for comments: guicreate blockmark a couple of modules in the graph editor and push button/shortcut. this can be used as cleanup/convenience to group modules. does not change the underlying graph (in particular instance names or connectivity of modules). collapse blocksome shortcut/button on block. hides all internal modules and shows the block as a dummy module load block from fileadds a new block to the graph editor panel. this includes creation of the internal modules and their connections. create block filemark a block in the gui and push button/shortcut. this will create a block definition file to be loaded later. means all modules involved in this process should not have instance names > 4 chars. backendfiles
block file
cfg file block annotationsthis is a bit different to block files since these do not have to be generic. it is enough to store the block id (instance name) per module for grouping functionality. also want metadata (block tooltip/colour/pin names etc) historydo block operations go into history? they are just a gui thing and irrelevant for functionality/render result. obviously low level graph manipulation which happens when working with blocks does go into history (add module, connect modules, etc). connecting blocksthe gui will initiate connections between modules or blocks alike and not necessarily even know which of the two it is. code needs to take care the right thing happens (block input connector may delegate to multiple internal module inputs). deleting blockscan be initiated from the gui explicitly. but also happens
high-level primitives on blocksworking efficiently with a large number of modules:
|
Blocks aren't just a GUI thing, they're like a third-class network member, after nodes then modules. We should be able to use blocks in .cfg files as just another network element. Do you envision adding really useful blocks to the vkdt source tree? Oh, got me thinking about fundamental ops, the following modules might be of use in defining blocks:
|
Consider this:
My academic background is compilers/programming languages, this looks like a programming language... 😆 |
I try an answer :
|
good discussion! let me try to answer some things: gui thing or notnodes are 1:1 compute kernels, modules are 1:1 gui controls/uniforms/some cpu side callbacks that make sense to process at a coarser level (buffer size/type negotiations etc). blocks? don't change anything in the pipeline. having blocks in cfg files in the non-gui part wouldn't change much. maybe make it more convenient to write the cfg by hand (so it's a ui thing, if not gui in this case), and would make the cfg less self-contained since then it depends on block definitions (so these need versions etc). fine grained modulesi'll certainly not have add/mul/div style nodes or even modules. these are too fine grained to yield good performance. colour treatment should go into the block filesthere is a compileryeah everything is a graph.. though i'd more like some high level language to modify the graph. say place arrays of blocks and condense lists of blocks to a single output via reduction. the syntax trees in compilers are different (way more fine grained and not cyclic to begin with) yes that looks very similar to what i envisioned. recursive blocks inside blocks: i don't think i want that. that'd be like recursive nodes in substance designer. i suppose you can always regroup even more modules to even larger blocks. i'd probably allow cross block boundary connections if the block is expanded, and in the process destroy the block (if you want to keep it, connect to the block connectors while it is collapsed). in particular that'd make a block appear as a regular module with strange name and maybe some annotation if it is collapsed. if expanded, it'd just be a group of modules maybe with a background colour. the connectors would still be the module connectors as is now. i agree with most of your notes. took note that:
|
Okay, I get basic math ops, but what about matrix/lut/clut? I don't think
you want to deal with littlecms or OCIO directly in vkdt/libvkdt, so you
need ops that allow construction of interfaces (blocks?)
Same with lensfun, compatible or convertible warp ops...
…On Wed, Apr 19, 2023, 7:12 AM hanatos ***@***.***> wrote:
good discussion! let me try to answer some things:
@butcherg <https://github.com/butcherg> :
gui thing or not
nodes are 1:1 compute kernels, modules are 1:1 gui controls/uniforms/some
cpu side callbacks that make sense to process at a coarser level (buffer
size/type negotiations etc). blocks? don't change anything in the pipeline.
having blocks in cfg files in the non-gui part wouldn't change much. maybe
make it more convenient to write the cfg by hand (so it's a ui thing, if
not gui in this case), and would make the cfg less self-contained since
then it depends on block definitions (so these need versions etc).
fine grained modules
i'll certainly not have add/mul/div style nodes or even modules. these are
too fine grained to yield good performance. colour treatment should go into
the colour module. every node carries all data from global memory and
back, that's slow.
block files
there is a blocks/ directory with the definitions, which are (as of now)
just cfg with some pattern to be replaced. i'd make this pattern a bit more
generic. i don't think the token restriction is too bad, we can have
"excessive string annotations(tm)" in the future. actually there are two
such directories: one shipped with vkdt (const and will be changed by
updates), and one in the user's home directory (can be written to,
untouched by updates).
compiler
yeah everything is a graph.. though i'd more like some high level language
to modify the graph. say place arrays of blocks and condense lists of
blocks to a single output via reduction. the syntax trees in compilers are
different (way more fine grained and not cyclic to begin with)
@cherob67 <https://github.com/cherob67> :
yes that looks very similar to what i envisioned.
recursive blocks inside blocks: i don't think i want that. that'd be like
recursive nodes in substance designer. i suppose you can always regroup
even more modules to even larger blocks.
i'd probably allow cross block boundary connections if the block is
expanded, and in the process destroy the block (if you want to keep it,
connect to the block connectors while it is collapsed). in particular
that'd make a block appear as a regular module with strange name and maybe
some annotation if it is collapsed. if expanded, it'd just be a group of
modules maybe with a background colour. the connectors would still be the
module connectors as is now.
i agree with most of your notes. took note that:
- you don't want to auto delete blocks but fail the
connections/operations instead or at least prompt before doing it
- want block stuff in history. probably easy to ignore for cli and
other than that history is kinda gui. thinking about it maybe putting
*all* block related info into this list may be the best way of doing
it (except the prefab/shipped/saved blk templates).
—
Reply to this email directly, view it on GitHub
<#82 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC4RLFSXUNLXZORX65LSXLXB7JDDANCNFSM6AAAAAAWHMWBRM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
agree, i don't want those libraries. if at all, i want facilities to load matrices/luts but not the code to apply it (would not fit the pipeline/language). also i'm not overly keen on 100% icc coverage, more like whatever is really needed to get stuff done. matrix: https://github.com/hanatos/vkdt/blob/master/src/pipe/modules/colour/main.comp#L138 2.5D lut (dcamprof style): https://github.com/hanatos/vkdt/blob/master/src/pipe/modules/colour/main.comp#L99 3D lut for colour correction or crazy manipulation (RBF-based): https://github.com/hanatos/vkdt/blob/master/src/pipe/modules/colour/main.comp#L162 2D->2D lens distortion: https://github.com/hanatos/vkdt/blob/master/src/pipe/modules/lens/main.comp#L26 don't quite get the connection to blocks, but image parameters are passed along the pipeline from input to the individual connectors, for instance here the raw input sets the colour matrix: https://github.com/hanatos/vkdt/blob/master/src/pipe/modules/i-raw/main.cc#L343 that would probably also be the case to load/convert lens distortion metadata (if any) and in the lens module |
Thank you for your reply. I just have a comment about modules and blocks. I'm a photographer and not a developer, that's why I tend to want to give the block a clearer reality that goes beyond the simple aggregation of modules. |
Good morning
I want to share some thoughts regarding blocks and presets. I started from a "life-size" test of retouching on a personal photo that I have already retouched in DT.
Here is the photo (jpeg associated with the raw):
Here is the principle of treatment by zones (masks) with modification (according to the zones) of the luminosity, the color, the contrast and the local contrast
Here is the photo obtained with VKDT
And here is the the pipe (with already a large number of nodes - but there is even more complex ! )
which I propose the following structure:
From this structuring, the idea that i propose is to establish a level above the elementary modules which would be the elements (name to be found - perhaps the blocks or presets) corresponding of course to an aggregation of elementary modules (or smaller elements) and ensuring more complex and complete functions. These blocks/presets could be established by the developers with the possibility for each user to create (and share) their own.
Exemple:
The module editor would provide access to this intermediate level allowing easier development and reading of the pipe. The settings corresponding to each module composing an element would be accessible on the right column with an indentation to distinguish the different modules.
The text was updated successfully, but these errors were encountered: