Hi,
ok, I have a pointwrangle and afterward an attribvop with an promoted offset vector.
Code in the pointwrangle is v@skn = .{2,0,0};
If I use it in the promoted offsetvector like @skn.x,0,@skn.z
nothing will happen. So whats wrong with it.
Ok and the second:
If I want to write the @skn wiht $F for x, how should be the syntax for it: @skn = {$F,0,0}?
(ok I know $F its wrong but whats it for vex? @F?)
Thanks in advance
simplest wrangle question
3265 6 3- Follyx
- Member
- 237 posts
- Joined: 6月 2006
- Offline
- mestela
- Member
- 1796 posts
- Joined: 5月 2006
- Offline
First problem should work, can you post a hip?
Second problem, use @Frame or @Time.
Note that {1,2,3} syntax only works for constants. If you want to use variables or functions to define a vector, you need to use set() :
v@myvectorA = {1,2,3}; // ok
v@myvectorB = {@Frame,2,3}; // will error
v@myvectorC = set(@Frame,2,3) // ok
Second problem, use @Frame or @Time.
Note that {1,2,3} syntax only works for constants. If you want to use variables or functions to define a vector, you need to use set() :
v@myvectorA = {1,2,3}; // ok
v@myvectorB = {@Frame,2,3}; // will error
v@myvectorC = set(@Frame,2,3) // ok
- Follyx
- Member
- 237 posts
- Joined: 6月 2006
- Offline
- freaq
- Member
- 300 posts
- Joined: 3月 2011
- Offline
- mestela
- Member
- 1796 posts
- Joined: 5月 2006
- Offline
Habit?
I haven't done any testing, but I'd assume setting a constant is faster than calling a function for every point on every frame. Probably wouldn't matter too much when your talking a few thousand points, but something to consider if you have tens of millions.
For me it's more a style thing, a visual reminder ‘this is being initialized as a constant vector’ vs ‘this is a calculated vector’.
Whatever works.
I haven't done any testing, but I'd assume setting a constant is faster than calling a function for every point on every frame. Probably wouldn't matter too much when your talking a few thousand points, but something to consider if you have tens of millions.
For me it's more a style thing, a visual reminder ‘this is being initialized as a constant vector’ vs ‘this is a calculated vector’.
Whatever works.
- Follyx
- Member
- 237 posts
- Joined: 6月 2006
- Offline
- mestela
- Member
- 1796 posts
- Joined: 5月 2006
- Offline
I had a look at your scene, I think I understand the first problem now, I've attached a fix.
When you're in a vop network, use a ‘bind’ vop to access other point attributes you've created. So inside the deform_object vopnet I created a bind vop, set the name to ‘skinmo’, type is vector, and connected it to the offset of your noise.
Promoting parameters of vopnets is more for when you want to control a vop parameter with a UI slider or number entry.
There's more to it, but probably best to tackle that later when you're comfortable with the basics.
When you're in a vop network, use a ‘bind’ vop to access other point attributes you've created. So inside the deform_object vopnet I created a bind vop, set the name to ‘skinmo’, type is vector, and connected it to the offset of your noise.
Promoting parameters of vopnets is more for when you want to control a vop parameter with a UI slider or number entry.
There's more to it, but probably best to tackle that later when you're comfortable with the basics.
-
- Quick Links