Archived post by Lorne

friends can I get a sanity check on ocean toolkit workflow? I’m doing a guided ocean tank style thing here, simming a chunk of ocean around a ship, meshing and extending the geo to render with the ocean spectrum…I’ve written out my spectrum.bgeo file along with my spectrum_mask.$F4.bgeo files and yet I still get double displacement happening in the simmed region

I may actually see where I’m going wrong here, one sec

ok yay

in case anyone is up against this I’ll add some search tags here: ocean spectrum toolkit displacement mask double guided tank simulation sim
the tools will initialize your ocean spectrum setup looking like this and asks you to write out the single frame master .bgeo file that contains the spectrum data, you DONT want this one if you’re simming a chunk inside the spectrum
what you need to do is resave the spectrum again from the nodes that get created to import and mesh the simmed ocean slice…I had stupidly assumed this spectrum was no different, but it is

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20221606/12/22/unknown.png

Archived post by SniperJake945

@Casey throw this in a prim wrangle (this code snippet group edges based on the interior angle of the two adjacent prims):
“`c vector edge(int h){ return vector(point(0, “P”, hedge_dstpoint(0, h))) – vector(point(0, “P”, hedge_srcpoint(0, h))); }
int h = primhedge(0, @primnum); int test = h; do{ if(hedge_equivcount(0, h) > 1){ vector e = edge(h) * (hedge_primary(0,h) ? 1 : -1); int prim1 = hedge_prim(0, h); int prim2 = hedge_prim(0, hedge_nextequiv(0, h)); vector n1 = prim(0, “N”, prim1); vector n2 = prim(0, “N”, prim2); matrix3 m = dihedral(e, set(0,0, 1)); //rotate e to be face up n1 *= m; n2 *= m; n1.z *= 0; //ensure our normal is 2d now, and normalize, probably overkill but whatever n2.z *= 0; n1 = normalize(n1); n2 = normalize(n2); float ang = atan2(n2.y*n1.x – n2.x*n1.y, n2.x*n1.x + n2.y*n1.y); //angle between vectors in 2d ang += M_PI; //interior angle, from 0-2PI if(ang <= radians(ch("interior_angle_maximum"))){ //our test is in degrees, typically we want to find interior angles lower than 100 degrees? setedgegroup(0, "peaks", hedge_srcpoint(0, h), hedge_dstpoint(0, h), 1); } } h = hedge_next(0, h); }while(h != test); ``` and then click the add parms button thing on the wrangle, for the geo you sent, it seems like an angle threshold of 100 degrees seems to work 🙂

oh and you need to add prim normals with a normal sop

Archived post by heimlich

there’s a story to it…

a while back, I asked how to do a saw function.. and this dude called @mestela blurted out “oh.. there’s a saw function in pyro.h” and i just thought.. wtf… first.. whats pyro.h, second, how the fuck would you even know about it….. so.. then I investigated a bit, and turns out, there’s a shitload, of that functionality in these includes… so in odtools, i added a section in the snippet manager, that lists and lets you search for all these functions… like this….

there’s a LOT of functionality, that, i dont know that is searchable in any other form… and in a way, thats a real shame. cause how would you know these functions exist

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20221005/14/22/unknown.png

Archived post by profbetis

made a neat lil vex thing. Takes a sloppy hand-placed input curve and straightens it up for you on major axes. Doesn’t support diagonal lines yet. Has one control for maintaining segment length (as opposed to picking the closest spot to the original vertex position). Runs as a prim wrangle.
“`c int points[] = primpoints(0, @primnum); vector prev_pos = point(0, “P”, points[0]); foreach( int idx; int pt; points[1:] ){ vector this_pos = point(0, “P”, pt); vector dir = normalize(this_pos – prev_pos); float dist = distance(this_pos, prev_pos); // Determine dominant direction axis vector new_dir; vector abs_dir = abs(dir); if( abs_dir.x > abs_dir.y ){ if( abs_dir.x > abs_dir.z ) new_dir = sign(dir.x)*{1,0,0}; else new_dir = sign(dir.z)*{0,0,1}; } else { if( abs_dir.y > abs_dir.z ) new_dir = sign(dir.y)*{0,1,0}; else new_dir = sign(dir.z)*{0,0,1}; } int maintain_length = chi(“maintain_length”); vector new_pos = prev_pos + new_dir*dist; if( !maintain_length ) new_pos *= dot(dir, new_dir); setpointattrib(0, “P”, pt, new_pos); prev_pos = new_pos; }“`

finally got to use the dot product for something other than checking if two vectors point in the same direction! <:cross_gang:863101157307449365>

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20220205/11/22/unknown.png

Archived post by heimlich

one sec

getting the report

this is what i initially submitted:
i, I was trying to find some of the slowdowns that occur when Houdini stats on windows, and while looking at things with sysinternals “process monitor”.
Looking at events that happen it seems to add /scripts/sop or /scripts/vop and some labs viewerhandle/state, or install… which. of course does not exist. And it does this with 1000’s of files, the more you have, the more it happens. This take a considerable amount of time, and i am just wondering, if this is something that you assume to happen, or if there could potentially be an issue
And this is what i got from support.. This has was by design for flexibility but this has long come up as a sore point. You can try disabling this mechanism (at the risk of breaking packages that rely on this behaviour) by setting the undocumented `HOUDINI_EXPERIMENTAL_DISABLE_EVENTSCRIPT_PATHSEARCH` environment variable to `1` prior to starting Houdini.

I have a lot of packages running, and so far, i havent come across one thats “broken” due to this