schnelli Posted June 14, 2010 Share Posted June 14, 2010 Hi, Since the Scatter SOP generates a random point scattering on the surface, I created a SOP for a uniform point distribution. Here is a small sample of the scatterer: More information and the .otl can be found at http://www.schnellhammer.net/blog Cheers Christian Quote Link to comment Share on other sites More sharing options...
Macha Posted June 14, 2010 Share Posted June 14, 2010 That's really nice stuff Christian! I love it! Did you work out the algorithm or got it from somehwere? Quote Link to comment Share on other sites More sharing options...
schnelli Posted June 14, 2010 Author Share Posted June 14, 2010 That's really nice stuff Christian! I love it! Did you work out the algorithm or got it from somehwere? Thanks a lot! Yes, I worked out the algorithm. But it's nothing magic, really. The idea is to move points away from the other points. You just need a small number of iterations to get a stable state. It's like a "separation" steering behavior used in crowd simulations. On my blog I give a short description about the idea and technique used for the scatterer. Quote Link to comment Share on other sites More sharing options...
pclaes Posted June 14, 2010 Share Posted June 14, 2010 Good stuff - especially nice to see it working in 3d as well. - I haven't tried your sop yet, but the algorithm should work for volumes too. Perhaps consider uploading it to the exchange or vfxToolbox. Also a next step would be to play with the distance between your neighbours so you can adaptively create more dense areas (say where the user would want more points (based on some painted attribute/texture map), but still evenly distributed). There are threads on the forum that already do this, but mostly only in 2d and it's not wrapped up in an otl. Another thing to consider is the curvature of your input geometry, again adding more points where curvature is high, so you get a better adaptive distribution (and representation of the object). Quote Link to comment Share on other sites More sharing options...
ikarus Posted June 15, 2010 Share Posted June 15, 2010 the example implementation of using this for 3d triangulation looks pretty sweet, gonna try this out Quote Link to comment Share on other sites More sharing options...
edward Posted June 15, 2010 Share Posted June 15, 2010 http://en.wikipedia.org/wiki/Lloyd%27s_algorithm ? (Personally, I'm kinda disappointed with this wikipedia entry but oh well ) Quote Link to comment Share on other sites More sharing options...
schnelli Posted June 15, 2010 Author Share Posted June 15, 2010 Good stuff - especially nice to see it working in 3d as well. - I haven't tried your sop yet, but the algorithm should work for volumes too. Perhaps consider uploading it to the exchange or vfxToolbox. Also a next step would be to play with the distance between your neighbours so you can adaptively create more dense areas (say where the user would want more points (based on some painted attribute/texture map), but still evenly distributed). There are threads on the forum that already do this, but mostly only in 2d and it's not wrapped up in an otl. Another thing to consider is the curvature of your input geometry, again adding more points where curvature is high, so you get a better adaptive distribution (and representation of the object). Yes, I already played with this idea and I am going to integrate a "density" to handle the distance between the points. Also volume scattering is possible. If I find some time I will make a update to the scatterer. Oh, of course...I'll upload it to the exchange platforms. Quote Link to comment Share on other sites More sharing options...
schnelli Posted June 15, 2010 Author Share Posted June 15, 2010 (edited) http://en.wikipedia.org/wiki/Lloyd%27s_algorithm ? (Personally, I'm kinda disappointed with this wikipedia entry but oh well ) I know this wikipedia entry. An interesting algorothm....it is similar, but not the same. My scatterer works completely without a voronoi computation Edited June 15, 2010 by schnelli Quote Link to comment Share on other sites More sharing options...
edward Posted June 16, 2010 Share Posted June 16, 2010 Like I said, I was disappointed with the wikipedia entry. It doesn't have to use the voronoi. Quote Link to comment Share on other sites More sharing options...
Jason Posted June 16, 2010 Share Posted June 16, 2010 This looks very useful -- thanks for sharing! Quote Link to comment Share on other sites More sharing options...
NagyG Posted June 21, 2010 Share Posted June 21, 2010 Hi Christian, I have tried your asset, it really works. Thanks that you shared this with us. I have already tried this ixDartThrowEmission ice compound with Houdini. However it is brute-force, it is not as slow as I expected. Cheers, Gergo DartThrowBF.otl DartthrowBF.hip Quote Link to comment Share on other sites More sharing options...
schnelli Posted June 28, 2010 Author Share Posted June 28, 2010 (edited) Hi Gergo, thanks for your post! I also tried out your otl and I like it. Great! Thanks for sharing. Cheers, Christian Hi Christian, I have tried your asset, it really works. Thanks that you shared this with us. I have already tried this ixDartThrowEmission ice compound with Houdini. However it is brute-force, it is not as slow as I expected. Cheers, Gergo Edited June 28, 2010 by schnelli Quote Link to comment Share on other sites More sharing options...
Mzigaib Posted July 28, 2010 Share Posted July 28, 2010 (edited) How do you build and triangulate the mesh from points? Edited July 30, 2010 by Mzigaib Quote Link to comment Share on other sites More sharing options...
sibarrick Posted July 28, 2010 Share Posted July 28, 2010 Good work, thanks for sharing, very useful! Quote Link to comment Share on other sites More sharing options...
Mzigaib Posted July 29, 2010 Share Posted July 29, 2010 (edited) Really useful tool, thanks for sharing. Is there a way to make the points not shift position if the surface is animated? Edited July 29, 2010 by Mzigaib Quote Link to comment Share on other sites More sharing options...
schnelli Posted August 1, 2010 Author Share Posted August 1, 2010 How do you build and triangulate the mesh from points? The Triangulate2D SOP is able to build a geometry from the given points. The problem is, the Triangulate2D SOP projects the geometry onto a 2D plane....so thats why it gets a little more complex.... For my porpuse, I needed small pieces of the geometry. So, the process can be: - Split your source geometry into smaller parts (e.g. voronoi pieces) - Uniform scatter each piece - Create a triangulated mesh via Triangulate2D SOP and project the geo back onto the original one with the RaySOP. - Finally, reconnect the pieces to get a triangulated mesh. I attached a sample picture which shows this process. Quote Link to comment Share on other sites More sharing options...
schnelli Posted August 1, 2010 Author Share Posted August 1, 2010 (edited) Really useful tool, thanks for sharing. Is there a way to make the points not shift position if the surface is animated? The Uniform Scatter is based on the houdini build-in Scatter SOP, which distributes the points randomly on the surface. So you get different distributions if the geometry changes, even if the change is minimal. But there is a solution. Once you uniform scattered your geometry, you can "stitch" the points on the geometry by storing for each point the barycentric coordinate relative to the source geometry (see the "pointdist" expression function). On each frame you do not need do scatter again, just move the points on the new position, resulting from the barycentric coordinates. This works fine, the points "glue" on your animated geometry. And another advantage is: you just need do scatter once. Edited August 2, 2010 by schnelli Quote Link to comment Share on other sites More sharing options...
dynamoanders Posted February 13, 2012 Share Posted February 13, 2012 Hello Christian. Really enjoyed your Uniform Scatter :-)! i was playing around with it, but I want to use the normals as the ordinary scatter does. Do you have an idea how I can get the normals working? Thanks //Anders Quote Link to comment Share on other sites More sharing options...
schnelli Posted February 14, 2012 Author Share Posted February 14, 2012 Hello Christian. Really enjoyed your Uniform Scatter :-)! i was playing around with it, but I want to use the normals as the ordinary scatter does. Do you have an idea how I can get the normals working? Thanks //Anders Hello Anders, you are right, the uniform scatter does not compute the normals. My first idea is to use my csClosestPrimitive VEX node. It can compute the closest point to a specified geometry and returns the interpolated normal of this location. You can find the tool on my blog: http://schnellhammer.net/blog/2011/08/houdini-closest-primitive-vex-function/ Attached a simple hip file demonstrating this tool in combination with the uniform scatterer. Cheers, Christian csUniformScatterNormals.hip Quote Link to comment Share on other sites More sharing options...
monkibase Posted September 20, 2014 Share Posted September 20, 2014 Hi! This was very useful! I diged inside a little and added point distribution from the paint attributes. So fell free to use it too if you need it. I added some parameters, they mostly edit point count. I made some assumptions so a little change of these numbers may help to achieve better results: uniform_paint_scatter.hipnc 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.