I can see that I can manually delete instances with a modify point instances lop. Select stuff, turn on the ‘prune’ option, they delete.
I can also see that I can procedurally move instances by enabling ‘edit transform’, set the prims to /instancer1, set source to ‘internal sop’, move things inside the sop network, they move.
I can't see a way to procedurally delete instances. If I blast things in the sop network, they re-appear when I get back to lops. I tried using a collection lop to grab instances in a bounding box, but it doesn't appear to select anything. Had a peek in the hda, can see that the deletion stuff is separate from the transform stuff, but didn't delve much deeper than that, as I figure there must be an easier way I'm missing.
To be clear, this is about editing an existing instancer. Can't go the lazy way and edit at the source, these might be instancers setup earlier in the pipe, or from another app.
-matt
procedurally delete point instances
8468 19 7- mestela
- Member
- 1737 posts
- Joined: 5月 2006
- Offline
- jsmack
- Member
- 7741 posts
- Joined: 9月 2011
- Offline
- Hamilton Meathouse
- Member
- 166 posts
- Joined: 11月 2013
- Offline
- Tim Crowson
- Member
- 235 posts
- Joined: 10月 2014
- Offline
- npetit
- スタッフ
- 356 posts
- Joined: 2月 2008
- Offline
- Tim Crowson
- Member
- 235 posts
- Joined: 10月 2014
- Offline
- Dan_Andersen
- Member
- 12 posts
- Joined: 6月 2018
- Offline
- mestela
- Member
- 1737 posts
- Joined: 5月 2006
- Offline
- Dan_Andersen
- Member
- 12 posts
- Joined: 6月 2018
- Offline
Ok, no worries
And, to make my comments not completely superfluous, we ended up hiding the points like this, which works for our needs (vex credit goes to a coworker):
And, to make my comments not completely superfluous, we ended up hiding the points like this, which works for our needs (vex credit goes to a coworker):
int nums = usd_attriblen(0, @primpath, "positions"); int invisible[]; resize(invisible, nums); for (int i = 0; i < nums; ++i){ if (rand(i + ch("seed")) < ch("prune_amt")) invisible[i] = i; else invisible[i] = -1; } for (int i = nums-1; i >= 0; --i){ if (invisible[i] == -1) removeindex(invisible, i); } i[]@invisibleIds = invisible;
Edited by Dan_Andersen - 2021年5月26日 06:42:17
- Tim Crowson
- Member
- 235 posts
- Joined: 10月 2014
- Offline
- npetit
- スタッフ
- 356 posts
- Joined: 2月 2008
- Offline
- Tim Crowson
- Member
- 235 posts
- Joined: 10月 2014
- Offline
- Tim Crowson
- Member
- 235 posts
- Joined: 10月 2014
- Offline
I'm sure there is a simple adjustment I can make to fix this, but it's eluding me.... If I switch to operating on Points rather than Primitives and place the camera "in" the point cloud, the camuv bounds seem to extend past the back of the camera. How can I correct this to cull points behind the camera?
EDIT: Nevermind, I got it... just had to add @camuv.z>0 to the group list in my blast node.
EDIT: Nevermind, I got it... just had to add @camuv.z>0 to the group list in my blast node.
Edited by Tim Crowson - 2021年9月1日 11:43:43
- Tim Crowson
Technical/CG Supervisor
Technical/CG Supervisor
- Tim Crowson
- Member
- 235 posts
- Joined: 10月 2014
- Offline
Sorry to triple post, but I consistently get this warning with the ModifyPointInstances LOP, whether I'm working in the test scene provided above, or in a new scene entirely. Using 18.5.596. The node works, but keeps throwing this warning.
Edited by Tim Crowson - 2021年9月1日 11:47:24
- Tim Crowson
Technical/CG Supervisor
Technical/CG Supervisor
- jsmack
- Member
- 7741 posts
- Joined: 9月 2011
- Offline
Tim Crowson
The node works, but keeps throwing this warning.
The warnings look like version synchronization warnings. The file above was saved with version 18.5.672
The file gives me an idea for an RFE though. Could we get a usd/lops camera signature for toNDC/fromNDC?
Edited by jsmack - 2021年9月1日 11:51:57
- Tim Crowson
- Member
- 235 posts
- Joined: 10月 2014
- Offline
- jsmack
- Member
- 7741 posts
- Joined: 9月 2011
- Offline
Tim Crowson
Right, but I get this warning in a new scene built from scratch, with my local version.
I don't have 596 installed, so I don't know if that's normal or not.
Edit:
I see it if I 'match definition' of the modify point instances node after unlocking. You can ignore it. I think it means the node was probably created in an earlier version of Houdini, and the nodes inside have changed since it was created.
Edited by jsmack - 2021年9月1日 12:00:03
- Tim Crowson
- Member
- 235 posts
- Joined: 10月 2014
- Offline
- npetit
- スタッフ
- 356 posts
- Joined: 2月 2008
- Offline
- Tim Crowson
- Member
- 235 posts
- Joined: 10月 2014
- Offline
-
- Quick Links