Hi guys,
I'm learning Solaris and USD at the moment. Let's say I have a sphere and a box at origin. And I'd like to procedurally align the box next to the sphere.
In Sop, I can use transform with bbox expression. So what's the approach in Lop? bbox expression in transform seems no longer working. Thanks!
Procedurally move / align objects in Lop
1372 2 1- NMVHS
- Member
- 21 posts
- Joined: May 2015
- Offline
- mestela
- Member
- 1716 posts
- Joined: May 2006
- Offline
AFAIK there's no quick native lops equivalent.
That said here's two alternatives. One is to use a sopmodify, use whatever sops tricks you want, those changes will be propegated back to lops. Here I've used the labs align and distribute to put many boxes and spheres in a row, but you can play with the options to put them in a grid if you want.
The other options is to directly modify the transforms with vex. I've done a very brute force hack in this example, just setting the x position to the prims element number, but it works.
Both methods have pros and cons. Sops is good because you can use all your sops knowledge, but can get slow if need to process lots of things. Lops wrangles use a same-but-different syntax to sops vex, takes some getting used to, but performance scales better.
That said here's two alternatives. One is to use a sopmodify, use whatever sops tricks you want, those changes will be propegated back to lops. Here I've used the labs align and distribute to put many boxes and spheres in a row, but you can play with the options to put them in a grid if you want.
The other options is to directly modify the transforms with vex. I've done a very brute force hack in this example, just setting the x position to the prims element number, but it works.
Both methods have pros and cons. Sops is good because you can use all your sops knowledge, but can get slow if need to process lots of things. Lops wrangles use a same-but-different syntax to sops vex, takes some getting used to, but performance scales better.
- NMVHS
- Member
- 21 posts
- Joined: May 2015
- Offline
mestela
AFAIK there's no quick native lops equivalent.
That said here's two alternatives. One is to use a sopmodify, use whatever sops tricks you want, those changes will be propegated back to lops. Here I've used the labs align and distribute to put many boxes and spheres in a row, but you can play with the options to put them in a grid if you want.
The other options is to directly modify the transforms with vex. I've done a very brute force hack in this example, just setting the x position to the prims element number, but it works.
Both methods have pros and cons. Sops is good because you can use all your sops knowledge, but can get slow if need to process lots of things. Lops wrangles use a same-but-different syntax to sops vex, takes some getting used to, but performance scales better.
Hi Matt, thanks for your reply. This is very helpful as I'm reading cgwiki to learn USD and lop.
Much appreciated!
-
- Quick Links