scattering, using foreach and compiled blocks issue.

   1494   3   1
User Avatar
Member
63 posts
Joined:
Offline
Hello,

I have just made and compared two small test setups where I scatter objects via copying them onto points. I am comparing the newer method of using a foreach and compiled blocks with the older way of copy stamping, because I thought the new method would be so much faster. But somehow it isn't… So now I wonder why that is? Would somebody be so kind to have a look at the setup I made and tell me if I have done everything correctly, or if there is a better way to achieve what I want?

Cheers,

Doug
Edited by Dougie0047 - 2017年8月18日 16:45:24

Attachments:
scattering_issue_v002.hipnc (176.2 KB)

User Avatar
Member
471 posts
Joined: 11月 2013
Offline
Hello.
You should use npoints(-2) instead of using @ptnum in delete node in this case you need to create secondry spare parameter.
Hope this helps.

Attachments:
scattering_issue_v001.hipnc (889.2 KB)

User Avatar
Member
63 posts
Joined:
Offline
Thanks for your reply Nima!

I am sure you are right, but can you explain why exactly that one needs to use the npoints(-2) instead of @ptnum? Also, I downloaded your fix, but it does not seem to work any faster than before, which leads me to believe that there is more I have forgotten. Would you have any idea of what that could be?

Cheers,

Doug
User Avatar
Member
471 posts
Joined: 11月 2013
Offline
In my PC your compiled SOP network was about 5 times faster than copy stamp node!
If you use performance monitor tab, it will greatly show you how much compiled sop is faster than copy stamp.
Houdini freezes a bit when trying to cook entire for loop because it needs to draw lot's of geometry in the scene view.
Setting Display As option of copy nodes to bounding box cause to speed up things.
This masterclass gives you good information about compiled SOPs:
https://vimeo.com/222881605 [vimeo.com]
Edited by Nima - 2017年8月18日 17:33:57
  • Quick Links