Detail Wrangle node Limits?

   3239   8   0
User Avatar
Member
13 posts
Joined: Feb. 2006
Offline
When I set group in Detail Wrangle, this group is not available instantly and visible for next use only on next node. So to continue writing code I need to create new Detail Wrangle next to first one. This is due instructions evaluation for this specific context or a bug or me? I would like to set group and continue working in single Wrangle node
By ‘not available’ I mean that none of the vex functions see data for it.
User Avatar
Member
648 posts
Joined: July 2005
Offline
Could be wrong, but I believe everything is buffered and applied in one hit at the end of the loop of entities (ponts, prims or verts)… have recently been running into the same issue while setting vertex UVs via diffusion.

A workaround is to store data in an array with one entry per entity then check them later, instead of checking group membership.
User Avatar
Member
13 posts
Joined: Feb. 2006
Offline
Thank you for reply
I see.
In some cases we can find workaround but in some not. Especially with groups. As example many default functions supports additional property for group but regarding to documentation not them all supports to be used as in SOP group style.
Function i tried to make using ‘xyzdist’ function (https://www.sidefx.com/docs/houdini/vex/functions/xyzdist.html) so I was able to make one Detail Wrangle because it have primgroup that supports SOP group semantics. But instead of few lines of code i did a mess(which is bad) and research(which is good).

At least expand\prim\pointgroup should work in Detail Wrangle.. sadly it doesn't
Edited by roxo - Sept. 21, 2019 09:23:28
User Avatar
Member
2036 posts
Joined: Sept. 2015
Offline
Maybe you could provide a hip.

Unless I am missing what your saying, using ‘groups’ in detail mode is meaningless.

Your not passing over points, primitives or vertices in detail mode, so setting the wrangle to group ‘doesn’t' apply.( Maybe I need to be shown a case where this is not so ).

You can specify to only work on certain groups in detail mode, you just need to set up your code accordingly.


As example:

int [] expandpointgroup(<geometry>geometry, string groupname)

Takes where the geometry is coming from and name of group. Since your in Detail mode and not running over points - you can't use it, because the function doesn't know what to look at (points, prims or vertices). The function was not meant to be used in detail.

Vex functions can be context specific.

However, with some supporting code you could make use of inpointgroup, inprimgroup or invertexgroup functions.

As for the prim function or point function. I use them all the time in detail mode.

The setpointgroup can also be used in detail mode. But while in the same node, you cannot do any subsequent operations on those points that have been set base on the values set by this function or any other function that sets/changes geometry. Like you say, you have to do it in the next node.

Unless of course, you code it in a way with your own local variables that can be accessed repeatedly before the final settings of values to the outputting geometry.

Would be good to send in an RFE for a different wrangle context. Like say something called “Logic” mode. Where the code is executed as expected in logical order, allowing the wrangle to have priority over the scene and make changes to geometry/attributes in a single wrangle.

It's possible, since like as you mention, you add another wrangle to finish what you wanted.

I'm working on something right now, where I need to use loop sops with a detail wrangle for the same related issue your having.

So, if Houdini let's us do stuff with more nodes, why not in the same wrangle where we could create more sophisticated functions stored in ‘include’ files.

I'm guessing SideFX considers something like a that low priority when we could simply just create assets(extra nodes), to take care of our goals.

I just find it easier and quicker to tweek code for different purposes than manage a network of nodes and settings.
User Avatar
Member
13 posts
Joined: Feb. 2006
Offline
At the beginning of reading your reply BabaJ, I was disappointed that you didn't get what meant but later on… you described so well everything that i can mark this as brilliant answer

The question is how did you personally know about “…you cannot do any subsequent operations on those points that have been set base on the values set by this function or any other function that sets/changes geometry”? Would be nice to point to documentation if that knowledge is not from practice.
I decided to iterate my own and had a wish to have one Detail Wrangle that do one single task… can be split into multiple but that was just a wish. I was surprised that we can create groups and geometry or work with existing geoups made before,but we can't access to newly made groups and attributes directly after we made them there inside…it looks like Houdini listening to me, write to memory but applying to real geometry only after last line of code.

If Multidimensional Array will be suppprted and option to have global shared variables many new doors can be unlocked

As for this wrangle limits…people by years live with that so and I can
User Avatar
Member
13 posts
Joined: Feb. 2006
Offline
P.S. In my logic when H runs my code and there i say:

>set point group named A;

on next line i should be able to see and be able to use it, but no:

> expandpointgroup A;

and any other will not see my A group here…only on any next operator but not self. Which is absolutely weird.
Maybe this limitation is to protect something from crashing and mistakes… don't know but very disappointed.
Please unlock this option
Edited by roxo - Sept. 21, 2019 16:47:20
User Avatar
Member
7733 posts
Joined: Sept. 2011
Online
roxo
P.S. In my logic when H runs my code and there i say:

>set point group named A;

on next line i should be able to see and be able to use it, but no:

> expandpointgroup A;

and any other will not see my A group here…only on any next operator but not self. Which is absolutely weird.
Maybe this limitation is to protect something from crashing and mistakes… don't know but very disappointed.
Please unlock this option

This is expected, as the sync/write/create operations are not performed until after all the code has run. To access the geometry result, you'll need to start a new vex operation (new wrangle node).
User Avatar
Member
13 posts
Joined: Feb. 2006
Offline
Thank you all for explanation.
User Avatar
Member
337 posts
Joined: June 2013
Online
I miss ICE because of stuff like this. What you set in an execute port is available in the next execution stream.
More over you're not context locked to just points or prims, you can set stuff on other objects including parameters and rigging which has to be done through CHOPs in H.

If you want to keep track of some stuff in Detail, you can maybe uses arrays… But for performance sake you might just have to cope with the workflow of fragmenting the execution of your idea. I understand why this in not desirable from a creative standpoint.

Edited by probiner - Sept. 21, 2019 21:29:05
  • Quick Links