Modification on opinput other than geoself()

   5402   15   0
User Avatar
Member
5 posts
Joined: Sept. 2014
Offline
Hi,

I was wondering about the fact that each VEX function has a geohandle like this:
int addattrib(int geohandle, string attribtype, string name, int defvalue)

Does it mean that I can also modify incoming geometry other than the 0 / geoself()?
If yes, is there a way to address the modified content somehow?

More practically something like:
Is there a way to create a secondary output for a wrangle / attrib VOP?

I hope it made some sense.

Attachments:
addpoint.png (63.2 KB)

User Avatar
Staff
6176 posts
Joined: July 2005
Online
That parameter is there for future compatibility. If we didn't have it, we'd have painted ourself in a corner in the glorious future when you'll be able to edit other geomety's than your own.

Unfortunately, we do not yet live in that glorious future.

(My dream is to allow the Attrib VOP to have multiple outputs which you target with 0/1/2/3/4… But it is but a dream…)
User Avatar
Member
5 posts
Joined: Sept. 2014
Offline
Many thanks clearing this up!
User Avatar
Member
4495 posts
Joined: Feb. 2012
Offline
jlait
That parameter is there for future compatibility. If we didn't have it, we'd have painted ourself in a corner in the glorious future when you'll be able to edit other geomety's than your own.

Unfortunately, we do not yet live in that glorious future.

(My dream is to allow the Attrib VOP to have multiple outputs which you target with 0/1/2/3/4… But it is but a dream…)

Will this feature be used a lot? I can't think of many scenarios where you need to modify multiple inputs at once. I am probably not seeing the big picture but can you please give some practical examples?
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
471 posts
Joined: Nov. 2013
Offline
jlait
That parameter is there for future compatibility. If we didn't have it, we'd have painted ourself in a corner in the glorious future when you'll be able to edit other geomety's than your own.

Unfortunately, we do not yet live in that glorious future.

(My dream is to allow the Attrib VOP to have multiple outputs which you target with 0/1/2/3/4… But it is but a dream…)

i have this question too thanks.

but i have another questions:
1_how VEX code running in houdini?
simultaneously on all elements such as voxels or points for example?
or code just running one by one on elements and when compile would be done houdini show final result?
2_can we use detail attribute wrangle to manipulate density of specific Voxel instead of using volume wrangle? if we can how?
thanks.
User Avatar
Member
5 posts
Joined: Sept. 2014
Offline
pusat
jlait
That parameter is there for future compatibility. If we didn't have it, we'd have painted ourself in a corner in the glorious future when you'll be able to edit other geomety's than your own.

Unfortunately, we do not yet live in that glorious future.

(My dream is to allow the Attrib VOP to have multiple outputs which you target with 0/1/2/3/4… But it is but a dream…)

Will this feature be used a lot? I can't think of many scenarios where you need to modify multiple inputs at once. I am probably not seeing the big picture but can you please give some practical examples?

From my part it was more of a conceptual / degree of freedom type of question. And also didn't want to miss an interesting feature or assume something irrational.

Example:
Imagine a buffer geometry where you can write / store diagnostics or other common data from different networks. In this case it would act like common storage / memory for all participating networks.
Sure, this can be solved in many other different ways, but that particular geohandle parameter was standing out unexplained.
User Avatar
Staff
6176 posts
Joined: July 2005
Online
pusat
Will this feature be used a lot? I can't think of many scenarios where you need to modify multiple inputs at once. I am probably not seeing the big picture but can you please give some practical examples?

Since we've not implemented it, we obviously aren't thinking it is a top priority :>

I always imagine it creating/manipulating some sidecar geometry. Like maybe a connectivity network while it erodes the actual geometry…

It would also be useful for things like volumes, where your primary output may not be something you are directly interested in….
User Avatar
Staff
6176 posts
Joined: July 2005
Online
NimaNolan
i have this question too thanks.

but i have another questions:
1_how VEX code running in houdini?
simultaneously on all elements such as voxels or points for example?
or code just running one by one on elements and when compile would be done houdini show final result?

Neither. How VEX actually runs is complicated. One of the goals is to keep this hidden from the user, so we can change how it runs to be whatever is most efficient.

2_can we use detail attribute wrangle to manipulate density of specific Voxel instead of using volume wrangle? if we can how?
thanks.

No. There is no setvolumevoxel() function. One problem is that because all the writes would be queued, and volumes tend to be huge, this likely won't have the efficiency one would hope. But it is an existing RFE.
User Avatar
Member
471 posts
Joined: Nov. 2013
Offline
jlait
Neither. How VEX actually runs is complicated. One of the goals is to keep this hidden from the user, so we can change how it runs to be whatever is most efficient.

thanks for your answer.
can we also create a array of imported point attributes so that VEX don't calculate array every time as code is running?
my idea is when we are running vex code on voxels mainly we need points to tell houdini what it does with voxels specially, we have more freedom and various function for using points instead of voxels.
in this case we need array of imported point that is calculated just one time at all when VEX is running and for next implementations just delete used point attributes from array so it's will be come faster.
thank you for your responsibility.
User Avatar
Staff
6176 posts
Joined: July 2005
Online
I'm afraid I do not understand what you are asking.

If you need to cache intermediate results, use multiple nodes. You could store arrays on those nodes to reference later and they won't be recomputed.
User Avatar
Member
4495 posts
Joined: Feb. 2012
Offline
jlait
pusat
Will this feature be used a lot? I can't think of many scenarios where you need to modify multiple inputs at once. I am probably not seeing the big picture but can you please give some practical examples?

Since we've not implemented it, we obviously aren't thinking it is a top priority :>

I always imagine it creating/manipulating some sidecar geometry. Like maybe a connectivity network while it erodes the actual geometry…

It would also be useful for things like volumes, where your primary output may not be something you are directly interested in….

Before this glorious future, it would also be cool to have functions like pointsmany, primsmany, that returns an array of attributes.

The better VEX gets, the easier and faster becomes working with Houdini and creating new ops IMO.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
471 posts
Joined: Nov. 2013
Offline
jlait
I'm afraid I do not understand what you are asking.

If you need to cache intermediate results, use multiple nodes. You could store arrays on those nodes to reference later and they won't be recomputed.

sorry for my bad explanation.
as you said i use couple of wrangle nodes instead of one.
but how can i transfer array to next wrangle node? for transferring simple variable between upstream and downstream nodes i use attribute create but for a huge array i have no idea.
my goal is to use pcfind_radius VEX function.
thanks.
User Avatar
Staff
6176 posts
Joined: July 2005
Online
NimaNolan
sorry for my bad explanation.
as you said i use couple of wrangle nodes instead of one.
but how can i transfer array to next wrangle node? for transferring simple variable between upstream and downstream nodes i use attribute create but for a huge array i have no idea.
my goal is to use pcfind_radius VEX function.
thanks.

Create an array attribute. Say I want to make an array of all id's of points:

int @output_array;

for (int i = 0; i < @numpt; i++)
{
append(@output_array, point(0, ‘id’, i));
}
User Avatar
Member
471 posts
Joined: Nov. 2013
Offline
thanks again jeff.
but this code show me an error: ambiguous call to function append()
I don't understand why this happen, point function with id attribute should return an int number but why VEX tell us it's ambiguous ?
User Avatar
Staff
6176 posts
Joined: July 2005
Online
Vex has to compile the point function before it knows what geometry is attached. There is nothing stopping you from making a vector3 attribute called ‘id’. Force the type with an int() cast:


int @output_array;

for (int i = 0; i < @numpt; i++)
{
append(@output_array, int(point(0, ‘id’, i)));
}
User Avatar
Member
471 posts
Joined: Nov. 2013
Offline
thank you so much jeff.
i make a project that removes separated noisy field from cloud.
i used Point Cloud Find Radius VOP node for doing that.
with uniform sampling 50, VEX take 50 seconds to run on my PC.
houdini goes down if we use array attributes because number of points are too many.
have we another way to bring it faster?
i tried to create point group and connect it to second input but in this case we can't transform group in volume VOP.
also i tried to move volume based on P and center attributes but none of them don't work.
very thanks.

Attachments:
Cloud Noise Removal Make it Faster.hip (242.8 KB)

  • Quick Links