Jump to content

Hi, new here - had a VEX question about DOPs and SOPs

Recommended Posts

Hey all,

I'm super new to Houdini with a background in game development.  I was going through tutorials on pluralsight and I'm loving it so far.

So I've been expanding on the content and diving into Vex, and I hit a snag trying to run a Solver that changes generated point colours, because I wanted read from and modify persistent data on a separate point outside of the solver network.

I simply created details on the point in an Attribute Wrangle in dataHolders and thought it would be easy to read and write to them from an attribute wrangler infectedPoints in the solver.  



The problem is the vex script in the attribute wrangler can't actually read the details ie: 

int pointsVaccinatedSoFar = detail("../../../dataHolders/dataHolderPoint","pointsVaccinated",0);
int maxPointsToBeVaxxed = detail("../../../dataHolders/dataHolderPoint","maxPointsToBeInitiallyVaccinated",0);
printf("points Vaxxed so far: %g\n",pointsVaccinatedSoFar);
printf("points Vaxxed so far: %g\n",maxPointsToBeVaxxed);

The font node pulls the details properly and prints them.  But the printf always yields 0 when maxPointsToBeVaxxed should be 10.

I'm guessing I'm breaking some kind of data context/scope protocol in Vex buuut I don't know enough about Houdini yet to really understand what's going on if that's the case.

Or I guess I'm not using detail() properly, or both ;)


Any help would be appreciated!  I'm using Houdini Indie so if you guys can read it I can upload the .hiplc file.



Share this post

Link to post
Share on other sites
5 hours ago, Jesper Rahlff said:

if you can share a hipfile it would be a little easier to troubleshoot.


Hi, sorry I've moved well beyond this setup while I was trying to figure it out.

I think using [addpoint->attribute wrangle] to setup variables in a kind of container is working, I was able to read these across the network with no issue.

The trouble begins when I want to alter those variables, there doesn't actually seem to be a way to write attributes on points belonging to a separate object from an attribute wrangle using vex.

The information I'm looking for is how does one capture attribute data and store it somewhere in the network?

So for example, if I wanted to randomly shift colours on an object's points, then capture those colour at frames 10, 25 and 35, then transfer the color/Cd attribute values to a container object at the obj/ level, and then apply them back somewhere else (wherever) like some shaders later on, what's the high level setup/thinking to make this happen?


Sorry again if this is confusing, being new to houdini I don't always know how to word problems and solutions properly!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now