I'm having an issue with using my own vex #include functions in gas wrangles.
When I test the functions in a normal volume wrangle in sopland they work as expected but when using them in a gas wrangle in dops it's as if the functions aren't used or evaluated. If I use them in a sop solver inside dops they do work again. The functions take standard arguments such as v@P, @density or float/vector and don't refer to anything external to the dopnet. Does anybody have an idea what might be going on?
Gas wrangle and include functions
930 4 0- Soothsayer
- Member
- 858 posts
- Joined: Oct. 2008
- Offline
- Enivob
- Member
- 2536 posts
- Joined: June 2008
- Offline
It's hard to say without seeing the node setup or code. Did you connect the GasWrangle to any nodes? Have you altered the Input tab? Are you enforcing prototypes or using code that might be referencing fields that don't exist?
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
- Soothsayer
- Member
- 858 posts
- Joined: Oct. 2008
- Offline
I tried to simplify it. So consider the following function:
In a SOP wrangle, on a density field, the following code will work as expected:
But in a dop gasfield wrangle it won't.
I'm wondering if it has to do with solver-space. Maybe v@P won't work the same way? Or this new stencil field thing causes problems?
It might have to do with the Input Data settings but not completely sure yet.
Edit: nvm, it's the input settings. They have to be on DOP data and refer to themselves.
float test(vector pos){ return 2.0*volumesample(0,'density',pos); }
In a SOP wrangle, on a density field, the following code will work as expected:
#include <test.vfl> //@density *= 2.0; // this will work in a gasfieldwrangle and volume wrangle @density = test(v@P); // this won't work in a gasfieldrwangle but will work in a volume wrangle
But in a dop gasfield wrangle it won't.
I'm wondering if it has to do with solver-space. Maybe v@P won't work the same way? Or this new stencil field thing causes problems?
It might have to do with the Input Data settings but not completely sure yet.
Edit: nvm, it's the input settings. They have to be on DOP data and refer to themselves.
Edited by Soothsayer - Jan. 3, 2023 13:22:43
--
Jobless
Jobless
- Soothsayer
- Member
- 858 posts
- Joined: Oct. 2008
- Offline
Revisiting this question.
The problem persists if more than one field is being used/manipulated. It seems that the DOP Data parameter only allows one field at a time but if the function refers to say @temperature as well as @density it won't work. Using multiple inputs doesn't solve it either.
What's the trick here and why do I have to jump through so many hoops to access and modify fields in external VEX functions? I don't see the logic behind it especially since it does work in a SOP context.
The problem persists if more than one field is being used/manipulated. It seems that the DOP Data parameter only allows one field at a time but if the function refers to say @temperature as well as @density it won't work. Using multiple inputs doesn't solve it either.
What's the trick here and why do I have to jump through so many hoops to access and modify fields in external VEX functions? I don't see the logic behind it especially since it does work in a SOP context.
Edited by Soothsayer - Jan. 5, 2023 05:49:27
--
Jobless
Jobless
- Enivob
- Member
- 2536 posts
- Joined: June 2008
- Offline
-
- Quick Links