Hey, thanks for checking in.
I just realized I was missing an important piece of information: the difference between Unified Noise Static and Unified Noise (Dynamic). I learned it the hard way.
I was trying to hack my way into changing the basis parm of the static version on each iteration.
That's why I needed to force compile the vopnet. To update the noise type.
(I even duplicated the HDA of the Static version, to expose the basis input a feed it a string attribute, basis input parm is already exposed in the non-static version lol)
Apparently I should use the Dynamic for such workflow.
Thanks for the explanation, very appreciated
Found 900 posts.
Search results Show results as topic list.
Technical Discussion » how to execute a python command inside a compiled for-loop?
- Andr
- 900 posts
- Offline
Technical Discussion » how to execute a python command inside a compiled for-loop?
- Andr
- 900 posts
- Offline
and while we are talking about PointVop and Python, I have a bonus question:
Do you know how to evaluate/read with a python expression the result data of a Vop Node output?
'result' output is not a parm, so I can't really do parm.eval() on it
Do you know how to evaluate/read with a python expression the result data of a Vop Node output?
'result' output is not a parm, so I can't really do parm.eval() on it
Edited by Andr - July 12, 2019 03:09:29
Technical Discussion » Attrib of size n VS actual attrib array
- Andr
- 900 posts
- Offline
Hey, sorry for the confusion regarding TOPs.
I wrongfully assumed that a Topnet would serialize and display ALL the workitems detail attribs in its geometry spreadsheet. Example for a 2 workitems Topnet with a detail vector attrib:where the last 3 items would belong to the 2nd workitem, and you just need to know the size of the attrib to assign the corresponding workitem index.
So that's why I was a bit scared of a potential endless mess in my detail spreadsheet.
That's not the case actually, the Topnet will only merge detail attribs of each workitem into a single one. So I guess you can't have more than 4 components per attribute with TOPs.
I wrongfully assumed that a Topnet would serialize and display ALL the workitems detail attribs in its geometry spreadsheet. Example for a 2 workitems Topnet with a detail vector attrib:
myVec[0], myVec[1], myVec[2], myVec[3], myVec[4], myVec[5]
So that's why I was a bit scared of a potential endless mess in my detail spreadsheet.
That's not the case actually, the Topnet will only merge detail attribs of each workitem into a single one. So I guess you can't have more than 4 components per attribute with TOPs.
Edited by Andr - July 12, 2019 03:02:43
Technical Discussion » houdini python create array attribute (not get) and store it on points
- Andr
- 900 posts
- Offline
Technical Discussion » how to execute a python command inside a compiled for-loop?
- Andr
- 900 posts
- Offline
In a compiled for-loop I have a pointVop that I need to force-compile on each iteration.
I would use a python node at the beginning of the for-loop, to .pressButton() on the force compile button of attribVop. Unfortunately the python node cannot be used inside a compiled block.
What could I do?
UPDATE: Oh, I see I could register an event callback. Will give this a try. Hopefully it will work for a parm change inside a compiled for-loop
hou.nodeEventType.ParmTupleChanged
UPDATE2: not it doesn't work with compiled blocks.
I also tried this workaround:
create a node with an integer parameter linked to the iteration number of the meta import.
Then set a callback script for the parm, but the callback would only be triggered on manual changes made by the user, not by the meta import node.
thanks!
I would use a python node at the beginning of the for-loop, to .pressButton() on the force compile button of attribVop. Unfortunately the python node cannot be used inside a compiled block.
What could I do?
UPDATE: Oh, I see I could register an event callback. Will give this a try. Hopefully it will work for a parm change inside a compiled for-loop
hou.nodeEventType.ParmTupleChanged
UPDATE2: not it doesn't work with compiled blocks.
I also tried this workaround:
create a node with an integer parameter linked to the iteration number of the meta import.
Then set a callback script for the parm, but the callback would only be triggered on manual changes made by the user, not by the meta import node.
thanks!
Edited by Andr - July 12, 2019 04:21:35
Technical Discussion » Scattered point positions to the nulls (obj level)
- Andr
- 900 posts
- Offline
Hi, have a look at the attached example.
It's a starting point. It would create at obj level as many nulls as the points in the reference node.
You need to set their position with python, I'll leave that to you
cheers
It's a starting point. It would create at obj level as many nulls as the points in the reference node.
You need to set their position with python, I'll leave that to you
cheers
Edited by Andr - July 11, 2019 06:52:33
Technical Discussion » Scattered point positions to the nulls (obj level)
- Andr
- 900 posts
- Offline
so you want to create as many new null nodes as your scattered points, and assign them their position?
You could do it in python, but it seems not very efficient to create so many objects..
You could do it in python, but it seems not very efficient to create so many objects..
Technical Discussion » Attrib of size n VS actual attrib array
- Andr
- 900 posts
- Offline
hello Babaj,
thanks for taking some time for explaining.
As the picture shows, B in this case is not a vec4, as it's been created with size of 5; as you suggested, it's impossible to access the fifth component with vex.
But I've just found out you can do it with python: you can read and write to components greater than 4.
So it's definitely a Vex specific limitation
thanks for taking some time for explaining.
As the picture shows, B in this case is not a vec4, as it's been created with size of 5; as you suggested, it's impossible to access the fifth component with vex.
But I've just found out you can do it with python: you can read and write to components greater than 4.
So it's definitely a Vex specific limitation
PDG/TOPs » few more questions [updated]
- Andr
- 900 posts
- Offline
9)Don't know what I'm doing wrong, but I'm experiencing the following issue:
if I try to add a workitem attribute to the actual geometry in a geoimport node, the value would be the same for each file when the source geometry class is set to point.
Instead, the attribute value will be correctly written when the source geo class is set to detail.
The problem with the latter is that, being it a detail attribute, the geometry spreadsheet of the topnode would merge all the values into one single detail attribute.
I produced an example file
if I try to add a workitem attribute to the actual geometry in a geoimport node, the value would be the same for each file when the source geometry class is set to point.
Instead, the attribute value will be correctly written when the source geo class is set to detail.
The problem with the latter is that, being it a detail attribute, the geometry spreadsheet of the topnode would merge all the values into one single detail attribute.
I produced an example file
Edited by Andr - July 11, 2019 03:55:55
Technical Discussion » Attrib of size n VS actual attrib array
- Andr
- 900 posts
- Offline
regarding question 3), how to access such attributes in vex, I noticed that the detail expression function on a parameter would read it without problem, while the corresponding vex function would not, being the third argument of the function always ignored, as written on the documentation.
So a summary of what I understood so far:
You can access the attribute “B” withonly up to the fourth component.
You can access entries with an id bigger than 3, only if you do a bridging with a paramater hscript expression, BUT that's not very ideal and procedural if you have a big array.
Is this correct?
So a summary of what I understood so far:
You can access the attribute “B” with
p@B[n]
You can access entries with an id bigger than 3, only if you do a bridging with a paramater hscript expression, BUT that's not very ideal and procedural if you have a big array.
Is this correct?
Edited by Andr - July 10, 2019 14:54:46
Technical Discussion » Attrib of size n VS actual attrib array
- Andr
- 900 posts
- Offline
Hello,
I have few questions regarding array handling. Please refer to the reference image.
thanks for any help!
cheers
I have few questions regarding array handling. Please refer to the reference image.
- What's the difference between A and B attribs?
- Which one is more efficient to use when you handle huge arrays?
- How to access B entries in VEX? I noticed that some TOPs nodes create this kind of attributes on Geometry, and I don't know how to deal with them.
- What's the purpose of setting a qualifier for an attribute?
- In the ‘attrib create’ documentation page, under “size” parameter I read the following note:
For arrays, this specifies the tuple size of the array, not the number of entries of the array. A value of 3 for a float array will thus make a vector array.
It seems suggesting that you could have a multi-dimensional array, but I know that they are not actually supported. So what does it really mean? I'm confused
thanks for any help!
cheers
Technical Discussion » How to delete/replace a String parameter reference in python
- Andr
- 900 posts
- Offline
I guess in this case you need to use the setExpression() function, instead of the regular set().
it's documented here: https://www.sidefx.com/docs/houdini/hom/hou/Parm.html [www.sidefx.com]
cheers
it's documented here: https://www.sidefx.com/docs/houdini/hom/hou/Parm.html [www.sidefx.com]
cheers
PDG/TOPs » Make work item indices unique
- Andr
- 900 posts
- Offline
hi, this code in a python processor should do fine and manages to keep the original attribs, but you will lose the the dependencies, since you are creating brand new workitems:
i = 0 for w in upstream_items: newItem = item_holder.addWorkItem(index= i, cloneTarget=w) i += 1
Edited by Andr - July 10, 2019 08:59:55
PDG/TOPs » few more questions [updated]
- Andr
- 900 posts
- Offline
6) How to access in SOPs the ‘Raw Geometry’ stored by a geoimport node? My understanding is that Raw Geometry is just a cache of the file which is not being saved on the disk. But it doesn't show up in the topnet geometry spreedsheet. Sometimes I just need to read the geo on the fly. Writing it to disk would increase the latency of the operation.
7) Is there any way to avoid to write all the grouping information? This can be an overwhelming amount of unnecessary attributes, especially in the scenario where a single workitem corresponds to a single packed geometry (you dont really need groups as you can use point index)
8) Where is addItemToPartition(work_item, attrib) function documented? I can't happen to find it in the PDG API.
7) Is there any way to avoid to write all the grouping information? This can be an overwhelming amount of unnecessary attributes, especially in the scenario where a single workitem corresponds to a single packed geometry (you dont really need groups as you can use point index)
8) Where is addItemToPartition(work_item, attrib) function documented? I can't happen to find it in the PDG API.
Edited by Andr - July 11, 2019 09:24:28
PDG/TOPs » Collapse multiple work items into a single geometry import?
- Andr
- 900 posts
- Offline
Hi, you could load the files sequence with a ‘file merge’ node in SOPs context. It does what you're looking for.
There should be a way to use the file merge node also in TOPs inside a ropgeometry node (if u double click on it), to write to disk a single bgeo file, instead of a sequence.
And probably there's also a more official way to do it in TOPs, but I have no idea.. I'm new to TOPs as well.
cheers
There should be a way to use the file merge node also in TOPs inside a ropgeometry node (if u double click on it), to write to disk a single bgeo file, instead of a sequence.
And probably there's also a more official way to do it in TOPs, but I have no idea.. I'm new to TOPs as well.
cheers
Edited by Andr - July 9, 2019 15:28:25
PDG/TOPs » few more questions [updated]
- Andr
- 900 posts
- Offline
*edit: deleted 2 questions from the list which I've found a solution for and added a couple more of new questions
Hello,
PDG tech is so intriguing yet so exotic for me, apologies in advance if you find the following questions trivial:
thanks!
Hello,
PDG tech is so intriguing yet so exotic for me, apologies in advance if you find the following questions trivial:
- Why import geometry node is soooo much faster (like 400 times faster) than ropgeometry node in writing files to disk? In my system it takes geoimport node 1/10 of a second to write down to disk 10 files, while it's 40" for the ropgeo to accomplish the same task. Geoimport is set to evaluate the workitems attributes.
- In a ‘Python SOP’ node I was trying the following code:The returned result was quite exotic, something like “@G:”, varying on each cooking.
topNode = node.inputs()[0].node("test") print topNode.getPDGNode()
Later I started to get this error instead:TypeError: Unable to convert function return value to a Python type! The signature was (self: _pdg.Node) -> unicode
Is getPDGNode() function only usable in TOPs context? - Functions like getSelectedWorkItem(), setSelectedWorkItem(idx),etc don't use or return the @pdg_index. I guess they require the unique ID of the workitem, right? Is there any way to know the @pdg_index from the unique ID and vice-versa, so that I can use the aforementioned functions?
- Are you considering to have the NULL node working as holder of the upstream workitems? It would be very handy to be able to select the workitems on a NULL, especially when its input is a switch node. Also being able to set the render flag to it would help. Otherwise, is there any topnode that I can safely append to work as output to display the geometry in SOPs? I'm using a blank python script for now.
- If you execute a ropgeometry node without specifying the sop path ('use external sop' toggle is checked), it would cook normally without writing any file to disk, with no errors. Error would show up only later, when you try to ‘View Task Output’ as houdini is unable to find any file to load. This is potentially time wasting in the scenario where you want to actually use the file node inside the ropgeo subnet, but you forget to uncheck the ‘use external sop’ toggle. I assumed that when the sop path is left blank, the node would automatically use the file node inside as source.
thanks!
Edited by Andr - July 11, 2019 04:03:06
PDG/TOPs » Switching/Bypassing
- Andr
- 900 posts
- Offline
Apologies to the OP for the little OT,
regarding the mentioned Split node, I noticed that when applied on partitions the returned results are simple workitems.
So, how one can split partitions without losing them?
cheers
regarding the mentioned Split node, I noticed that when applied on partitions the returned results are simple workitems.
So, how one can split partitions without losing them?
cheers
Technical Discussion » Should we start learning Python2 or Python 3 now?
- Andr
- 900 posts
- Offline
I guess they are pretty much similar?
It shouldn't be a problem to adapt to py3 later on
It shouldn't be a problem to adapt to py3 later on
Technical Discussion » Scatter points on surface with falloff density near the edge
- Andr
- 900 posts
- Offline
Maybe less efficient than Aizatulin's solution, but a code-less approach is to use a falloff node.
Have a look at the example file (play with the parms in the colored node to change the effect)
Also, a more exotic approach would be creating the density map in a cop network.
Import your shape with a geometry node and try to shrink and blur it with some filters.
I tried a bit, with no much luck, the shrink/expand cop node seems buggy.
It would interesting to see it implemented..
cheers
Have a look at the example file (play with the parms in the colored node to change the effect)
Also, a more exotic approach would be creating the density map in a cop network.
Import your shape with a geometry node and try to shrink and blur it with some filters.
I tried a bit, with no much luck, the shrink/expand cop node seems buggy.
It would interesting to see it implemented..
cheers
PDG/TOPs » How-to combine a variable amount of geometryimport?
- Andr
- 900 posts
- Offline
-
- Quick Links