Nice @trzanko . WFC was somewhere on this discord awhile back, and I read this which vaugely explained it to me. Would also love to play with it in Houdini some. – robertheaton.com/2018/12/17/wavefunction-collapse-algorithm/
Author: admin
Archived post by trzanko
here’s a simple example of a 2d wfc running on points in houdini ( have yet to expand to 3d )
it pretty much comes down to: you can only be what your neighbors say you can be, and whoever has the least amount of options, randomly select from it’s choices based on probability and set yourself, then repeat
it doesn’t matter what the deformation is on the tiles
you could do it on any volume of points with clean connectivity
if you can do a neighbour lookup, it doesn’t matter what the tiles are, though it becomes a bit weirder because what you put in those tiles has to deform to that tile’s space
imo wfc is one of the best candidates for some super cool procedural stuff
would love to have a sec to explore this more or on a project, this sketch is from last year which is the last time we talked about it i think
maxim’s stuff is what inspired this sketch
oskar’s implementation is way way sexier because it’s dynamic and interactive
Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20194308/24/19/tr_wfc_v4.mp4
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20194308/24/19/tr_wfc_v4.hip
Archived post by nicholas ralabate
i like that fat cat
Archived post by Reinhold
looks like vtx0 is {0, 0, 0}, vtx1 is {1, 0, 0}, vtx2 is {0, 1, 0} and vtx3 is {0, 0, 1}. and any point in between is just a linear interpolation of these four values. shouldn’t take too long to get there now
got it working now. building a matrix from the tet vertex positions and running an inverse transform on the point position puts the sample point into the normalized barycentric space, i.e. the new point position is the barycentric coordinate
“` int prims[]; vector p = v@P; vector vtxp[];
prims = primfind(1, v@P, v@P);
foreach(int prim; prims) { for(int i=0; i<4; i++) { vtxp[i] = vector(point(1, "P", primpoint(1, prim, i))); } matrix3 mat = set(vtxp[1] - vtxp[0], vtxp[2] - vtxp[0], vtxp[3] - vtxp[0]);
p -= vtxp[0]; p *= invert(mat); }
v@uv = p;“`
Archived post by aswaab
@flight404
here’s a chops way of doing it. I have something in there that will remove any scaling from the world cam/nulls, etc.
Knowing the CHOPS way is cool because you can do things like time-shift, retime, filter, sample, etc. Good to know even if not for your specific case tonight.
Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20194208/22/19/get_world_cam.hiplc
Archived post by jake rice
sergeneren.com/2019/08/21/creating-low-altitude-clouds/ fun tutorial someone shared at work about modeling clouds using pyrooooooooooooooo
Archived post by aswaab
They are stored in a python file that is loaded when Houdini launches… one sec, I’ll find the support page
www.sidefx.com/docs/houdini/hom/locations.html (In the startup scripts section)
I have a module called fcurves, and in there is a function called overshoot(), which can take some parameters or operate using default values if no parameters are entered.
Archived post by TOADSTORM
here’s what i was thinking. this would work better using point attributes as the bias instead of just a global bias. this will blend the position and orientation of packed rigid bodies back to their original positions/orientations, during the simulation so collisions are preserved.
Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20191308/15/19/blend_rbd_toadstorm.hiplc
Archived post by jake rice
yeah that’s the grid resolution stuff
it’s definitely going to be dependant on the grid res at the end of the day. but that’s the tradeoff
Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20193808/12/19/grid_to_levelset_curves_v02.hip
Archived post by flight404
looking at the random paper or two: www.researchgate.net/publication/220068154_Rendering_Traditional_Mosaics
but the bit i need to solve manually to really get more control is to roll my own offset curves and honestly, i just aint in the mood at the moment.
I remember making a pass that worked okay, but when it comes time to fix overlaps, i lose interest.