Archived post by mattiasmalmer

I have made a few more nodes for my SOP compositing dev playground. If you like to play around I attached a hip file with the current state of affairs.
Nodes so far: color image uvmap vectormap colorEX(colorcorrector) warp uvmap comp grade expand rasterizetoformat
You can do basic comps with it. but it is missing a lot.

you can do things like this.

Archived post by mattiasmalmer

I made a nice colorcorrector for nuke that I use a lot. Converted it to houdini today.

hue saturation and luminance for individual colors. all happens in oklab

the vex code. toss it into a volwrangle. (or a pointwrangle or whatever if you want) it wants color in @C so you might want to turn that to @Cd…

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20240804/14/24/image.png
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20240804/14/24/colorex.txt

Archived post by mattiasmalmer

For no real reason at all I have been spending waaaay too much time reverse engineering Nukes rotosplines so that I can copy them over to houdini. vex hell

Here is where Im at now with the nuke spline. Do not read my atrocious vex code or you might go blind.

still lots of edge cases and features to handle.

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20241403/24/24/houdini_0mgxB8svew.mp4
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20241403/24/24/nukesplajn.hipnc

Archived post by aswaab

Some code for the volume wrangle. Volume goes in input 1. Seed points in input 2. And then you need to construct the control interface.
`//controls int mirror = chi(“mirror”); int distanceMetric = chi(“distanceMetric”);
//init variables float currentdist = 1000000; //pick a super high starting value. In theory, it should be infinite… int closestpt = 0; //placeholder for seed point float dist = 0; //placeholder for distance to seed vector pos = v@P; //current voxel position
//mirror if(mirror == 1) pos.x = abs(pos.x); if(mirror == 2) pos.y = abs(pos.y); if(mirror == 3) pos.z = abs(pos.z);
//calculate distances int pts = npoints(1); for(int pt = 0; pt < pts; pt++){ vector ptpos = point(1, "P", pt); vector vdist = abs(pos - ptpos); //vector distances if(distanceMetric == 0) dist = length(vdist); //euclidian/voronoi distance if(distanceMetric == 1) dist = sum(vdist); //manhattan distance if(distanceMetric == 2) dist = max(vdist); //chebyshev distance if(dist <= currentdist){ closestpt = pt; currentdist = dist; } }`

Above code will give you a density field that stores the seed values. From there, you can parse it how you need.

(gemming my own code for posterity)

Archived post by mattiasmalmer

I just inject a little extra height on each frame where the sand is supposed to fall. A simple distance to point.
Then the erosion solver tries to erase and spread it around. So thats nice.
I use the heightfield to scatter one layer of just dumb particles to get the general terrain.
Next i made a simple solver that just generates a few thousand points per frame and sctters them using the difference between two frames of heightfield as a density map. This way i get particles where there is movement. I then perturb them per frame using the heightfield gradient. These points die off after a while so that they stay roughly constant as new ones are spawned.
It works surprisingly well for what I need it for.
The system updates at ”Interactive rates” 🙂

A nice bonus is that it is just a shell of points so rendering is not insane.

Archived post by mattiasmalmer

finally got around to dealing with a resampling issue that often gets in the way. those pesky corners being rounded. so i find them by angle. then remove duplicates and finally harden them.

good companion to the trace SOP

corner hardificator

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20242701/30/24/houdinifx_LpgbhlJjho.gif
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20242701/30/24/harden_corners.hiplc
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20242701/30/24/image.png