I never understood why this happen and cannot make any sense out of the documentation,
but usually I fix it by switching the ‘extrusion mode’ to use point normal
Found 900 posts.
Search results Show results as topic list.
Technical Discussion » Making cliffs in a mountain
- Andr
- 900 posts
- Offline
Technical Discussion » Multiparm default quantity expression?
- Andr
- 900 posts
- Offline
probiner
Well
ended up using callback script which is not a pretty line (and some functions seem to fizzle without warning), but hey, works…
I feel your same pain of writing a single long inline callback.
I now do the following:
I create a string parm, set it to multi-line and language python. I type there my callback code.
Then I simply ‘exec’ that evaluated string parm inside the callback field. Once happy I set string parm to invisible.
It's a little bit longer setup, but this I way I can type and visualize easily the callback code.
Technical Discussion » SOP attributes in POP
- Andr
- 900 posts
- Offline
Technical Discussion » [fixed in Hou19] Attrib wrangle 100 slower than attrib create?
- Andr
- 900 posts
- Offline
Hello and thanks, this is very helpful!
Performance is much improved now.
and finally I understand the use of attributes bindings.
Performance is much improved now.
and finally I understand the use of attributes bindings.
Edited by Andr - July 24, 2019 10:48:43
Houdini Lounge » Attribute Value as Label?
- Andr
- 900 posts
- Offline
animatrix3d
Hi,
Try:`detail(0, "cost", 0)`
Ohh, it would super nice if the Label field of the editor interface could also accept hscript.
A lot of less time wasted working with parmgroup templates.
I wonder if there's any valid technical reason for not being able to do that?
Anyway, if you want instead to change the label itself, you can use the following code.
Have a look at the attached example file
node = hou.pwd() targetParm = node.parm("targetParm") newLabel = node.parm("newLabel").eval() group = node.parmTemplateGroup() oldParm = targetParm.tuple().parmTemplate() newParm = targetParm.tuple().parmTemplate() newParm.setLabel(newLabel) group.replace(oldParm, newParm) node.setParmTemplateGroup(group)
Edited by Andr - July 24, 2019 03:55:15
Technical Discussion » How to produce the many variations of a procedural house setup?
- Andr
- 900 posts
- Offline
You could use a Wedge node for that, either the PDG version in a TOPs network or the classic one in a Rop network.
It depends on how much you feel comfy to embrace a new TECH. (PDG)
I would consider PDG, for a number of reasons.
Here it's a basic tutorial
https://vimeo.com/323268918 [vimeo.com]
It depends on how much you feel comfy to embrace a new TECH. (PDG)
I would consider PDG, for a number of reasons.
Here it's a basic tutorial
https://vimeo.com/323268918 [vimeo.com]
Edited by Andr - July 24, 2019 03:02:00
Technical Discussion » [fixed in Hou19] Attrib wrangle 100 slower than attrib create?
- Andr
- 900 posts
- Offline
UPDATE 2022:
this seems not be the case anymore in Houdini 19.0 and later.
Now, using that hscript expression directly inside a wrangle doesn't cause any overhead any longer.
The expression is:
I couldn't find anything about it in the change-log, but I guess it was fixed.
================================================
================================================
Original Post:
Have a look at the setup in the .hip file.
There's a for-loop that creates 40 different vector attributes with a point wrangle.
Another for-loop does exactly the same with an 'attribute create' node.
Wrangle method is like 100 times slower on my system than 'attribute create' node, and I wonder why.
I guess single task-specific nodes are super optimized for the task and are generally preferable than multi-threaded wrangles.
Also, if you click on node info on the foreach_end you can see that the Memory consumption is much greater for the wrangle loop.
This leads to my second question: what does the Memory information means? Is the Ram needed to do the cooking on that particular node? And what does it means when 2 values are shown, "Memory" and "New"?
Another interesting find: try to increase the size of the 'attrib create' node from 1 to 4.
You will see that the memory consumption will stay fixed until size 3. And it will once you set the size to 4.
If you try to create a f, u, v, p attrib in the wrangle, the Memory consumption will increase accordingly.
cwhite
The VEX code itself is changing on each iteration due to the expressions, so that causes significant overhead from recompiling the code. You can use the Bindings tab as an alternative approach (see attached file)
this seems not be the case anymore in Houdini 19.0 and later.
Now, using that hscript expression directly inside a wrangle doesn't cause any overhead any longer.
The expression is:
v@asd`ftoa(detail(-1, "iteration",0))`
I couldn't find anything about it in the change-log, but I guess it was fixed.
================================================
================================================
Original Post:
Have a look at the setup in the .hip file.
There's a for-loop that creates 40 different vector attributes with a point wrangle.
Another for-loop does exactly the same with an 'attribute create' node.
Wrangle method is like 100 times slower on my system than 'attribute create' node, and I wonder why.
I guess single task-specific nodes are super optimized for the task and are generally preferable than multi-threaded wrangles.
Also, if you click on node info on the foreach_end you can see that the Memory consumption is much greater for the wrangle loop.
This leads to my second question: what does the Memory information means? Is the Ram needed to do the cooking on that particular node? And what does it means when 2 values are shown, "Memory" and "New"?
Another interesting find: try to increase the size of the 'attrib create' node from 1 to 4.
You will see that the memory consumption will stay fixed until size 3. And it will once you set the size to 4.
If you try to create a f, u, v, p attrib in the wrangle, the Memory consumption will increase accordingly.
Edited by Andr - Dec. 10, 2022 09:22:30
Houdini Lounge » transform sop - "attributes option -!!"
- Andr
- 900 posts
- Offline
1) create a box,
2) append an ‘Attribute Create’ node and create a float attribute named “N” with size 3 and type Normal. Set its value to {0, 1, 0}
3) Now append a transform node. Apply some rotation so that N values change. See what happens to N values when you exclude it from the ‘attributes’ list, by replacing “*” with P.
4)Restore all attributes to transform in the list, by writing back “*”. See what happens to N values when you go back in the ‘Attrib Create’ node and set the type to “NONE”.
2) append an ‘Attribute Create’ node and create a float attribute named “N” with size 3 and type Normal. Set its value to {0, 1, 0}
3) Now append a transform node. Apply some rotation so that N values change. See what happens to N values when you exclude it from the ‘attributes’ list, by replacing “*” with P.
4)Restore all attributes to transform in the list, by writing back “*”. See what happens to N values when you go back in the ‘Attrib Create’ node and set the type to “NONE”.
Edited by Andr - July 23, 2019 16:42:51
Houdini Indie and Apprentice » Creating displacement map from geometry?
- Andr
- 900 posts
- Offline
hi,
have a look at the gamedev toolset, there are specific tools for maps baking
https://www.sidefx.com/tutorials/game-tools-maps-baker/ [www.sidefx.com]
have a look at the gamedev toolset, there are specific tools for maps baking
https://www.sidefx.com/tutorials/game-tools-maps-baker/ [www.sidefx.com]
Houdini Indie and Apprentice » [SOLVED] How to create a string-based switch? Or a [string:int] selector on a node?
- Andr
- 900 posts
- Offline
Hi Manu,
it was trial and error and wasted a bit of time on it, especially on that bug I mentioned.
So I'm happy to avoid ppl to waste as much time.
Anyway here I see some similar information, on menu-tab section:
https://www.sidefx.com/docs/houdini/ref/windows/edit_parameter_interface.html#parameter-descriptionhere [www.sidefx.com]
But you are right, if you were searching for ordered menu, it's not an easy find.
One thing, I was wrong about using float values as tokens. You can't actually use them, it seems.
but still you could use integers in their place: example, 314 instead of 3.14 if you need PI as token
cheers
it was trial and error and wasted a bit of time on it, especially on that bug I mentioned.
So I'm happy to avoid ppl to waste as much time.
Anyway here I see some similar information, on menu-tab section:
https://www.sidefx.com/docs/houdini/ref/windows/edit_parameter_interface.html#parameter-descriptionhere [www.sidefx.com]
But you are right, if you were searching for ordered menu, it's not an easy find.
One thing, I was wrong about using float values as tokens. You can't actually use them, it seems.
but still you could use integers in their place: example, 314 instead of 3.14 if you need PI as token
cheers
Houdini Indie and Apprentice » [SOLVED] How to create a string-based switch? Or a [string:int] selector on a node?
- Andr
- 900 posts
- Offline
This is how I understand the Menu:
The tokens column of an ordered menu is the one being evaluated and returned. The Label column doesn't really matter.
With an ordered menu you could either have as tokens strings or actual numbers. Houdini will allow you to do that, but note the following:
Also, note that after you apply your new modifications to a menu, you might see the copied pasted references from your menu NOT updated with the new values. This seems a bug to me, anyway if you see something like this happening, try to ‘initialize’ your freshly modified menu by using it once: select another item of the menu.
Regarding your specific need:
Just create an ordered menu, with UNCHECKED the toggle ‘use menu item Token as Value’. Put whatever you want as token value (but for simplicity you can put the item index), and type the labels accordingly to the order of the objects that you feed into the switch.
Then copy paste the reference of the menu parm onto the switch node
The tokens column of an ordered menu is the one being evaluated and returned. The Label column doesn't really matter.
With an ordered menu you could either have as tokens strings or actual numbers. Houdini will allow you to do that, but note the following:
- If you have strings as tokens, no matter how you check the toggle ‘use menu item Token as Value’, the returned token value will be always the index of the selected menu item. (0,1,2,etc)
- If you have numbers as tokens like (64, 128, 256), those numbers will be returned only if you check the toggle ‘use menu item Token as Value’, otherwise again only the token item index will be returned (0, 1, 2, etc). *Update: It seems that you can't use floats as tokens*
- If you want to have returned a String instead of a number (like the noise menu of the mountain sop), you should drop a String parameter and then check the toggle ‘use menu’.
- Similarly you can have a menu also starting from an integer paramater, but as far as I see it, it's no different than dropping directly an ‘ordered menu’ parameter
Also, note that after you apply your new modifications to a menu, you might see the copied pasted references from your menu NOT updated with the new values. This seems a bug to me, anyway if you see something like this happening, try to ‘initialize’ your freshly modified menu by using it once: select another item of the menu.
Regarding your specific need:
Just create an ordered menu, with UNCHECKED the toggle ‘use menu item Token as Value’. Put whatever you want as token value (but for simplicity you can put the item index), and type the labels accordingly to the order of the objects that you feed into the switch.
Then copy paste the reference of the menu parm onto the switch node
Edited by Andr - July 23, 2019 12:37:53
Technical Discussion » Heightfield scatter node doesn't work with merged height volumes
- Andr
- 900 posts
- Offline
Hi, the problem seems to be that when you do the merge of the 2 heightfields you end up with 2 different ‘height’ volumes with the same name.
And later on in the “adjust_by_height1” wrangle node inside the ‘scatter’, the code is trying to sample from the ‘height’ volume. You have 2 of them, but only one would be sampled from.
This is the vex code:
Solutions I can see:
1)you find a way to do an actual merge, so you end up with a single height volume.
2)Or you could rename to ‘height2’ the height volume of one of the heightfields. Then in the vex code you could put some conditionals to identify which volume to sample from (height or height2)
Given that you know the position and the size of the first volume you could replace the last line with something like:
3) There might be a even simpler way to fix your scene that I'm not aware of, since I'm not very practical with volumes handling
And later on in the “adjust_by_height1” wrangle node inside the ‘scatter’, the code is trying to sample from the ‘height’ volume. You have 2 of them, but only one would be sampled from.
This is the vex code:
vector updir = normalize(volumeindextopos(1, 'height', {0, 0, 1}) - volumeindextopos(1, 'height', {0, 0, 0})); @P -= updir * dot(@P, updir); @P += updir * dot(vector(point(1, 'P', primpoint(1, nametoprim(1, 'height'), 0))), updir); @P += updir * volumesample(1, 'height', @P);
Solutions I can see:
1)you find a way to do an actual merge, so you end up with a single height volume.
2)Or you could rename to ‘height2’ the height volume of one of the heightfields. Then in the vex code you could put some conditionals to identify which volume to sample from (height or height2)
Given that you know the position and the size of the first volume you could replace the last line with something like:
if(@P.x < 100) // 100 in case of a heightfield centered in 0, and with width of 200 { @P += updir * volumesample(1, 'height', @P); } else { @P += updir * volumesample(1, 'height2', @P); }
Edited by Andr - July 22, 2019 04:06:23
Technical Discussion » Heightfield scatter node doesn't work with merged height volumes
- Andr
- 900 posts
- Offline
PDG/TOPs » hou.perfMon + PDG?
- Andr
- 900 posts
- Offline
hello Ken,
I need a more granular analysis than the simple workitem cooking time of the Task Graph.
Example:
In TOPs I'm wedging few parameters of a Sop graph that builds a house.
There are 4 workitems representing 4 different variations of the house.
I want to profile the sop graph itself on each of the 4 iterations.
So, if the house is being built with 3 nodes, I need those 3 nodes profiled 4 times.
At the end it's like a normal profiling with a performance monitor window.
That's why I was asking if I could somehow launch it via python on each workitem cook.
Thanks again and sorry for these trivial questions, PDG is still black magic to me eheh
I need a more granular analysis than the simple workitem cooking time of the Task Graph.
Example:
In TOPs I'm wedging few parameters of a Sop graph that builds a house.
There are 4 workitems representing 4 different variations of the house.
I want to profile the sop graph itself on each of the 4 iterations.
So, if the house is being built with 3 nodes, I need those 3 nodes profiled 4 times.
At the end it's like a normal profiling with a performance monitor window.
That's why I was asking if I could somehow launch it via python on each workitem cook.
Thanks again and sorry for these trivial questions, PDG is still black magic to me eheh
PDG/TOPs » PDG Master class posted
- Andr
- 900 posts
- Offline
This was a very interesting masterclass, and I liked the more technical approach than the tutorials posted at launch.
Like Guilhermecasagrandi said, I'm still a bit confused about mappers, but I guess it's more due the fact that I haven't had the need for them so far, as my PDG workflow is still in its infancy.
Looking forward for deep API Dive master class.
And yes, like Manuel suggested, an applied machine learning master class would be suuuuper interesting.
Like Guilhermecasagrandi said, I'm still a bit confused about mappers, but I guess it's more due the fact that I haven't had the need for them so far, as my PDG workflow is still in its infancy.
Looking forward for deep API Dive master class.
And yes, like Manuel suggested, an applied machine learning master class would be suuuuper interesting.
PDG/TOPs » few more questions [updated]
- Andr
- 900 posts
- Offline
Hello Ken,
no worries and thanks a lot for caring to answer!
Now, given a topnode name and a @pdg_index it should be possible to retrieve the unique ID. But how?
As I'm building a hda Sop wrapper around a topnet, my goal is to be able to use an integer parameter to display a specific pdg_index of a specific topnode (using the function setSelectedWorkItem(idx)).
It's like a remote control, because the user won't be able to dive inside the topnet to manually select the workitem dot on the topnode.
Even better, it would be handy to have a new type of parameter with the ‘dotted UI’ similar to the topnet nodes. I guess for now one could simply use a chain of unlabelled parameter toggles, that would spawn in accordance to the amount of workitems of the topnode of choice.
I tried to use the invoke top node, but with the ‘write geometry’ unchecked it won't output any geometry at sop level.
Also, what is the purpose of the output node inside TOPs?
It doesn't work like in a normal subnetwork: If I add a second output node, no second outputs connectors would be spawned on the topnet node.
It would be nice to have multiple outputs from a topnet. In case of topnet with separate branches that I want to output at Sop level, I can only use the force-recook button and manually set the render flag to the branch I want to see at sop level. If I need to see both branches, I should split them in two different topnets.
Anyway, this issue, along with issue 1) and issue 6) are somehow correlated in my scenario.
My goal is: output at Sop level some points with per-point pdg attributes created inside the topnet. It's very light task, no geo manipulation, only pdg attributes handling and assigning to geo.
Super ideal for me would be being able to do 6): read at Sop level the Raw Geometry from the topnet output, without wasting time in writing it first to disk and then re-import it.
Since it's not possible, I tried to use the Rop Geometry Output, and here it comes issue 1), the slowness of out-process writing to disk.
So I tried to use the faster in-process GeometryImport saving capabilities, but issue 9) will make the geoimport node write pdg attributes with fixed values on points.
As of now I can only use Rop Geometry Output, which is a no go.
In my scenario the user of my Digital Asset needs to play with some parameters of the hda, every parameter change would trigger a fast in-process cooking in the topnet, whose output (points with specific attribute values) is to be visualized in the Viewport. This workflow needs some fast feedback from the topnet as the user changes parameters.
I guess it's wiser to try to port all the attributes creation task at SOP level, and I will use TOPs for the very last part when the actual render happens.
Thanks again!
no worries and thanks a lot for caring to answer!
1. This likely due to the overhead of spinning up a hython session. The ROP geometry is running out of process, whereas the geometry import node can depending on its setting, be running in process.Understood. It would nice to have a toggle to set the Rop Geometry to work in-process, for those situations when you don't really need multi-threading, but only a fast output to disk of few workitems.
2. This is either a bug or due to the fact that PDG node does not exist until TOPs graph gets cooked in some way to generate it. If you do Tasks -> Generate Static Workitems, and try again - does it still happen? If so, it's a bug and please upload a scene. If not, then it's due the the previously mentioned artifact - PDG is kept separate from TOPs so it can be detached in the future from Houdini and deployed completely independently.Yes, even when only generated, It still shows the behavior: a series of weird chars 0bZ 0bZ @dZ and then the aforementioned error code. I attached the scene
3. Yes, those functions require the unique ID of the workitem. Index is not enough because it is not unique.Now I realize that @pdg_index is different than work_item.index! And It makes perfectly sense. So we have 3 types of indexing in TOPs.
Now, given a topnode name and a @pdg_index it should be possible to retrieve the unique ID. But how?
As I'm building a hda Sop wrapper around a topnet, my goal is to be able to use an integer parameter to display a specific pdg_index of a specific topnode (using the function setSelectedWorkItem(idx)).
It's like a remote control, because the user won't be able to dive inside the topnet to manually select the workitem dot on the topnode.
Even better, it would be handy to have a new type of parameter with the ‘dotted UI’ similar to the topnet nodes. I guess for now one could simply use a chain of unlabelled parameter toggles, that would spawn in accordance to the amount of workitems of the topnode of choice.
6. Only the invoke and geometry import can access the raw geometry at the moment.What I meant is: when I select the topnet at sop level, I expected to see the raw geometry information displayed in the geometry spreadsheet. So I could append some sop nodes to the output connector of the the topnet network. Now it's only possible when the topnet save files to disk.
I tried to use the invoke top node, but with the ‘write geometry’ unchecked it won't output any geometry at sop level.
Also, what is the purpose of the output node inside TOPs?
It doesn't work like in a normal subnetwork: If I add a second output node, no second outputs connectors would be spawned on the topnet node.
It would be nice to have multiple outputs from a topnet. In case of topnet with separate branches that I want to output at Sop level, I can only use the force-recook button and manually set the render flag to the branch I want to see at sop level. If I need to see both branches, I should split them in two different topnets.
8. You can find it documented here: https://www.sidefx.com/docs/houdini/tops/pdg/PartitionHolder.html?origin_team=T045BRUUR [www.sidefx.com]Oh thanks, I couldn't find it when I searched through the main page. I think it's not indexed in the menu
9. Likely a bug, we'll look into it further. Let us know if this is urgent, we'll try to look at it sooner in that case.Not super urgent, but would be great if you could just check the .hip file [www.sidefx.com] and confirm that it's a bug and nothing due to my inexperience with PDG that could easily be fixed by applying the correct workflow.
Anyway, this issue, along with issue 1) and issue 6) are somehow correlated in my scenario.
My goal is: output at Sop level some points with per-point pdg attributes created inside the topnet. It's very light task, no geo manipulation, only pdg attributes handling and assigning to geo.
Super ideal for me would be being able to do 6): read at Sop level the Raw Geometry from the topnet output, without wasting time in writing it first to disk and then re-import it.
Since it's not possible, I tried to use the Rop Geometry Output, and here it comes issue 1), the slowness of out-process writing to disk.
So I tried to use the faster in-process GeometryImport saving capabilities, but issue 9) will make the geoimport node write pdg attributes with fixed values on points.
As of now I can only use Rop Geometry Output, which is a no go.
In my scenario the user of my Digital Asset needs to play with some parameters of the hda, every parameter change would trigger a fast in-process cooking in the topnet, whose output (points with specific attribute values) is to be visualized in the Viewport. This workflow needs some fast feedback from the topnet as the user changes parameters.
I guess it's wiser to try to port all the attributes creation task at SOP level, and I will use TOPs for the very last part when the actual render happens.
Thanks again!
Houdini Lounge » GroupRange SOP Node- >>partition method clarity .
- Andr
- 900 posts
- Offline
Technical Discussion » Heightfield scatter node doesn't work with merged height volumes
- Andr
- 900 posts
- Offline
I don't know, could you produce an example hip file?
Edited by Andr - July 20, 2019 13:26:14
Houdini Indie and Apprentice » @ptnum > 0
- Andr
- 900 posts
- Offline
* ^0
* = everything
^n = except n.
this syntax works also with attributes and groups handling
Edited by Andr - July 19, 2019 12:31:53
Houdini Lounge » trying to count number of points in group using pop wrangle.
- Andr
- 900 posts
- Offline
npointsgroup(0,"test");
The ‘0’ is the input 0. So you are trying to read from input 0, which in your case doesn't have any group set.
Edited by Andr - July 19, 2019 09:06:15
-
- Quick Links