neblina Posted October 22, 2017 Share Posted October 22, 2017 Hello everyone, I'm learning Houdini and I'm very excited about it. The issues I had so far were manageable, except this one. Most tutorials aren't using version 16, and apparently a lot has changed. The major problem for me so far was working around the "Group Node", since it was split and it differs a lot from previous versions. So for this issue I'm encountering right now, I've been researching for hours and just getting frustrated. Whenever I can't find any solution online, it might mean the solution is very simple and obvious, but who knows. So here's the situation: I have a "Skin" Node which generates a closed geometry with 4 faces (imagine a cube without top and bottom). Since the shape is supposed to be altered later, what I'd would like to do is check which of the faces currently has the largest area, and separate it into a new group. Sounds simple. The first half I managed to accomplish. After "Skin" I appended a "Measure" Node and set it to Area. Next came a "Attribute Promote", where i get the previously created "area" attrib, which was a Primitive, and turned it into a Detail class, with the Maximum Method. I checked "Change New Name" and called it "maxArea". So far so good. The geometry spreadsheet shows me this one detail "maxArea" with the largest area of the faces I had before. Perfect. Now comes the the part where I'm sure my lack of knowledge cripples me. I still don't fully understand how these attributes interact, practically what does detail even mean. The tutorial instructs I should append a "Group" node and have this as Base Group (or Filter Expression, since it's deprecated): " $AREA == detail(".././attribpromote1/", maxArea, 0) ". This does not work at all, and from what I researched, I'm supposed to maybe use @-syntax, but all of my attempts were failed. I tried appending a "Group Expression", tried all of the combinations that I could think of, no luck. Should I promote it back to primitives? I'm really lost. In a nutshell, what would be the best method to accomplish this? Separate a face from a geometry into a new group based on its area size? Additionally, could anyone provide me some source where I could try and wrap my head around how to manipulate attributes? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Skybar Posted October 22, 2017 Share Posted October 22, 2017 Sounds like you are on the right track. I think Attribute Promote SOP deletes the original attribute by default, so untick that option if you haven't and you should be able to use it to compare with. Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted October 22, 2017 Share Posted October 22, 2017 (edited) Use the sort node to sort your primitives reversely by attribute "area" and put 0 in a group or split node set to primitives. Edited October 22, 2017 by konstantin magnus Quote Link to comment Share on other sites More sharing options...
Benyee Posted October 22, 2017 Share Posted October 22, 2017 there are some methods,or you can use group expression node with expression "@area==detail(0, "maxArea")",but first you must keep the area attribute in last step Quote Link to comment Share on other sites More sharing options...
neblina Posted October 22, 2017 Author Share Posted October 22, 2017 Thanks everyone for the replies, specially @Skybar that pointed me in the right direction. Fiddling further around, I managed to accomplish this not using the Group Node whatsoever, for my surprise and delight. It was indeed extremely simple, but isn't every problem after it's solved? I simply appended a "Delete" node to the "Attribpromote1" node, with the following Filter Expression: "@area==detail("../attribpromote1", maxArea, 0)". It was indeed necessary to uncheck the box on the previous node to avoid deleting the Original Geometry. Worked like a charm. Hope this might be helpful also to other newbies that face this in the future. If you search in the internet for anything like "Houdini 16 @area detail" or similar you get practically nothing. Cheers, and thank you all once again. Quote Link to comment Share on other sites More sharing options...
Noobini Posted October 22, 2017 Share Posted October 22, 2017 (edited) scratch that..already mentioned by Konstantin ! Edited October 22, 2017 by Noobini Quote Link to comment Share on other sites More sharing options...
neblina Posted October 22, 2017 Author Share Posted October 22, 2017 13 hours ago, konstantin magnus said: Use the sort node to sort your primitives reversely by attribute "area" and put 0 in a group or split node set to primitives. Oh, yes! That does it too! I'll probably stick to my solution, but thanks for the reply. Always good to know alternative ways. Thank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.