blackchicken Posted November 19, 2009 Share Posted November 19, 2009 Hello, sorry for that question but I cant find it somewhere. I saw that somewhere but my head , I starting modeling titanic for little project at work, and I want model as much procedural as I could. I want model it in maya, but, why not houdini? so I have main body, There is a lot lot of little windows. I choose projecting circles copied on line. But triming create little artefact. So I choose polygons and cookie, works great. I create bounding group(for polycap), add polycap, but there I want little radius in windows for speculars to add measure of trunk. so I need extruding capped polys(12 ngon) how I could procedural select it? I mean, group polys with more than 4points Thanks a lot for help. P.S.: Is there some easy way how to cup holes in mesh? I mean no groups, in maya I select model, choose hole, and maya automaticaly fill all holes. Houdini needs selected boundary edges or selected faces. (If I could get automaticaly group of new polygons, cups, will be great). Thanks BC. Quote Link to comment Share on other sites More sharing options...
graham Posted November 19, 2009 Share Posted November 19, 2009 The key is that you want to group any faces that have more than 4 vertices. Since there is no expression that gives you the number of vertices for a polygon in hscript, you can either do it with a simple python expression, or using Attribute Promote. In the attached file there are setups doing this. Using a python expression, you can compare the number of vertices for the currently iterating primitive and group if there are more than 4. len(pwd().curPrim().vertices()) > 4 Or you can create a vertex attribute, set the value to $VTX + 1, then use an Attribute Promote to promote it from being a vertex attribute to a primitive attribute using the Maximum method then use that attribute to group by. group_num_vertices.hipnc Quote Link to comment Share on other sites More sharing options...
Serg Posted November 19, 2009 Share Posted November 19, 2009 The key is that you want to group any faces that have more than 4 vertices. Since there is no expression that gives you the number of vertices for a polygon in hscript, you can either do it with a simple python expression, or using Attribute Promote. In the attached file there are setups doing this. Using a python expression, you can compare the number of vertices for the currently iterating primitive and group if there are more than 4. len(pwd().curPrim().vertices()) > 4 Or you can create a vertex attribute, set the value to $VTX + 1, then use an Attribute Promote to promote it from being a vertex attribute to a primitive attribute using the Maximum method then use that attribute to group by. $NVTX > 4 works too Quote Link to comment Share on other sites More sharing options...
graham Posted November 19, 2009 Share Posted November 19, 2009 That was what first came to mind, however for some reason my current Houdini build isn't playing so well with that so I had to suggest alternatives Quote Link to comment Share on other sites More sharing options...
Serg Posted November 19, 2009 Share Posted November 19, 2009 That was what first came to mind, however for some reason my current Houdini build isn't playing so well with that so I had to suggest alternatives Oh, Dont have houdini in front of me so cant test it here right now. Quote Link to comment Share on other sites More sharing options...
graham Posted November 19, 2009 Share Posted November 19, 2009 sigh. Further testing shows that the development build I have seems to have issues with local variable highlighting for lots of stuff. The first thing I tried was $NVTX > 4, but when I typed it in it came up red and I was like "Am I imagining that NVTX is a variable?". I should have hit Enter anyway since it works, even thoughn the input field saying it is invalid. I feel like a fool. Quote Link to comment Share on other sites More sharing options...
blackchicken Posted December 6, 2009 Author Share Posted December 6, 2009 perfect, thanks a lot $NVTX > 4 works great for me, cool little trick 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.