Jump to content

Automatically count how many copies needed to fill area


hampuseh

Recommended Posts

Greetings! 
I am currently scattering points on a area that I then copy objects to. In this case the area is the trunk of a tree and the objects copied to the points are bark pieces.

My question is, is there a way for Houdini to measure the Trunk area and then measure the bark pieces to then count how many bark pieces are needed to cover the whole trunk? At least a rough estimate would be wonderful as a start for the points scattered. I am using pscale for the bark pieces so if there is a way to count that in.

 

 

 

Edited by hampuseh
Link to comment
Share on other sites

Well for the scatter node, the density scale is measured per m^2, so if you use a measure SOP to measure the area (it will be set to perimeter by default)
you can then use an attribute promote SOP to promote the area from primitive to detail, using the "sum" method.

you now should have the total surface area as a detail attribute.

Then you can fetch that attribute, and divide it by the size of your bark pieces, times some kind of smudge factor and put that as the density in you scatter node.
That should give you a reasonable filling in :) 

  • Like 1
  • Thanks 1
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...