cgcris Posted August 27, 2014 Share Posted August 27, 2014 Hi, The scattering options of the "scatter node" seem to quite limited. I was trying to get one point per polygon of the grid. I can get away using the "old_pop_net" with a source node, and I could see way more options there, but surely there is a better way of controlling points on a grid? Thanks, C Quote Link to comment Share on other sites More sharing options...
danw Posted August 27, 2014 Share Posted August 27, 2014 I suppose it's assumed you'll roll your own if you need more complexity. You could either use a foreach node to iterate over each primitive and scatter 1 point on each... or for a possibly more elegant/efficient approach, you could try using the AttribVOP set to run over primitives, and inside use the Add Point vex node, along with a lookup of the position of the primitive at a randomized U and V parameter. Quote Link to comment Share on other sites More sharing options...
Annon Posted August 27, 2014 Share Posted August 27, 2014 You can use an addSOP to get what you want. Remove the geometry and leave the points. Quote Link to comment Share on other sites More sharing options...
cgcris Posted August 27, 2014 Author Share Posted August 27, 2014 thanks for the options, the addSOP does leave with the points of the geometry but that's about it. I guess I will have to create my own, but it's just baffling that the scatter node doesn't give more options (like the source node inside the old_pop_net does). C Quote Link to comment Share on other sites More sharing options...
kleer001 Posted August 27, 2014 Share Posted August 27, 2014 thanks for the options, the addSOP does leave with the points of the geometry but that's about it. I guess I will have to create my own, but it's just baffling that the scatter node doesn't give more options (like the source node inside the old_pop_net does). C As much as I love the package there's some big holes in Houdini, presets, namely. But there's all the tools we need to roll our own whatever, AND it's usually pretty easy to add that whatever we want. Especially now with the Wrangle nodes. Yum yum yum! Quote Link to comment Share on other sites More sharing options...
danw Posted August 27, 2014 Share Posted August 27, 2014 Yeah, it's pretty much this sort of thing that Orbolt is perfect for... incidental tools that you might create to provide some more useful building blocks, and throw 'em up on there for others while you're at it. This seems like a good candidate. I'll keep it in mind for next time I've got nothing in my schedule... assuming someone hasn't beaten me to it :-) Quote Link to comment Share on other sites More sharing options...
fathom Posted August 27, 2014 Share Posted August 27, 2014 toggle on "compute # of points", set "points per area" to 1, toggle off "scatter based on primitive area"... no? Quote Link to comment Share on other sites More sharing options...
tjeeds Posted August 27, 2014 Share Posted August 27, 2014 It's super simple to do this, just put this in an AttribWrangle set to run on Primitives: addpoint(0,@P); and if you don't want to keep the original geometry tack this on: removeprim(0,@primnum,1); Quote Link to comment Share on other sites More sharing options...
SpencerL Posted August 28, 2014 Share Posted August 28, 2014 Feed geo into divide SOP > uncheck 'convex polygons' and tick on 'compute dual'. then add an Add SOP > Delete Geo But Keep the Pts. Another trick you can do is instead of using the divide SOP, you can replace that with a convert SOP > Convert to > Circle. Then feed that into the Add SOP > Delete Geo But Keep Pts 1 Quote Link to comment Share on other sites More sharing options...
Annon Posted August 28, 2014 Share Posted August 28, 2014 Sorry I misread what you were after. Here is a quick way of doing it in SOPs. example_pointPerPoly.hip Quote Link to comment Share on other sites More sharing options...
cgcris Posted August 28, 2014 Author Share Posted August 28, 2014 It's super simple to do this, just put this in an AttribWrangle set to run on Primitives: addpoint(0,@P); and if you don't want to keep the original geometry tack this on: removeprim(0,@primnum,1); Sort of, but with this method you are getting a point per point, what I wanted was a point in the center of each polygon. Quote Link to comment Share on other sites More sharing options...
cgcris Posted August 28, 2014 Author Share Posted August 28, 2014 Feed geo into divide SOP > uncheck 'convex polygons' and tick on 'compute dual'. then add an Add SOP > Delete Geo But Keep the Pts. Another trick you can do is instead of using the divide SOP, you can replace that with a convert SOP > Convert to > Circle. Then feed that into the Add SOP > Delete Geo But Keep Pts How are you Spencer! Long time no see This works well, but it seems like such a hack! haha. Quote Link to comment Share on other sites More sharing options...
cgcris Posted August 28, 2014 Author Share Posted August 28, 2014 Sorry I misread what you were after. Here is a quick way of doing it in SOPs. Again this is still not giving me a single point per polygon. Ideally I want options! Will try and write an attribute wrangle node for all this. Quote Link to comment Share on other sites More sharing options...
danw Posted August 28, 2014 Share Posted August 28, 2014 (edited) Edit: stupidly posted the Compute Dual trick without reading the whole thread :-P I will say, it's anything but a hack... it's probably about the most direct and dependable way to get a point at the center of each polygon. Edited August 28, 2014 by danw Quote Link to comment Share on other sites More sharing options...
mawi Posted August 28, 2014 Share Posted August 28, 2014 But if you run the wrangle node in primitive mode. You will get a point per polygon. Use privuv() to fetch attributes. Quote Link to comment Share on other sites More sharing options...
SpencerL Posted August 28, 2014 Share Posted August 28, 2014 Cristobal, I just realized it was you! Still in London I see. Hope all is going well! It may seem like a hack as there isnt any expressions or scripting, but I like easy ways Its putting a point in the centroid of each prim which sounds like what you are after. Will do the same thing as the popnet trick of emitting per prim. Another way, though may be computationally more expensive is to plug your geo into a facet SOP > unique pts, then add a primitive SOP > tick on Do Xformations and set scale to 0. Then add a Fuse SOP > tick on Keep Unused Points. Scaling the prims to 0 will use each unique prim centroid as the pivot location. 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.