simplest wrangle question

   3330   6   3
User Avatar
Member
237 posts
Joined: 6月 2006
Offline
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
User Avatar
Member
1803 posts
Joined: 5月 2006
Online
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
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
237 posts
Joined: 6月 2006
Offline
ok, here is the hip.
the @skinmo.x wont work in the attribute vop.
Btw thank you.

Attachments:
geoboil.hip (308.7 KB)

User Avatar
Member
300 posts
Joined: 3月 2011
Offline
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@myvectorC = set(@Frame,2,3) // ok

any reason not to always use this syntax? does it get set more often or something?
User Avatar
Member
1803 posts
Joined: 5月 2006
Online
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.
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
237 posts
Joined: 6月 2006
Offline
first its not very often set to a different value but in the case of….

second: using steadily constants is faster, yes. Didnt thought on that. Every beginning is hard….

Thank you to both
User Avatar
Member
1803 posts
Joined: 5月 2006
Online
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.

Attachments:
geoboil_127_bind_vop.hipnc (353.1 KB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
  • Quick Links