Move selected face primitives along normal in a loop?
717 4 0- LittleYellowSpider
- Member
- 16 posts
- Joined: Feb. 2019
- Offline
Hi,
Am struggling trying to come up with a good practical solution to a problem that needs to be solved to meet a deadline.
I am selecting a number of face primitives in a group range node and then want to select each face primitive in a FOR-EACH loop and move it randomly along its normal (positively and negatively).
Currently, this is to select the start and end faces in a group of cylinders representing roof timbers to add some variation in an archaeological reconstruction of an Iron Age Roundhouse for an educational project.
I will use the same technique for other building elements.
Any help really appreciated!
Thanks,
Shaun
Am struggling trying to come up with a good practical solution to a problem that needs to be solved to meet a deadline.
I am selecting a number of face primitives in a group range node and then want to select each face primitive in a FOR-EACH loop and move it randomly along its normal (positively and negatively).
Currently, this is to select the start and end faces in a group of cylinders representing roof timbers to add some variation in an archaeological reconstruction of an Iron Age Roundhouse for an educational project.
I will use the same technique for other building elements.
Any help really appreciated!
Thanks,
Shaun
Edited by LittleYellowSpider - July 7, 2024 15:04:01
- juejuezi
- Member
- 34 posts
- Joined: July 2022
- Offline
I'm sorry I didn't understand your meaning, but I guess you need this
I don't understand why the house needs to move every prim
You can use Peak SOP and VEX
```vex
int it = detail(1,'iteration',0);
int seed = 5;
f@dist = fit01(rand(it + seed),-1,1);
```
```
detail(0,'dist',0)
```
I don't understand why the house needs to move every prim
You can use Peak SOP and VEX
```vex
int it = detail(1,'iteration',0);
int seed = 5;
f@dist = fit01(rand(it + seed),-1,1);
```
```
detail(0,'dist',0)
```
Edited by juejuezi - July 7, 2024 15:11:41
- LittleYellowSpider
- Member
- 16 posts
- Joined: Feb. 2019
- Offline
Thanks juejuezi.
I might not have explained it very well. I basically want to the select each end of the cylinder and then move those faces randomly along their normals both positively and negatively to effectively lengthen or shorten the cylinder keeping it in place. This is to provide some variation that would have been found in the real buildings.
This might help. I think you have given me a steer in the right direction that I can work on, which is very much appreciated.
Kind regards,
Shaun
I might not have explained it very well. I basically want to the select each end of the cylinder and then move those faces randomly along their normals both positively and negatively to effectively lengthen or shorten the cylinder keeping it in place. This is to provide some variation that would have been found in the real buildings.
This might help. I think you have given me a steer in the right direction that I can work on, which is very much appreciated.
Kind regards,
Shaun
- juejuezi
- Member
- 34 posts
- Joined: July 2022
- Offline
- Mike_A
- Member
- 271 posts
- Joined: Aug. 2018
- Offline
-
- Quick Links