Hi everybody,
It's now time for my daily newbie question
How would you create a condition like this ?
“IF Sphere A and Sphere B are aligned on X axis THEN create Box between them”
Should I use Vex Builder ?
Thanks in advance,
Julien
Conditions
8151 12 0- Undertaker
- Member
- 113 posts
- Joined: July 2005
- Offline
- Xiangbiao
- Member
- 27 posts
- Joined: July 2005
- Offline
- Undertaker
- Member
- 113 posts
- Joined: July 2005
- Offline
- David Gary
- Member
- 74 posts
- Joined: July 2005
- Offline
- Undertaker
- Member
- 113 posts
- Joined: July 2005
- Offline
- Xiangbiao
- Member
- 27 posts
- Joined: July 2005
- Offline
- Undertaker
- Member
- 113 posts
- Joined: July 2005
- Offline
Xiangbiao, you can find the null SOP in the “generators” section of the Tab menu .
Concerning the expression I'm trying to find an expression or a way to evaluate the difference of the centroids of the 2 objects and then use a switch, but it's not very clear to me yet, I'm wondering if I can do that kind of things with the Vex Builder …
Concerning the expression I'm trying to find an expression or a way to evaluate the difference of the centroids of the 2 objects and then use a switch, but it's not very clear to me yet, I'm wondering if I can do that kind of things with the Vex Builder …
- David Gary
- Member
- 74 posts
- Joined: July 2005
- Offline
Hi again!
Try the following
Create two spheres: sphereA and sphereB.
Do the switchOP thing.
try this expression:
((centroid(“/obj/model/sphereB”,D_Z)-centroid(“/obj/model/sphereA”,D_Z))==0)&&((centroid(“/obj/model/sphereB”,D_Y)-centroid(“/obj/model/sphereA”,D_Y))==0)
warning: in this case, the null must be the first input and the box the second input.
Then change the spheres center to check the result .
Hope that helps.
Expressions get and set informations.
VEX only modify information :idea:
Try the following
Create two spheres: sphereA and sphereB.
Do the switchOP thing.
try this expression:
((centroid(“/obj/model/sphereB”,D_Z)-centroid(“/obj/model/sphereA”,D_Z))==0)&&((centroid(“/obj/model/sphereB”,D_Y)-centroid(“/obj/model/sphereA”,D_Y))==0)
warning: in this case, the null must be the first input and the box the second input.
Then change the spheres center to check the result .
Hope that helps.
Expressions get and set informations.
VEX only modify information :idea:
- jason_iversen
- Member
- 12397 posts
- Joined: July 2005
- Offline
The VEX Builder will only be able to process the points on geometry. Its not the right tool for the job, I'm afraid. The Null/Add SOP and Box SOP going into a Switch SOP is definitely your best interest.
type: exhelp centroid in a houdini text port for help.
type: exhelp centroid in a houdini text port for help.
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
also, http://www.odforce.net [www.odforce.net]
- Undertaker
- Member
- 113 posts
- Joined: July 2005
- Offline
- Undertaker
- Member
- 113 posts
- Joined: July 2005
- Offline
- Xiangbiao
- Member
- 27 posts
- Joined: July 2005
- Offline
- David Gary
- Member
- 74 posts
- Joined: July 2005
- Offline
-
- Quick Links