hi, in vex inline node i want to set a point attribute to my value.
i use addattribute(“attribute name”, “point number”, “value”);
but in result, that is create a new attribute with same name and set my value to that.
where is my problem.
set attribute in VEX
14147 8 2- Mohsen_Tabasi
- Member
- 53 posts
- Joined: June 2009
- Offline
- Simon
- Member
- 2199 posts
- Joined: July 2005
- Online
- Mohsen_Tabasi
- Member
- 53 posts
- Joined: June 2009
- Offline
i know add attribute node, but i think in scripting method, result are better an efficient.
i new in houdini (switch from maya).
in maya i wrote my programs with python and mel, but in vex i found strange things that i don't understand and confuse me.
i think VEX functions give me a lot of good abilities to do anything in my mind.
But first, i must more familiar with VEX Language.
i new in houdini (switch from maya).
in maya i wrote my programs with python and mel, but in vex i found strange things that i don't understand and confuse me.
i think VEX functions give me a lot of good abilities to do anything in my mind.
But first, i must more familiar with VEX Language.
- Simon
- Member
- 2199 posts
- Joined: July 2005
- Online
I think you'll find the speed pretty much the same between inline and node.
In inline method you need to use $ in front of any variables that you pass in or out, maybe that's what you are missing. Might be easier to see what you are doing wrong if you can post a hip file.
In inline method you need to use $ in front of any variables that you pass in or out, maybe that's what you are missing. Might be easier to see what you are doing wrong if you can post a hip file.
The trick is finding just the right hammer for every screw
- Mohsen_Tabasi
- Member
- 53 posts
- Joined: June 2009
- Offline
- Simon
- Member
- 2199 posts
- Joined: July 2005
- Online
- Mohsen_Tabasi
- Member
- 53 posts
- Joined: June 2009
- Offline
so, i confused again, i think i don't understand ptnum correctly.
i upload a simple code. i want to loop between all neighbours of each point and print each neighbour id in console.
but Houdini for each neighbour, loop between all points and print neighbour (n) of each point.
i want this:
(for each point, loop between all neighbour step)
pt 0 neighbour 0 is x
pt 0 neighbour 1 is y
pt 0 neighbour 2 is z
pt 1 neighbour 0 is x2
pt 1 neighbour 1 is y2
pt 1 neighbour 2 is z2
.
.
.
.
but Houdini print this:
(for each neighbour step, loop between all object points)
pt 0 neighbour 0 is x
pt 1 neighbour 0 is x2
.
.
pt 0 neighbour 1 is y
pt 1 neighbour 1 is y2
.
.
.
pt 0 neighbour 2 is z
pt 1 neighbour 2 is z2
.
.
.
.
i upload a simple code. i want to loop between all neighbours of each point and print each neighbour id in console.
but Houdini for each neighbour, loop between all points and print neighbour (n) of each point.
i want this:
(for each point, loop between all neighbour step)
pt 0 neighbour 0 is x
pt 0 neighbour 1 is y
pt 0 neighbour 2 is z
pt 1 neighbour 0 is x2
pt 1 neighbour 1 is y2
pt 1 neighbour 2 is z2
.
.
.
.
but Houdini print this:
(for each neighbour step, loop between all object points)
pt 0 neighbour 0 is x
pt 1 neighbour 0 is x2
.
.
pt 0 neighbour 1 is y
pt 1 neighbour 1 is y2
.
.
.
pt 0 neighbour 2 is z
pt 1 neighbour 2 is z2
.
.
.
.
- tamte
- Member
- 8444 posts
- Joined: July 2007
- Online
i think it is because VEX has SIMD architecture which means that each instruction is done on all points
so if you print first neighbour, it will print it for all points and so on
i am curious why are you using inline VOP when it can be done all with VOP nodes?
or if it is only VEX exercise, why are you not writing it as pure VEX op?
so if you print first neighbour, it will print it for all points and so on
i am curious why are you using inline VOP when it can be done all with VOP nodes?
or if it is only VEX exercise, why are you not writing it as pure VEX op?
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- Mohsen_Tabasi
- Member
- 53 posts
- Joined: June 2009
- Offline
-
- Quick Links