Found 900 posts.
Search results Show results as topic list.
Houdini Lounge » Historical Paintings Get a Pixelated Update
- Andr
- 900 posts
- Offline
what I like in the original is that it features rectangular shapes, instead of the squares.
Edited by Andr - Feb. 17, 2019 13:47:15
Technical Discussion » Python: Arrays supported?
- Andr
- 900 posts
- Offline
Hello again,
I was trying to collect the values of a point attribute with the following:
and I get this error: “Attribute must support tuple access”
I guess that's because my attribute is an integer array, and that function can't deal with it?
Anyway, I can collect the arrays if I iterate through each point:
but I wanted to use the pointIntAttribValues() function because it is said to be faster than iterating through each point, when you want all the values for one attribute.
I was trying to collect the values of a point attribute with the following:
geo.pointIntAttribValues("myAttribute")
and I get this error: “Attribute must support tuple access”
I guess that's because my attribute is an integer array, and that function can't deal with it?
Anyway, I can collect the arrays if I iterate through each point:
allArrays = [] for point in geo.points(): myAttribute = point.intListAttribValue("myAttribute") allArrays.append(myAttribute)
but I wanted to use the pointIntAttribValues() function because it is said to be faster than iterating through each point, when you want all the values for one attribute.
Houdini Indie and Apprentice » Bend multiple lines separately
- Andr
- 900 posts
- Offline
This might be an interesting read too
https://forums.odforce.net/topic/25760-curling-hair-curves-with-vex/ [forums.odforce.net]
cheers
https://forums.odforce.net/topic/25760-curling-hair-curves-with-vex/ [forums.odforce.net]
cheers
Houdini Indie and Apprentice » few more questions about compile blocks (-:
- Andr
- 900 posts
- Offline
tamteI was reading the compile node documentation instead.. and completely forget to have a refresh on this too, thank you.
what about the docs? http://www.sidefx.com/docs/houdini/model/compile [www.sidefx.com]
1. I don't think this is currently happening, while it's possible to detect if topology or any attribute changed from the last cook I'm not sure it's possible to pin point which points have different values
This would be great to have it implemented, if doable. I can imagine it would be useful for the following scenario (which is actually my case): a digital asset where the user uses a multiparm block folder. Every block of parameters added by the user set the attributes for a point or a prim which will be iterated over by the for-loop. So the user playing with a parmblock at time modifies the corresponding specific iteration at time.
Thanks again for the effort you put into explaining Houdini stuff,
cheers
Edited by Andr - Feb. 16, 2019 06:02:33
Houdini Indie and Apprentice » few more questions about compile blocks (-:
- Andr
- 900 posts
- Offline
I've watched both the masterclass and the hou 16 presentation, I have a couple of question about loops and compile blocks.
Current setup is:
loop over points, with merge each iteration. Each point has attributes whose different values are driving some operations inside the loop\compile block.
thanks for the clarification!
cheers
Current setup is:
loop over points, with merge each iteration. Each point has attributes whose different values are driving some operations inside the loop\compile block.
- After the first cook, do the for-loop and the compile blocks have any sort of smart caching, so that if the user just modifies the attributes values for a single point, the loop/compile would cook only that single iteration, and would prevent from re-cooking the other iterations whose points have not changed?
- Sometimes the compile end block seems not to care about enforcing the use of spare inputs. I just copy pasted references of parameter outside the compile block to a parameter inside it, without receiving any error. What am I missing here?
- I assumed that for-loops with feedback weren't allowed in a compile block, since each iteration builds upon the previous one. How is that possible to have them multi-threaded?
- Compile blocks are only useful for wrapping for-loops? Or could you potentially take advantage of them in other tasks?
- Python “verbs” seem super useful and powerful, but, being python, they have nothing to do with multithreading, right? They're just a nice side effect of your work to make the node compilable?
thanks for the clarification!
cheers
Houdini Indie and Apprentice » Resample curve by density ramp [it was: Exponential points displacement, with no overlaps. What's the math behind?]
- Andr
- 900 posts
- Offline
Hello Aizatulin,
thanks for the brush up of high school math, very much needed here eheh
I looked at your example, and you guessed right, I was indeed trying to find a general approach to resample a curve based on a density ramp.
Unfortunately it seems still occurring the mess up with the point overlapping.
I really wanted to find a mathematical solution to the problem, trying to link a function (in our case the ramp) to the resolution of a line. I guess there's some calculus involved?
Anyway, after lots of trial and error, I gave up to do it in a pure mathematical fashion (but still super curious about it!!), and went full brute-force
I ended up with an approach that seems to give pretty solid results: even if I'm not sure about the mathematical correctness of it, the point distribution seems to follow nicely the ramp, without overlapping.
So far I noticed 2 short comings:
Thanks again for your supervision, cheers
thanks for the brush up of high school math, very much needed here eheh
I looked at your example, and you guessed right, I was indeed trying to find a general approach to resample a curve based on a density ramp.
Unfortunately it seems still occurring the mess up with the point overlapping.
I really wanted to find a mathematical solution to the problem, trying to link a function (in our case the ramp) to the resolution of a line. I guess there's some calculus involved?
Anyway, after lots of trial and error, I gave up to do it in a pure mathematical fashion (but still super curious about it!!), and went full brute-force
I ended up with an approach that seems to give pretty solid results: even if I'm not sure about the mathematical correctness of it, the point distribution seems to follow nicely the ramp, without overlapping.
So far I noticed 2 short comings:
- it's brute force, it works with exponential amount of your desired point resolution (exponent depend on the precision you need)so you can't have a high target resolution
- especially when you work with low points, it seems that the first point is missing. That's because of the final downsampling technique involved (delete points in 1 of 2 points step * n amounts of times). This could be fixed, I guess, by restoring the original ends point of the curve.
- Could anybody validate the correctness of the feedback loop inside? I have the feeling that sometimes it would loop only 1 time, regardless of how you set the value of the “precision” parameter that should drive the number of iterations of the loop. I'm pretty sure that I have seen a undesired final amount of points ( > than the set resolution that I set). But I can't really reproduce this behavior.
Thanks again for your supervision, cheers
Edited by Andr - Feb. 14, 2019 07:12:59
Houdini Indie and Apprentice » expand vex array from [A,B,C] to [A,A,A,B,B,C,C] ?
- Andr
- 900 posts
- Offline
Hello Henry, thanks a lot for reviewing my code and for the nice tips.
Your approach is clever, and very exotic to me: I've never used nested loops in that fashion, where the two loops are mutually dependent.
After spending some time on it I think I start to understand the logic.
thanks again
Your approach is clever, and very exotic to me: I've never used nested loops in that fashion, where the two loops are mutually dependent.
After spending some time on it I think I start to understand the logic.
thanks again
Houdini Indie and Apprentice » expand vex array from [A,B,C] to [A,A,A,B,B,C,C] ?
- Andr
- 900 posts
- Offline
I have an array and I need to expand it by a given amount, by reusing its values for the new indices, so that each new value is inserted next to its source value.
Like in the title, say I want to expand it by 4, then I should get 2 new A, 1 new B, 1 new C, and the expanded array will be:
My code kind of works 'till the delta newArray-oldArray is <= of the size of the old array. After that threshold, the insert() function would append out-of-bounds-Zeroes for the rest of the loop.
Any idea how to make it work?
Thanks a lot!
Like in the title, say I want to expand it by 4, then I should get 2 new A, 1 new B, 1 new C, and the expanded array will be:
[A,A,A, B,B, C,C]
My code kind of works 'till the delta newArray-oldArray is <= of the size of the old array. After that threshold, the insert() function would append out-of-bounds-Zeroes for the rest of the loop.
i[]@array = {1,2,3,4,5}; int count; for(int i=0; i<10; i++) { count = i % len(i[]@array); insert(i[]@array, count+=i , i[]@array[count]); } // return: [ 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
Any idea how to make it work?
Thanks a lot!
Edited by Andr - Feb. 13, 2019 11:07:07
Technical Discussion » How to grow and shrink selection procedurally?
- Andr
- 900 posts
- Offline
are you looking for this behavior perhaps ?
https://www.sidefx.com/tutorials/houdini-game-dev-tools-procedural-edge-loopsgroup-expandcontract/ [www.sidefx.com]
if so, you'll find the node in the game dev toolset
https://www.sidefx.com/tutorials/houdini-game-dev-tools-procedural-edge-loopsgroup-expandcontract/ [www.sidefx.com]
if so, you'll find the node in the game dev toolset
Houdini Indie and Apprentice » [pyhton] Total number of parms in a folder? (with nested folders included)
- Andr
- 900 posts
- Offline
I need to know the amount of parameters of a multiparm block folder template.
So far I'm doing the following:
So far I'm doing the following:
multiparmTemplate = node.parm("myMultiParmFolder").parmTemplate().parmTemplates() nparms_eachBlock = len(multiparmTemplate)
- The problem arises when you have a nested folder (with its own child parms) inside your multiparm folder. The above code would treat that folder as 1 single element.
Is there a way to do it procedurally, without having to add-hardcode to the above result the number of items of the nested folder (number that can vary)? - Bonus question: my ultimate goal is to know the Index of the multiparm block, given one of the parameter instances of the multiparm folder. (es. from “range3x” , it should return 3)
I managed to do it in a convoluted way, withbut multiParmInstanceIndices() is accounting for the child paramaters of the nested Folder, and for the folder itself.parm.multiParmInstanceIndices()[0] / nparms_eachBlock
So, if I can't have the exact number of items of the multiparm template folder, I should hardcode it. Maybe there's a function that I overlooked that can tell you the id of the multiparm block of provenience?
Edited by Andr - Feb. 11, 2019 14:43:25
Houdini Indie and Apprentice » Weird behavior of kwargs["parm"] in a callbackscript.
- Andr
- 900 posts
- Offline
It's logged as bug #94685
It's a problem easy to fix when you know how it happens otherwise you could be puzzled a bit.
A good practice is to never leave a new parm registered with the default “parm” name, especially if you are using callback scripts with kwargs.
I know it can happen especially when you are testing a lot of parameters, so be aware that if you get a KeyError and you know you have a callbackscript with kwargs, review the callback and sees if it has changed.
if you want to see this behavior in action have a look at the file, and see if you can reproduce it (just by changing the name of the default parm)
It's a problem easy to fix when you know how it happens otherwise you could be puzzled a bit.
A good practice is to never leave a new parm registered with the default “parm” name, especially if you are using callback scripts with kwargs.
I know it can happen especially when you are testing a lot of parameters, so be aware that if you get a KeyError and you know you have a callbackscript with kwargs, review the callback and sees if it has changed.
if you want to see this behavior in action have a look at the file, and see if you can reproduce it (just by changing the name of the default parm)
Edited by Andr - Feb. 11, 2019 04:39:40
Houdini Indie and Apprentice » Resample curve by density ramp [it was: Exponential points displacement, with no overlaps. What's the math behind?]
- Andr
- 900 posts
- Offline
Starting from a base line with evenly spread points (in green), I managed to displace them along the axis with this simple code:
(then I re-fit all the values in 0-1 space, not shown in the above code)
I'd like now to find the max range for Mult so that no overlaps occur with higher value of Mult.
When a point travels along the axis, it should not go past the next point.
Can't use for-loops/solvers.
Need to find the mathematical trick to link Mult and the Exponent(that can vary).
float mult = ch("mult"); float baseIncr = 1 - (@ptnum / (@numpt*1.0)); float powerIncr = pow(baseIncr, 2); // exponent=2 // with exponent 2 and Mult > .583, point order is messed up @P.x += powerIncr*mult;
I'd like now to find the max range for Mult so that no overlaps occur with higher value of Mult.
When a point travels along the axis, it should not go past the next point.
Can't use for-loops/solvers.
Need to find the mathematical trick to link Mult and the Exponent(that can vary).
Edited by Andr - Feb. 14, 2019 03:53:59
Houdini Indie and Apprentice » Weird behavior of kwargs["parm"] in a callbackscript.
- Andr
- 900 posts
- Offline
It seems there's some conflict going on.
I'm using a callback script for myFirstParameter that calls myFunction(parm) in the Python Module.
the callback script goes like:The problem seems to arise when you create a new parameter and forget to register its name, Houdini by default would call it “parm”.
When you later update the new parameter with a custom name “mySecondParameter”, Houdini seems to automatically update the callback script function in the very first parameter. Now the callback is:
And when you use myFirstParameter you would get the error: Error running callback: Traceback (most recent call last):
File “<stdin>”, line 1, in <module> KeyError: ('mySecondParameter',)
Does it look like a bug or is that the natural behavior of how things should go?
Can you reproduce it?
I'm using a callback script for myFirstParameter that calls myFunction(parm) in the Python Module.
the callback script goes like:
hou.phm().myFunction(kwargs["parm"])
When you later update the new parameter with a custom name “mySecondParameter”, Houdini seems to automatically update the callback script function in the very first parameter. Now the callback is:
hou.phm().myFunction(kwargs["mySecondParameter"])
And when you use myFirstParameter you would get the error: Error running callback: Traceback (most recent call last):
File “<stdin>”, line 1, in <module> KeyError: ('mySecondParameter',)
Does it look like a bug or is that the natural behavior of how things should go?
Can you reproduce it?
Edited by Andr - Feb. 8, 2019 14:10:44
Houdini Indie and Apprentice » How to disable multiparm parm with combined conditions?
- Andr
- 900 posts
- Offline
Technical Discussion » Unified Noise study
- Andr
- 900 posts
- Offline
Technical Discussion » Selected prims in Python...
- Andr
- 900 posts
- Offline
now I'm using that code in a radial menu script.
No more “recursion in parm callback”, but still losing the selection.
No more “recursion in parm callback”, but still losing the selection.
Edited by Andr - Feb. 7, 2019 19:50:14
Technical Discussion » Unified Noise study
- Andr
- 900 posts
- Offline
Hello,
I need to use the Unified Noise output and remap it to specific new ranges.
The problem is that I don't know what are the bounds of the different ‘unified noises’.
Without this information I can't really do a precise a remap, right?
Only piece of information I could find about the noise ranges is here [www.sidefx.com], but those values don't seem to apply to the Unified Noises.
Example: the sparse convolution in the Turbolent Noise is said to be in range (-1.7, 1.7), but this is a range that I clearly not see in the Sparse Convolution of the Unified Noise.
Anybody has the real values?
Otherwise I should go empirical by offsetting the different noises along the time in a solver and register the min max values?
Thanks for any help!
I need to use the Unified Noise output and remap it to specific new ranges.
The problem is that I don't know what are the bounds of the different ‘unified noises’.
Without this information I can't really do a precise a remap, right?
Only piece of information I could find about the noise ranges is here [www.sidefx.com], but those values don't seem to apply to the Unified Noises.
Example: the sparse convolution in the Turbolent Noise is said to be in range (-1.7, 1.7), but this is a range that I clearly not see in the Sparse Convolution of the Unified Noise.
Anybody has the real values?
Otherwise I should go empirical by offsetting the different noises along the time in a solver and register the min max values?
Thanks for any help!
Houdini Indie and Apprentice » Asset from single wrangle node?
- Andr
- 900 posts
- Offline
sorry for the late reply,
in the parameter tab of your selected node there's that little gear you can click on to access some options relative to the specific node parameters.
There you can save and load back parameters presets.
If you do that in a wrangle node it will save the code typed inside the wrangle.
(The code you type in the wrangle is actually the value of a string parameter)
Cheers
in the parameter tab of your selected node there's that little gear you can click on to access some options relative to the specific node parameters.
There you can save and load back parameters presets.
If you do that in a wrangle node it will save the code typed inside the wrangle.
(The code you type in the wrangle is actually the value of a string parameter)
Cheers
Edited by Andr - Feb. 7, 2019 04:30:36
Technical Discussion » Using wedge to export multiple results.
- Andr
- 900 posts
- Offline
hi, if you double click on the wedge node you can access the content, which is that “shell node” causing the error.
You usually can read the exact problem occurred in the shell node info panel.
As far as I understand the rendering pipeline, you should connect the object you want to render to the input of the wedge.
The “output driver” field requires the ROP render node you want to use to render (example: if you want to render out a geometry, you should add a Rop Geometry node to the network and fill the output driver field with the path to the new Rop)
I don't know how to concatenate wedges, sorry. Would like to know it too.
Hope somebody more expert than me can help you out
Cheers
You usually can read the exact problem occurred in the shell node info panel.
As far as I understand the rendering pipeline, you should connect the object you want to render to the input of the wedge.
The “output driver” field requires the ROP render node you want to use to render (example: if you want to render out a geometry, you should add a Rop Geometry node to the network and fill the output driver field with the path to the new Rop)
I don't know how to concatenate wedges, sorry. Would like to know it too.
Hope somebody more expert than me can help you out
Cheers
Edited by Andr - Feb. 7, 2019 04:17:19
Technical Discussion » Python: Arrays supported?
- Andr
- 900 posts
- Offline
Hey, this seems the function you are looking for
print geo.stringListAttribValue(“mats”)
print geo.stringListAttribValue(“mats”)
-
- Quick Links