[help] Dynamic UI for HDA

   2624   12   3
User Avatar
Member
16 posts
Joined: Nov. 2019
Online
Hello, I am currently trying to do a procedural circle data graph, with one string, color and amount input each segment of the circle graph.

I am trying to do it as clean as possible, so I though if there is a way to make the Houdini UI dynamic, with one int controlling the amount of sections, and show 1 string, float, and color in the UI for each unit in that integer.

Here are a few screenshots of how I imagine it working:

edit: the first int was suposed to change between screeshots, with 3 in the one with 4 folders.

edit2: I found the Tab Hide when, but is there a way to create and destroy by code? I think I can work with this but inside it will not be that clean.
Edited by RodrigoMartin - April 27, 2020 10:59:06

Attachments:
menu_2.PNG (26.1 KB)
menu_4.PNG (35.2 KB)

https://rodrokomodo.github.io/ [rodrokomodo.github.io]
https://twitter.com/rodroelmelon [twitter.com]
User Avatar
Member
6593 posts
Joined: July 2007
Offline
use Folder set as Multiparm Block
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
16 posts
Joined: Nov. 2019
Online
tamte
use Folder set as Multiparm Block
First time I heard of this, I started doing digital assets last week so I am new to this multiparm block, thanks for the response, I will search more info about it!
https://rodrokomodo.github.io/ [rodrokomodo.github.io]
https://twitter.com/rodroelmelon [twitter.com]
User Avatar
Member
6593 posts
Joined: July 2007
Offline
to get you started
Edited by tamte - April 27, 2020 12:27:37

Attachments:
ts_multiparm_example.hip (83.0 KB)
ts_multiparm_example.png (20.7 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
16 posts
Joined: Nov. 2019
Online
tamte
to get you started
Image Not Found
I though it was really advanced, using python or VEX, every day I am more convinced that houdini is the best, thanks you so much!

edit: YOU are the best! Thanks you!
Edited by RodrigoMartin - April 27, 2020 13:52:42
https://rodrokomodo.github.io/ [rodrokomodo.github.io]
https://twitter.com/rodroelmelon [twitter.com]
User Avatar
Member
194 posts
Joined: Sept. 2012
Offline
tamte
to get you started
Image Not Found

Just wondering, what will be your take Tomas, @tamte when you want to access parameters defined dynamically in the HDA interface?

Or how to convert these into a parameter table array on points?


In case for example i want to define multiples layers in the HDA and loop thought then?
Does my word make sense to one of you?
Probably with Python you could do that easily, yeah i should learn it i know, need to find time for
Edited by vinyvince - April 26, 2022 16:08:07
Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
User Avatar
Member
6593 posts
Joined: July 2007
Offline
vinyvince
In case for example i want to define multiples layers in the HDA and loop thought then?
Does my word make sense to one of you?
normally you either loop through the multiparm using VEX
or in For Loop SOP Block
depending on what tools you need to invoke per iteration
Python is of course an option, but I usually leave it as a last option or when it makes ense

to just convert to arrays then VEX is enough

nowadays you can even use Attribute From Parameters SOP to gather those values and process later
Edited by tamte - April 26, 2022 16:17:17
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
194 posts
Joined: Sept. 2012
Offline
Thanks Tomas!

The idea is actually simple. My brain is not yet used to that kind of mechanism i guess

Im using a multipart block list, and that guy should give the path to X cache layer and some parameters like this


Then in the network, im trying to get that value and use it. So far with the following wrangle.
But it fails to import the values, probably something stupid, not sure what i miss.. except some sleep :S

Many Thanks and take care

______________________________________

s@biomelayer;
s@biomethreashold;

for (int index = 0; index < `chs("../values")`; index++)
{
// Import biome layer cache path
string biome_name = "biomecache" + itoa(index+1);
s@biomename = ch("../" + biome_name);
append(@biomelayer, biome_name);

// Import biome layer threashold value
string threashold = "threashold" + itoa(index+1);
float removethreash = ch("../" + threashold);
append(@biomethreashold, threashold);
}
Edited by vinyvince - April 26, 2022 18:45:03

Attachments:
Capture.PNG (32.8 KB)
scatter_designer_vince2.PNG (1.4 MB)

Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
User Avatar
Member
194 posts
Joined: Sept. 2012
Offline
tamte
Attribute From Parameters SOP
Attribute From Parameters SOP, oh i didn't know this one, but not sure how to filter values, looks more simple in VEX, but can't found my way for now on that simple thing above... Pity me :/
Edited by vinyvince - April 26, 2022 18:45:58
Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
User Avatar
Member
194 posts
Joined: Sept. 2012
Offline
I think im in a good way to "auto solve" myself. Vex Concat seem to be what i was looking for.
strcat in script

So i build like a data table with point linked to my HDA multipart block list parameters.

One thing im still missing now is how to pass the string attribute, the path to a file cache Sop to import each cache layer, one by one..

All syntax and methods i tried didn't work..
Tried with details attribute or same way i build the data table using concat in such way
s@biome= chs(concat(("../biome_name"),itoa(iter+1)));

but for that filecache sop, houdini filename input doesn't seem to like anything
chs(concat(("../biome_name"),itoa(detail(-1,"iteration",0)+1))
or with ``

Any idea someone please? @tamte
Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
User Avatar
Member
194 posts
Joined: Sept. 2012
Offline
Looks like there is some progress with this

`chs("../file_" + (detail("../meta", "iteration", 0)+1))`
Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
User Avatar
Member
6593 posts
Joined: July 2007
Offline
you shouldn't need concat for the VEX loop version
this should work:
string biome_name = chs("../biome_name" + itoa(index+1));
also to avoid +1 in itoa(index + 1) you can make your Multiparm start at 0 instead of 1


as for the For Loop SOP this should work:
`chs("../biome_name" + detail(-1, "iteration", 0))`
as should this
`chs(strcat("../biome_name", detail(-1, "iteration",0)))`
Edited by tamte - April 27, 2022 11:21:38
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
194 posts
Joined: Sept. 2012
Offline
I did something like this , with my main wrangle here. Thanks you again Tomas, @tamte for showing the first steps
and file input have this :

`chs("../file_" + (detail("../meta", "iteration", 0)+1))`

I might do a revision later but for now, i need to free my brain from that for a little bit
Edited by vinyvince - April 27, 2022 13:25:39

Attachments:
Capture.PNG (99.8 KB)

Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
  • Quick Links