Archived post by jim.meston

SDF bevel stuff. Thought I would throw it on here. Maybe useful for someone.

Pretty predictable results, if you like beveling things like its 1996. …

copject merge ๐Ÿ™‚ Works performantly (not tested much inter-copnet but works, I made it specifically for making networks cleaner without spaghetti). Also the data type selector can be a bit wonky, so you have to be explicit.

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20251106/21/25/sdf_bevel_normal.zip
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20251106/21/25/509429497_10162611768322906_7633348321705504215_n.png
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20251106/21/25/image.png
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20251106/21/25/fetch.zip

Archived post by lukevanlukevan

okay, let me re do, maybe I can get famous!

Angled and regular tile sampling:

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20253206/11/25/angled.gif
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20253206/11/25/regular.gif
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20253206/11/25/LV.lv_angled_tile_sample.1.0.hdalc
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20253206/11/25/LV.lv_tile_sample.1.0.hdalc

Archived post by mattiasmalmer

cateye…

“`
#bind layer src? val=0 #bind layer !&dst
inline float2 fibonacci_spiral(int n ,int samples) { float phi = (1.0f + sqrt(5.0f)) / 2.0f; // Golden ratio float angle = 2.0f * M_PI * phi * n; float r = 1.0f * sqrt((float)n /samples); // Normalized radius float x = r * cos(angle); float y = r * sin(angle); return (float2)(x,y); }
inline float2 scale_along_vector(float2 pos, float2 dir, float scale) { // Normalize the direction float2 n = normalize(dir); // Project pos onto dir float proj_len = dot(pos, n); float2 proj = proj_len * n; // Compute the component orthogonal to dir float2 ortho = pos – proj; // Scale only the projection return proj * scale + ortho; }

@KERNEL { float2 pos=(float2)(@ix,@iy); float4 color=(float4)(0,0,0,0);
for (int i=0; i<@samples; i++) { float2 disc=fibonacci_spiral(i,@samples)*@radii; float2 dir=pos-(float2)(@xres,@yres)*.5f; float dist=length(dir)/length((float2)(@xres,@yres)*.5f); disc=scale_along_vector(disc , dir ,(1-pow(dist,1.0f)*@squash)); color+=@src.bufferSample(pos+disc); }
@dst.set(color/@samples); }
“`
just make radii, squash and (int)samples in the bindings

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20253105/22/25/image.png

Archived post by mattiasmalmer

the handles are very broken to use in hda:s i bind a point and in the view it says that it is on coordinate 1024,1024 but the bound parameter sets itself to 2048,2048… very odd.

for when tasteful subtleties are not on the menu.

With very little code change you could make it into a โ€godrayโ€ generator.

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20255905/21/25/houdini_2v0omrwdAd.mp4
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20255905/21/25/cwarp.hiplc
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20255905/21/25/cop_Mattias.chromawarp.1.0.hdalc
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20255905/21/25/image.png

Archived post by sniperjake945

here’s something fun. if you’ve ever wanted to pass the layer data into a function in opencl and then read from the layer, here’s how to do it! ๐Ÿ™‚
“`c #bind layer src? val=0 #bind layer &dst
float4 buffereIndexCUSTOM(const IMX_Layer* in_layer, int2 xy){ return bufferIndexF4(in_layer, xy, in_layer->stat->border, in_layer->stat->storage, in_layer->stat->channels); }
@KERNEL { float4 vals = buffereIndexCUSTOM(@src.layer, @ixy); @dst.set(vals); }
“`
this way you can use layer data in functions! you lose the ability to use `@binding` inside of the functions, but at least you have access to the layer functions. For more info on the IMX_Layer struct check out `$HFS/houdini/ocl/include/imx.h` and then if you’re curious what functions you have access to you, you’ll want to read the `$HFS/houdini/ocl/include/imx_internal.h` include

someone here has probably already figured this out, and i will say that its super easy to crash your opencl playing with these functions, but it definitely makes passing data into and out of functions way easier!

Archived post by mattiasmalmer

very interesting. I do not use that. i use a variant of laplacian image blending
posted about it here: discord.com/channels/270023348623376395/1260727356746764308/1342984912009171025

Here is another really useful color corrector.
It has the usual hueshift stuff.
but it is the along/perp stuff that makes it really neat. You select a direction. (say the classic teal and orange) then you can increase saturation along that axis and reduce it in the perpendicular axis. then if the image it too orange you shift the whitepoint towards orange to get the teal orange balance more centered.
I made this one for nuke a long while ago and use it very often. So here it is now for houdini! thanx to @jake rice ๐Ÿ˜ฎ for pushing sideFX to fix the mat3inv() function ๐Ÿ™‚

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20252405/18/25/hueX.hiplc
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20252405/18/25/houdini_G1YdcSydnd.mp4
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20252405/18/25/cop_Mattias.hueX.1.0.hdalc