Category: wip
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
Ok i stripped the scene down to the main solvers. have fun.
Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20244502/14/24/sandsolver_stripped.hiplc
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20244502/14/24/tst.jpg
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
Archived post by tokyomegaplex
Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20241501/06/24/2024-01-06_12-57-02.mp4
Archived post by paqwak
Rediscover the whell I guess, fun exercise tho !
Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20234212/25/23/TraceC3D.gif
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20234212/25/23/sop_TraceContour3D.1.0.hdalc
Archived post by flight404
Queue Jake saying 😮 UHH GUYZ I GAVE YOU SOMETHING SIMILIAR LIKE 5 YEARS AGO
I look forward to hearing all the ways in which it breaks on your weird meshes
please share any optimization tips or bug fixes please and thank you
Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20235312/18/23/rh_subdivider.v01.hiplc