storing @P to @mypos doesn't work

   2131   5   1
User Avatar
Member
1004 posts
Joined: April 2017
Offline
Hi!

I'm placing the position values in @mypos. In the same wrangle, when I check with colors to visualize it (@Cd = @mypos it works.

When I go in a wrangle (right after the first one) and try the same color check, the result is not the same. It's like it only uses the X value.

-Olivier

Attachments:
P_to_mypos_problem.jpg (153.7 KB)
P_to_mypos_problem.hip (68.9 KB)

User Avatar
Member
1004 posts
Joined: April 2017
Offline
I fixed it but I don't understand why it was not working before.

At the second wrangle, I re-specified that mypos was a vector (@Cd = v@mypos).

@mypos was already a vector in the previous wrangle, why would I need to remind houdini about it?

-Olivier
User Avatar
Member
402 posts
Joined: June 2014
Offline
Hi Olivier,

apart from a small list of reserved attribute names (like @P and @N) you need to tell houdini what type the attribute is. Replacing @mypos with v@mypos should fix things
Henry Dean
User Avatar
Member
1004 posts
Joined: April 2017
Offline
That's where I'm confused. In the first wrangle, I use v@mypos. From that point on, everytime I use @mypos, houdini should already know it's a vector, right?

-Olivier
User Avatar
Member
1736 posts
Joined: May 2006
Offline
No, Houdini doesn't do type introspection in wrangles (or in most places that touch geometry attributes for that matter), so for each fresh wrangle you need to define the types again.
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
1004 posts
Joined: April 2017
Offline
Thanks.

Somehow, I never had that problem before.

-Olivier
  • Quick Links