Hello,
you can often don't care much about that type of error on the merge node.
Anyway, why this happen? Because you merge two nodes that haves different attributes.
In your case, the right input node comes with a “N” attribute, while the left input node comes without it.
So what does the Merge Node do when it comes to merge everything into a single geometry?
It needs to create the missing attribute for the left input node, and initialize it to 0. You can't have NO attribute for a group of points, and have an attribute for the rest of the points of the same geo.
Furthermore, how did you ended up with the “N” attribute attached to the right input node?
Because in the copy to points node you have checked the “copy point attributes” toggle. This toggle is responsible of copying all the specified attributes from the source points onto the instanced geo.
If you uncheck it, you fix the warning message on the merge node
Found 900 posts.
Search results Show results as topic list.
Houdini Indie and Apprentice » Attribute Wrangle Mis-Match error on N.
- Andr
- 900 posts
- Offline
Technical Discussion » [py]Split scene layout: how to know which viewport is under the radial menu?
- Andr
- 900 posts
- Offline
Houdini Support team pointed out that hou.SceneViewer.curViewport() returns the currently selected viewport (which you normally select with ‘N’ hotkey).
So, in case of a split Scene View layout, I should press the N hotkey on the viewport I want to use, so that I could use the RadialMenu and perform the action on that selected viewport.
I wasn't aware of this! And it definitely works, but it slows down the workflow. A lot.
Also, as mentioned 2 posts ago [www.sidefx.com], in a “custom viewer state” the same hou.SceneViewer.curViewport() would return the correct viewport under the mouse cursor, regardless of which viewport had been selected with the “N” hotkey.
If you want to see, I attached a hip file with an embedded otl, to show it.
I would like the same behavior happening with a RadialMenu item script.
So far I can think of 3 different things to make it happen:
So, in case of a split Scene View layout, I should press the N hotkey on the viewport I want to use, so that I could use the RadialMenu and perform the action on that selected viewport.
I wasn't aware of this! And it definitely works, but it slows down the workflow. A lot.
Also, as mentioned 2 posts ago [www.sidefx.com], in a “custom viewer state” the same hou.SceneViewer.curViewport() would return the correct viewport under the mouse cursor, regardless of which viewport had been selected with the “N” hotkey.
If you want to see, I attached a hip file with an embedded otl, to show it.
I would like the same behavior happening with a RadialMenu item script.
So far I can think of 3 different things to make it happen:
- Use a custom viewer state to constantly write to a hidden parameter which viewport is being detected under the mouse cursor. Then read back the parameter from the radial menu item script. Seems pretty convoluted and not sure it would work or performs fine.
- From the RadialMenu item script, use python to run the “N” hotkey, before asking for curViewport(). How to run an hotkey with python? I can't find anything about it here http://www.sidefx.com/docs/houdini/hom/hou/hotkeys.html [www.sidefx.com]
- Similar to the previous, find a way to launch with python the “factory action” Select Viewport. How to do that?
Edited by Andr - March 7, 2019 05:02:19
Houdini Lounge » 17.5 Announcement
- Andr
- 900 posts
- Offline
Midphase
I think it would be amazing if there is more information about a possible Mantra GPU update, but I admit I'm not optimistic about it being ready within the near future.
Speaking about wild dreams, I would be amazed by a 17.5 release exclusively focused on fixing and resurrecting COPs to compete with Substance Designer
Edited by Andr - March 6, 2019 19:36:10
Technical Discussion » [py]Split scene layout: how to know which viewport is under the radial menu?
- Andr
- 900 posts
- Offline
In the documentation it's even mentioned the “split view” viewport, I don't understand what am I doing wrong.
http://www.sidefx.com/docs/houdini/basics/radialmenus.html#editing-menus [www.sidefx.com]
Could anybody please check this simple radial menu I've attached?
It has to be installed in the radialmenu directory of the user preferences directory. The start a new session of Houdini so it can be loaded.
Or even faster just create a radialmenu yourself and add this code to the button script:
Check it against a split viewport.
http://www.sidefx.com/docs/houdini/basics/radialmenus.html#editing-menus [www.sidefx.com]
Could anybody please check this simple radial menu I've attached?
It has to be installed in the radialmenu directory of the user preferences directory. The start a new session of Houdini so it can be loaded.
Or even faster just create a radialmenu yourself and add this code to the button script:
pane = kwargs["pane"]
print(pane.curViewport())
Check it against a split viewport.
Edited by Andr - March 6, 2019 18:20:26
Technical Discussion » [py]Split scene layout: how to know which viewport is under the radial menu?
- Andr
- 900 posts
- Offline
Nobody?
Anyway, I did further testing.
I implemented this basic custom viewer state example shown in this page http://www.sidefx.com/docs/houdini/hom/python_states [www.sidefx.com]
and I added to it the very same previous code
In the scenario, when the state is triggered, the current viewport under the mouse cursor is being correctly recognized, even when the scene view is split into 2 or more viewports.
1) Do you have any idea how to pass this information to the radial menu button?
2) And why this works, while the same code inside radial menu script button doesn't?
Anyway, I did further testing.
I implemented this basic custom viewer state example shown in this page http://www.sidefx.com/docs/houdini/hom/python_states [www.sidefx.com]
and I added to it the very same previous code
import toolutils activepane = toolutils.activePane(kwargs) print activepane.curViewport()
In the scenario, when the state is triggered, the current viewport under the mouse cursor is being correctly recognized, even when the scene view is split into 2 or more viewports.
1) Do you have any idea how to pass this information to the radial menu button?
2) And why this works, while the same code inside radial menu script button doesn't?
Edited by Andr - March 6, 2019 17:54:53
Houdini Indie and Apprentice » Can I use pack and instancing in this scenario?
- Andr
- 900 posts
- Offline
Houdini Indie and Apprentice » Can I use pack and instancing in this scenario?
- Andr
- 900 posts
- Offline
Hello,
I'm building a digital asset where the user controls and modifies a bar graph, that can have up to 100k bars (the reference image is showing just a basic example).
Each bar is built upon a point whose f@value attribute drives the height of the bar.
The system is already pretty responsive, with almost zero lag, but in order to squeeze even more performance and efficiency, I was wondering if I somehow can pack and instance the bars of the graph?
1) As far as I understand, I cannot use the pscale attribute to scale a primitive only in one dimension, right?
2) So I was wondering if I can pack and instance each bar as full-length primitive and then using some coloring or texturing trick to simulate different heights? Do you have any idea how to accomplish this?
Thanks for any help
I'm building a digital asset where the user controls and modifies a bar graph, that can have up to 100k bars (the reference image is showing just a basic example).
Each bar is built upon a point whose f@value attribute drives the height of the bar.
The system is already pretty responsive, with almost zero lag, but in order to squeeze even more performance and efficiency, I was wondering if I somehow can pack and instance the bars of the graph?
1) As far as I understand, I cannot use the pscale attribute to scale a primitive only in one dimension, right?
2) So I was wondering if I can pack and instance each bar as full-length primitive and then using some coloring or texturing trick to simulate different heights? Do you have any idea how to accomplish this?
Thanks for any help
Technical Discussion » How to improve this simple algorithm? (remove bridge lines from a set of connected lines)
- Andr
- 900 posts
- Offline
Houdini Indie and Apprentice » Issue painting zscale attribute with Polyextrude
- Andr
- 900 posts
- Offline
Yes, polyextrude node seems to be accepting only a primitive attribute as ‘distance scale’.
So you have a single value driving the extrusion of each prim, and therefore the extrusion would work only if the geo is divided into ‘individual elements’, with points being split (unique points for each prim).
Otherwise Houdini wouldn't know how to extrude each point, since it belongs at the same time to multiple faces with different ‘distance scale’ values each.
That's why in your case it's better to use the normal of the points as extrusion vector.
Anyway, I'm not on houdini atm.
What do you find difficult about those two steps?
Just insert the wrangle before the polyextrude. To set a vector in Vex you can use the set() function.
Cheers
So you have a single value driving the extrusion of each prim, and therefore the extrusion would work only if the geo is divided into ‘individual elements’, with points being split (unique points for each prim).
Otherwise Houdini wouldn't know how to extrude each point, since it belongs at the same time to multiple faces with different ‘distance scale’ values each.
That's why in your case it's better to use the normal of the points as extrusion vector.
Anyway, I'm not on houdini atm.
What do you find difficult about those two steps?
Just insert the wrangle before the polyextrude. To set a vector in Vex you can use the set() function.
Cheers
Edited by Andr - March 5, 2019 11:13:12
Technical Discussion » How to improve this simple algorithm? (remove bridge lines from a set of connected lines)
- Andr
- 900 posts
- Offline
Starting condition is a set of randomly scattered points, to whom it's appended a ‘connect adjacent pieces’ node (connection type set to points).
I'd like to clean the connected lines (that ideally form a face), from the single bridge lines (manually marked in orange in the reference image1).
My approach:
I'm happy with it but it's not 100% perfect, since I'm getting false negative results (marked in red in the reference image2).
I guess I have 3 ways I can take:
I put it to you.
Do you have any advice?
Thanks
I'd like to clean the connected lines (that ideally form a face), from the single bridge lines (manually marked in orange in the reference image1).
My approach:
float rad = ch("rad"); // the search radius of the connected adj pieces node i@valid = 0; // init var int pts[] = primpoints(0, @primnum); int neighs0[] = neighbours(0, pts[0]); removevalue(neighs0,pts[1]); // we remove from the array the pt belonging to same primitve of origin int neighs1[] = neighbours(0, pts[1]); removevalue(neighs1,pts[0]); // i[]@neighs0 = neighs0; //debug // i[]@neighs1 = neighs1; //We iterate through each neighbour point of pt0 and check its distance from each neighbour point of pt1. //If distance < rad, it means that they are connected and therefore @prim of origin is part of a virtual face. foreach(int pt0; neighs0) { vector pos0 = point(0, "P", pt0); foreach(int pt1; neighs1) { vector pos1= point(0, "P", pt1); if(distance(pos0, pos1) < rad) { @valid = 1; break; } } }
I'm happy with it but it's not 100% perfect, since I'm getting false negative results (marked in red in the reference image2).
I guess I have 3 ways I can take:
- I notice that these false negatives are usually (always?) edges of virtual faces with more than 3 points, so I wonder if should use a totally different approach, since my primitive algorithm is basically checking for triangles.
- Could I do a sort of post-fix, by finding a method to analyze all the detected bridges and find which of them are false negatives?
- Maybe there's some magic combination of sop nodes, that I'm not aware of, that could help me to do this without any code at all.
I put it to you.
Do you have any advice?
Thanks
Edited by Andr - March 5, 2019 09:27:54
Houdini Engine for Unreal » Is it possible to generate Terrain at Runtime?
- Andr
- 900 posts
- Offline
Houdini Indie and Apprentice » Instant Mesh causing Python error of invalid source
- Andr
- 900 posts
- Offline
hello,
maybe try asking for advice here?
https://www.sidefx.com/forum/topic/44816/ [www.sidefx.com]
cheers
maybe try asking for advice here?
https://www.sidefx.com/forum/topic/44816/ [www.sidefx.com]
cheers
Houdini Indie and Apprentice » Rotating/scaling primitives in place
- Andr
- 900 posts
- Offline
hello Simon,
maybe you could just use a primitive sop?
It works well for scaling down of each prim.
I guess you need to write some expression for the rotation. I would like to know as well.
http://www.sidefx.com/docs/houdini/nodes/sop/primitive.html [www.sidefx.com]
$DX, $DY and $DZ local attributes might be of help?
Cheers
maybe you could just use a primitive sop?
It works well for scaling down of each prim.
I guess you need to write some expression for the rotation. I would like to know as well.
http://www.sidefx.com/docs/houdini/nodes/sop/primitive.html [www.sidefx.com]
$DX, $DY and $DZ local attributes might be of help?
Cheers
Edited by Andr - March 4, 2019 14:57:03
Houdini Indie and Apprentice » Issue painting zscale attribute with Polyextrude
- Andr
- 900 posts
- Offline
it's because zscale is a primitive attribute.
Anyway an even simpler approach than the post-extrude averaging, is to assign @zscale to @N.y in a point wrangle.
Then in polyextrude set Extrusion Mode to Point Normal and use ‘Existing’.
Anyway an even simpler approach than the post-extrude averaging, is to assign @zscale to @N.y in a point wrangle.
Then in polyextrude set Extrusion Mode to Point Normal and use ‘Existing’.
Edited by Andr - March 4, 2019 14:42:54
Houdini Indie and Apprentice » Issue painting zscale attribute with Polyextrude
- Andr
- 900 posts
- Offline
Andr
Also, as you can see in the picture, the averaged result seems to be lower than it should be for the tallest prims. I don't know why this happens.
I understand now why this happens.
To fix it, just uncheck “output side” in the polyextrude.
The averaging calculation was taking in accounts also the bottom points of the side group.
But you don't actually need them.
ps. but I don't understand why you would need a polyextrude and 4 more nodes, while you can simply use a single point wrangle and link @P.y to your point @zscale attribute?
Edited by Andr - March 3, 2019 06:00:48
Houdini Indie and Apprentice » Issue painting zscale attribute with Polyextrude
- Andr
- 900 posts
- Offline
Hello,
that behavior is expected.
One thing you could do is to average the points.
You have to create first an attribute ID, so that you can keep track of the points after they get split by the polyextrude.
Then you average the position of the points with the same ID.
Finally you fuse the points.
I've made an example code, but it's not very efficient because it's doing the same loop operation for each point.
Ideally you should do the averaging calculation (which is a foorloop) only once for each group of points with the same ID (some grouping trick might help in this regard).
Also, as you can see in the picture, the averaged result seems to be lower than it should be for the tallest prims. I don't know why this happens.
I attached the project file as well
that behavior is expected.
One thing you could do is to average the points.
You have to create first an attribute ID, so that you can keep track of the points after they get split by the polyextrude.
Then you average the position of the points with the same ID.
Finally you fuse the points.
I've made an example code, but it's not very efficient because it's doing the same loop operation for each point.
Ideally you should do the averaging calculation (which is a foorloop) only once for each group of points with the same ID (some grouping trick might help in this regard).
Also, as you can see in the picture, the averaged result seems to be lower than it should be for the tallest prims. I don't know why this happens.
int ids[] = findattribval(0, "point", "id", i@id); float avg = 0; // average position foreach(int i; ids) { vector pos = point(0, "P", i); avg += pos.y; } avg /= len(ids); @P.y = avg;
I attached the project file as well
Edited by Andr - March 3, 2019 05:44:15
Houdini Indie and Apprentice » How can I drag the vieport dividers in a dual or quad viewport?
- Andr
- 900 posts
- Offline
I bet there's already a RFE regarding this problem.
You can contact support [www.sidefx.com] and ask to add your name to the RFE.
More people pushing a RFE, more chances to have it implemented
You can contact support [www.sidefx.com] and ask to add your name to the RFE.
More people pushing a RFE, more chances to have it implemented
Houdini Indie and Apprentice » How can I drag the vieport dividers in a dual or quad viewport?
- Andr
- 900 posts
- Offline
Unfortunately it doesn't seem possible to do it even with python
http://www.sidefx.com/docs/houdini/hom/hou/GeometryViewport.html [www.sidefx.com]
http://www.sidefx.com/docs/houdini/hom/hou/GeometryViewportSettings.html [www.sidefx.com]
I can't see any useful function in these classes.
http://www.sidefx.com/docs/houdini/hom/hou/GeometryViewport.html [www.sidefx.com]
http://www.sidefx.com/docs/houdini/hom/hou/GeometryViewportSettings.html [www.sidefx.com]
I can't see any useful function in these classes.
Edited by Andr - March 1, 2019 15:10:00
Technical Discussion » [py]Split scene layout: how to know which viewport is under the radial menu?
- Andr
- 900 posts
- Offline
My viewport layout is split in 2. I would like to know which of the 2 viewports is under the mouse cursor.
I'm using the following code in my radial menu script, but it is always returning the first viewport (perspective), even when the radial menu is over the second viewport (top).
Do you know how to do the trick?
Thanks!
I'm using the following code in my radial menu script, but it is always returning the first viewport (perspective), even when the radial menu is over the second viewport (top).
import toolutils activepane = toolutils.activePane(kwargs) print activepane.curViewport()
Do you know how to do the trick?
Thanks!
Edited by Andr - March 7, 2019 07:36:56
Houdini Indie and Apprentice » Tab Folder Parm. No callback and name grayed out?
- Andr
- 900 posts
- Offline
Hello,
I often experience the impossibility of changing the name of a tab folder parm, to do that, I have to switch to another type of folder, change the name, and then switch back to the Tab type.
Most importantly, for each tab I'd like to use a custom callback to different function in the Python Module, but the problem here is that only the first folder tab gives you the chance to add a callback script.
The callback of the very first tab will be triggered every time you select any tab.
As far as I know, there is no way to know which tab you have selected.
If you ask for parm.name() you will always get the name of the first tab folder, no matter if you have selected another tab.
Is there any fix for this?
I often experience the impossibility of changing the name of a tab folder parm, to do that, I have to switch to another type of folder, change the name, and then switch back to the Tab type.
Most importantly, for each tab I'd like to use a custom callback to different function in the Python Module, but the problem here is that only the first folder tab gives you the chance to add a callback script.
The callback of the very first tab will be triggered every time you select any tab.
As far as I know, there is no way to know which tab you have selected.
If you ask for parm.name() you will always get the name of the first tab folder, no matter if you have selected another tab.
Is there any fix for this?
Edited by Andr - March 1, 2019 06:49:47
-
- Quick Links