I am unconsciously thinking of code optimisation lately when I am working in Houdini.
This is not a topic I am particularly familiar with. But I am starting to use the performance monitor a lot more and I want to learn more about it.
To the question of; "is it bad to unnecessarily assign variables to as much things as possible?", I seem to get the answer: No, it is bad to not do that!
I did not expect this.
Is it useful to learn why it is this way and about these things in general? Are there language specific differences? What is a good way to learn about this? Is there an Houdini-optimised way to learn about this?
Thanks for any advice. :-)
Found 188 posts.
Search results Show results as topic list.
Technical Discussion » Code optimisation
- OdFotan
- 192 posts
- Offline
Technical Discussion » Disable compile in Invoke Compile Block?/Invoke HDA|Subnet?
- OdFotan
- 192 posts
- Offline
martinkindl83
hello mate
any new info on this one?
how did the RFE go?
They misunderstood my feature request. I explained it farther to them; that it is possible, that is basically is what an HDA does, but that I want it without the whole HDA construct around it (just a simple copy of all the nodes in a subnet, or in a 'new kind' of block, then: whatever you want, as long as it functions....), but they didn't respond. So I hope they will take this as constructive criticism. I am not stupid I know what I'm asking and I know what it's worth and I know it's possible because I too can think how a computer thinks and have build a programmers-brain. See the images for my contribution.
animatrix_
You can't circumvent the compiling requirements when you invoke a compiled network. The only thing you can do is to find alternatives or workarounds for non-compileable nodes. Often times it's possible to do this using VEX, etc.
I do not talk about it needing to be compiled. I talk about about such a same thing, but for uncompiled nodes, and not needing it to be compiled at all (no speed benefits asked). That's why I name it a 'Invoke Subnet' RFE or talk about a new type of block altogether.
-
-
Mail thread:
Edited by OdFotan - Nov. 22, 2022 04:24:41
Technical Discussion » Fastest way to compute the closest distance between 2 lines?
- OdFotan
- 192 posts
- Offline
Hi folks,
I was hoping somebody could help me out.
xyzdist() might look at a whole polygon/surface, but it still has to look from one point; it doesn't look 'from' a whole primitive, if you know what I mean.
See the picture. It isn't a point where the lines nearly intersect.
How to find the closest distance in the most resource-efficient way ?
Thanks.
Edit: preferably in VEX, since I see this ‘primdist’ function in HScript which seems to do what I want, but I am writing VEX because HScript is just for parameters, right?
I was hoping somebody could help me out.
xyzdist() might look at a whole polygon/surface, but it still has to look from one point; it doesn't look 'from' a whole primitive, if you know what I mean.
See the picture. It isn't a point where the lines nearly intersect.
How to find the closest distance in the most resource-efficient way ?
Thanks.
Edit: preferably in VEX, since I see this ‘primdist’ function in HScript which seems to do what I want, but I am writing VEX because HScript is just for parameters, right?
Edited by OdFotan - Nov. 17, 2022 07:11:20
Technical Discussion » Spawning KineFX rigs - (my take / technical feedback)
- OdFotan
- 192 posts
- Offline
UPDATE:
Mine cumbersome method was faster. Too bad because your method is much more logical and clean node-wise. Thanks a lot for your input.
Hopefully somebody will come with a magical VEX fix or crack of the Bone Capture type attribute.
Mine cumbersome method was faster. Too bad because your method is much more logical and clean node-wise. Thanks a lot for your input.
Hopefully somebody will come with a magical VEX fix or crack of the Bone Capture type attribute.
Technical Discussion » Spawning KineFX rigs - (my take / technical feedback)
- OdFotan
- 192 posts
- Offline
Yes that is also possible. I thought it would be kind of hard because it involves a detail attribute, but indeed you can do that in a foreach loop like you do.
I was also wondering if you could do it in VEX with the packed capture attributes somehow. It seems like a custom type of attribute, I wonder if we could make one ourselves (or modify the strings directly, without the detail attribute).
Anyhow, I will test out your method the coming week.
I was also wondering if you could do it in VEX with the packed capture attributes somehow. It seems like a custom type of attribute, I wonder if we could make one ourselves (or modify the strings directly, without the detail attribute).
Anyhow, I will test out your method the coming week.
Edited by OdFotan - July 23, 2022 01:29:17
Houdini Indie and Apprentice » array: remove same values?
- OdFotan
- 192 posts
- Offline
Thank you.
int origLs[] = {1,1,1,2,2,3,4,5,5,5,6,7,7,7,8,8,9}; int setOrigLs[]; foreach(int orig; origLs){ if (find(setOrigLs, orig) < 0) append(setOrigLs, orig); } origLs = setOrigLs;
Technical Discussion » Spawning KineFX rigs - (my take / technical feedback)
- OdFotan
- 192 posts
- Offline
I wanted to POP-spawn some KineFX rigs and this was my take:
Doing a capturepackedgeo every frame worked, but was incredibly slow. Especially on more complex rigs.
The trick for me was doing the capture on a still frame (i.e. make still points for all the ids in the POP simulation),
and then doing everything (applying pscale, position/movement, deletion/death) after the capture has already been done.
It feels a bit convoluted, but hopefully someone can correct enlighten me on that:
I want to hear from you what you think of it. Maybe I am missing something obvious. Is there any better way? (I am not familiar with crowds yet)
Please let me know what you think.
Thanks, ✅
Doing a capturepackedgeo every frame worked, but was incredibly slow. Especially on more complex rigs.
The trick for me was doing the capture on a still frame (i.e. make still points for all the ids in the POP simulation),
and then doing everything (applying pscale, position/movement, deletion/death) after the capture has already been done.
It feels a bit convoluted, but hopefully someone can correct enlighten me on that:
I want to hear from you what you think of it. Maybe I am missing something obvious. Is there any better way? (I am not familiar with crowds yet)
Please let me know what you think.
Thanks, ✅
Edited by OdFotan - July 22, 2022 05:43:10
Technical Discussion » How to copy position like Attribute Copy but in KineFX
- OdFotan
- 192 posts
- Offline
Whoops just isolating the points and setting a Skeleton Blend to 1 does it. Don't know if it's the fastest but it works.
Technical Discussion » New VEX Functions in H19.5
- OdFotan
- 192 posts
- Offline
Always the most excited for VEX functions, for some reason.
(Event tho I was the kindof guy who started of Houdini asking "Do I need to learn to program?" and stuff, being happy that 'I didn't have to')
They always seem to come more in the .5 release.
Finally no need for AttribDelete SOPs anymore.
(Event tho I was the kindof guy who started of Houdini asking "Do I need to learn to program?" and stuff, being happy that 'I didn't have to')
They always seem to come more in the .5 release.
removepointattrib
Finally no need for AttribDelete SOPs anymore.
Edited by OdFotan - July 22, 2022 02:05:14
Technical Discussion » How to copy position like Attribute Copy but in KineFX
- OdFotan
- 192 posts
- Offline
Hi,
I'd like to copy the position (P) of some points onto some root joints with the same i@id.
It copies it, but all the children don't move along like in the Rig Pose.
How can I make it so that the children move with it?
Hip file included.
Thanks in advance.
I'd like to copy the position (P) of some points onto some root joints with the same i@id.
It copies it, but all the children don't move along like in the Rig Pose.
How can I make it so that the children move with it?
Hip file included.
Thanks in advance.
Technical Discussion » More Than One Return Statement in Vex User Defined Function
- OdFotan
- 192 posts
- Offline
Curious fact:
You can't just supply a value if you don't need the value, like you can for example with with &prim argument of the xyzdist() function if you don't need the primitive number stored in a variable.
It gives the error: "Read-only expression for write-only parameter".
You can't just supply a value if you don't need the value, like you can for example with with &prim argument of the xyzdist() function if you don't need the primitive number stored in a variable.
It gives the error: "Read-only expression for write-only parameter".
Edited by OdFotan - April 16, 2022 04:47:44
Technical Discussion » Python get the node that has the display flag toggled
- OdFotan
- 192 posts
- Offline
For in an Object Merge node:
I am wondering tho how I could have this updated every time I change a Display Flag in the currentTab..
Right now I have to change some parameter on the Object Merge to have it update.
Anyone any ideas ?
editors = [pane for pane in hou.ui.paneTabs() if isinstance(pane, hou.NetworkEditor) and pane.isCurrentTab()] if not editors: return None network_editor = editors[-1] network_path = network_editor.pwd() display_node_path = network_path.displayNode().path() return display_node_path
I am wondering tho how I could have this updated every time I change a Display Flag in the currentTab..
Right now I have to change some parameter on the Object Merge to have it update.
Anyone any ideas ?
Technical Discussion » Parent Constraint in Rig VOP Point Mode doesn't work?
- OdFotan
- 192 posts
- Offline
Hi,
So in this setup I tried a parent constraint. And when I do by hand it does work, but when I try to do it procedurally it doesn't.
It is the exact same, but only in Point Mode.
Hip file is attached.
Am I missing something, or is does the KineFX Constraints only work it Detail Mode?
So in this setup I tried a parent constraint. And when I do by hand it does work, but when I try to do it procedurally it doesn't.
It is the exact same, but only in Point Mode.
Hip file is attached.
Am I missing something, or is does the KineFX Constraints only work it Detail Mode?
Technical Discussion » Simple mechanical KineFX rig: "Missing boneCapt attribute"
- OdFotan
- 192 posts
- Offline
Hi,
I have watched this tutorial, and tried it on something of my own.
But I got the error: "Missing boneCapt attribute" in the bone deform. I don't remember him setting up this attribute.
How can I fix it? (hip file is attached)
Thank you,
https://www.youtube.com/watch?v=tb_TQJ5FNJI [www.youtube.com]
I have watched this tutorial, and tried it on something of my own.
But I got the error: "Missing boneCapt attribute" in the bone deform. I don't remember him setting up this attribute.
How can I fix it? (hip file is attached)
Thank you,
https://www.youtube.com/watch?v=tb_TQJ5FNJI [www.youtube.com]
Technical Discussion » Karma error: "Failed to complete render: exit code 139"
- OdFotan
- 192 posts
- Offline
I haven't tried it on the newer builds. But I have searched the Changelogs on "XPU", and did not see any changes or bug fixes regarding CryptoMatte, or the Albedo pass.
I am still struggling with this error. Almost done with the tedious process of restarting the render every 0-6 frames,
BUT unfortunately did not include CryptoMatte. But at least I can denoise now.
I am still struggling with this error. Almost done with the tedious process of restarting the render every 0-6 frames,
BUT unfortunately did not include CryptoMatte. But at least I can denoise now.
Edited by OdFotan - Dec. 30, 2021 12:39:50
Technical Discussion » Karma error: "Failed to complete render: exit code 139"
- OdFotan
- 192 posts
- Offline
willh
Hey, why are you doing separate renders for your channels.
I did that because I discovered that Karma XPU does not support CryptoMatte, and also the Albedo pass doesn't come out on Karma XPU.
So if I want the benefit of a fast Karma XPU beauty pass, I'll have to do the others on Karma CPU.
I need the N and Albedo pass for for the Intel Denoiser and I also figured a Normal Pass with more pixel samples than the main render might be good.
Technical Discussion » Karma error: "Failed to complete render: exit code 139"
- OdFotan
- 192 posts
- Offline
I have simplified the render settings to try to debug from what it comes.
Now I only have no Beauty Pass, an N and Albedo pass, and I get the error.
While that same object perfectly renders the whole sequence in a XPU Karma render,
I have logged this as a bug to SideFX,
Now I only have no Beauty Pass, an N and Albedo pass, and I get the error.
While that same object perfectly renders the whole sequence in a XPU Karma render,
I have logged this as a bug to SideFX,
Technical Discussion » Set $HOUDINI_USER_PREF_DIR? (Mac)
- OdFotan
- 192 posts
- Offline
Hi guys,
I would like to have my $HOUDINI_USER_PREF_DIR on the cloud, because then I can have it all the same on all devices, and I can have version control of the files in that folder, even the .json files in the /packages folder, which the $HOUDINI_PATH does not seem to read and is seems only to be read when in the $HOUDINI_USER_PREF_DIR/packages.
How do I set it?
I had read that I need to set it before houdini.env, so I tried setting it as a permanent environment variable on my Mac.
In which I succeeded: Now when I type
Thanks for any help,
I would like to have my $HOUDINI_USER_PREF_DIR on the cloud, because then I can have it all the same on all devices, and I can have version control of the files in that folder, even the .json files in the /packages folder, which the $HOUDINI_PATH does not seem to read and is seems only to be read when in the $HOUDINI_USER_PREF_DIR/packages.
How do I set it?
I had read that I need to set it before houdini.env, so I tried setting it as a permanent environment variable on my Mac.
In which I succeeded: Now when I type
echo $HOUDINI_USER_PREF_DIR
in Terminal, I get the location on the Cloud, but when I do it in Houdini Textport Pane, I get the default string.Thanks for any help,
Edited by OdFotan - Dec. 17, 2021 15:41:39
Technical Discussion » Karma error: "Failed to complete render: exit code 139"
- OdFotan
- 192 posts
- Offline
Hi,
I get this Karma error after few frames.
Warning
Failed to complete render: exit code 139
Use a Log Viewer with External Render Processes enabled for more information.
How can I get to this Log Viewer the error talks about?
Thanks,
I get this Karma error after few frames.
Warning
Failed to complete render: exit code 139
Use a Log Viewer with External Render Processes enabled for more information.
How can I get to this Log Viewer the error talks about?
Thanks,
Houdini Lounge » Houdini 19 Visualize SOP
- OdFotan
- 192 posts
- Offline
jlait
Gear icon on the Top Right, Add Visualizer, Add Color Visualizer. This will get you the node-level visualizer it had by default before.
I see.
One little comment:
One thing I see happening tho is that the Visualiser kindof gets added the the 'normal' visualisers 'from' that node. (See image)
Even if I bypass that node or do not have the display flag on it, it stays visible. Which was kindof an advantage of having the visualiser located in the node, that you didn't see it when bypassed or when the display flag was not set on that visualiser, if I am honest with you.
I don’t see the point of having that node if it’s going to be global anyway.
Edited by OdFotan - Nov. 26, 2021 00:20:05
-
- Quick Links