discovered a hilarious baking gotcha that should be documented for future searchers of discord – the bake texture ROP does border expansion or diffuse fill to cover the black gaps between UV islands, but it silently fails if you have a background image enabled on the camera node the ROP is set to. only took about 2 hours to figure out <:goose:418150131272122368>
Archived post by matte
Just a random thing if anyone finds it useful – here’s some vex to quantise a value to steps, with variable smoothness: “` float smoothstep(float n; float x) { if (n == 0) return x; return 1.0/(1.0+pow(1.0/x-1.0,n) ); }
vector smoothstep(float n; vector x) { if (n == 0) return x; vector un = {1,1,1}; return un/(un+pow(un/x-un,n) ); }
// step: levels of quantisation // val: value to quantise // rolloff: smoothness
val *= step; vector fraction = smoothstep(rolloff, frac(val)); val = floor(val) + fraction; val /= step; “`
default houdini smooth() doesn’t work symmetrically
Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20192210/08/19/smoothquant.png
Archived post by sonofkilldozer
the uv transfer file i have is a lifesaver
gimi a min to drag it up
not even close to the tutorial now…
Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20190710/05/19/UV_TransferSmaple.hiplc
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20190710/05/19/stickToAnimation_0001.jpg
Archived post by SniperJake945
I donno how many people here have every tried converting to and from barycentric coordinates, but assuming you can project your triangle so that all points lie on the x and y axis (this is easy peasy with dihedral), this is my favorite method of finding where a point is within a triangle:
“`c //pts is the three points in your triangle matrix3 gen_bary_mat(vector pts[]){ matrix3 m = set( pts[0].x, pts[0].y, 1, pts[1].x, pts[1].y, 1, pts[2].x, pts[2].y, 1); return m; } vector tri_pts[] = array({10, 4, 1}, {3,2,1}, {0, 10, 1}); vector test_pt = {6, 5, 1}; matrix3 bary_matrix = gen_bary_mat(tri_pts); vector bary_pt = test_pt * invert(bary_matrix); //solution by inversion, this is big brain printf(“bary coords: %g \n”, bary_pt); “`
this means u can pre-compute the transformation needed to project a point into bary coords
which is realllllllllllllllllllllllllllllllllllly fuckin nice if u need to do that a bunch
this also extends to tets as well, but it’d be a 4×4 matrix instead of a 3×3
it helps if everything is actually aligned to the z-1 axis, so if z is set to 1, then you can invert the solution as well to convert back to cartesian coordinates
i like to do my triangle projection with dihedral so u don’t have to worry about any kind of scaling being applied to the triangle, like so:
“`c //this would gooooooooooooo in a prim wrangle, and then ud call the resulting trs matrix in a point wrangle to apply the positional changes //big brain matrix3 m = dihedral(v@N, set(0,0,1)); matrix trs = m; matrix mov_to_orig = ident(); matrix mov_z = ident();
translate(mov_to_orig, v@P); translate(mov_z, set(0,0,1));
trs = invert(mov_to_orig) * m * mov_z; “`
iono how useful this is, but ive had to do this kind of stuff a lot on one of the projects im working on
so i thought id share it
en.wikipedia.org/wiki/Barycentric_coordinate_system#Conversion_between_barycentric_and_Cartesian_coordinates the matrix form comes from the bottom of this section. solution by inversion is just the easiest way of solving that system in houdini currently. especially since it’s a 3×3
Archived post by Lorne
this is kind of a cool little thing, was working on some sims last night with very visible source volumes that I wasn’t happy with the look of, but also wasn’t happy with how little density was coming into my sim from them either…usually I’d probably try to rework the shapes and crank the density a bunch on the source, but ended up trying something that worked way better:
– go way lower with your source density than you’d normally think to, like 0.05 kind thing – gas wrangle — @density += @temperature * clamp(@density, 0, 1) * chf(“mult”);
now you’ve got a smoke density that’ll grow a bit more after it’s sourced, but in a really natural looking way that doesn’t show your source so badly and will be swirling and advecting while it continues to pump density
Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20193710/02/19/density_growth_v001.mp4
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20193710/02/19/broom_puff_fx_main_v008_720p.mp4
Archived post by matte
@nicholas ralabate afaik it doesn’t make a RAT, so blurring/filtering can be slow
imo image texture access in vex is just slow in general
On a recent project which involved lots of SOPs/VEX texture access I accellerated it substantially by first pre-loading the texture into a 2D volume, then sampling the volume rather than the texture
Archived post by TOADSTORM
it’s hard to find a single sheet that covers every area of math
i found this one that has most of what i’ve seen on whitepapers
there’s also this one for set theory
Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20193609/27/19/04bb3acb0e7fa71fb47b168431c97b02.jpg
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20193609/27/19/113d4693d4edf453430927b4558f6640.jpg
Archived post by rich lord
If you are all going to have a crack at some procedural walking/dragging things, I just dumped all the files for my last movie on my website. Its a total mess, but might be of use to someone. I was planning a proper tut soon, but haven’t got round to it yet. Heres the files – www.richlord.com/tools/hesperius-draco
Archived post by Lorne
I can’t believe that all my years in Houdini I havent thought to just make a little pop solver to create decent drone camera moves
get a curve force in there, some wind, blend between a few lookat targets that have some drift on them as well
it’s pretty cinematic
disclaimer: this was like a 15min thing and I’m sure this is a mess
you could also set up an @v on the main follow curve and pipe that into the popcurveforce if you wanted regions where the camera speeds up/slows down
Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20191809/20/19/drone_cam_sim_v001.mp4
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20191809/20/19/drone_cam_sim_v001.hip
Archived post by chris_gardner
“`import tempfile import glob import os.path tempDir = tempfile.gettempdir()
files = filter(os.path.isfile, glob.glob(tempDir + “/crash.*.hip”)) if files: files.sort(key=lambda x: os.path.getmtime(x)) lastFile = os.path.join(tempDir, files[-1]).replace(‘\\’, ‘/’) hou.hipFile.load(file_name=str(lastFile), suppress_save_prompt=False)“`
load latest crash file