Hi,
How to delete faces in Foreach randomly for each group?
random in Foreach
8382 6 3-
- Irakli Omadze
- Member
- 13 posts
- Joined: 2月 2014
- Offline
-
- DASD
- Member
- 453 posts
- Joined: 2月 2013
- Offline
-
- Irakli Omadze
- Member
- 13 posts
- Joined: 2月 2014
- Offline
DASDThanks for reply
You could just sort the faces randomly and delete a range. If you need to delete a specific amount of faces for each group, you could run a for each loop on each group and do the range delete there.
![](/static/djangobb_forum/img/smilies/smile.png)
I am trying to do something like this
I have 3 grids. Each grid is in it's own group so I have 3 groups of primitives
![](http://www.picz.ge/img/s3/1512/15/5/535fb5027c76.jpg)
I want to delete primitives randomly in foreach and when I do that with rand($PR) they, of course, deleted similarly so I get this
![](http://www.picz.ge/img/s2/1512/15/2/22d268c0b36d.jpg)
so how do I delete them randomly for each group?
-
- DASD
- Member
- 453 posts
- Joined: 2月 2013
- Offline
-
- Irakli Omadze
- Member
- 13 posts
- Joined: 2月 2014
- Offline
-
- DASD
- Member
- 453 posts
- Joined: 2月 2013
- Offline
https://vimeo.com/142534639 [vimeo.com] - watch this.
In the old foreach SOP the expression was soemthign like: stamp(“..”,“FORVALUE”,0).
In the new foreach you will need a wired metadata node and you get the iteration number with detail(“../metanode”,“iteration”,0)
In the old foreach SOP the expression was soemthign like: stamp(“..”,“FORVALUE”,0).
In the new foreach you will need a wired metadata node and you get the iteration number with detail(“../metanode”,“iteration”,0)
-
- Irakli Omadze
- Member
- 13 posts
- Joined: 2月 2014
- Offline
DASDThat helped
https://vimeo.com/142534639 [vimeo.com] - watch this.
In the old foreach SOP the expression was soemthign like: stamp(“..”,“FORVALUE”,0).
In the new foreach you will need a wired metadata node and you get the iteration number with detail(“../metanode”,“iteration”,0)
![](/static/djangobb_forum/img/smilies/smile.png)
Thanks a lot
-
- Quick Links