Jump to content

scattering options


cgcris

Recommended Posts

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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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 :-)

Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

 

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by danw
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...