Archived post by mysterypancake

dumb cops question – does anyone know how to get the size of the volume in hscript?

i thought volumeres but no luck 🙁

finished prefix sum, now around 15x faster 👀

also the iterations can be animated now

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20263801/12/26/image.png
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20263801/12/26/prefixsum.mp4
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20263801/12/26/cops_fast_prefixsum.hiplc
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20263801/12/26/prefixsum_animate.webp

Archived post by kolupsy

a while ago I thought it would be fun to try and optimize the “equalize” node. It’s not perfect since I don’t think cops allows image inputs of different sizes but it seems to run faster than the builtin “equalize” node by using a more parallel-friendly algorithm. Thought I’d drop that here in case anybody is interested

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20260001/10/26/cops_fast_normalize.hipnc
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20260001/10/26/image.png

Archived post by lwwwwwws

i def think there’s potential for that typa shit e.g. these 6 million particles simulating and rendering at 60fps <:tide_pod:415308365942620161> with a fat glow on top even

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20255811/25/25/Ls_Cop3GPUparticles_v01.smal.mp4
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20255811/25/25/Ls_Cop3GPUparticles_v01.hipnc

Archived post by mattiasmalmer

here is a simple implementation of adjacency aware blur running over texture seams.

“` #bind layer src? val=0 #bind layer &tmp val=0 #bind layer adjacency? val=0 #bind layer &blur
@KERNEL { if (@Iteration==0) { @tmp.set(@src); } else { float4 sum=(float4)(0); for (int i=-@pixels; i<=@pixels;i++) { float2 uv= (@adjacency.bufferIndex((int2)(@ix+i,@iy)).xy); float4 px= (@blur.bufferSample(uv*(float2)(@xres,@yres)-(float2)(0.5f,0.5f))); sum+=px; } sum/=@pixels+@pixels+1;
@tmp.set(sum); } }
@WRITEBACK {
float4 sum=(float4)(0); for (int i=-@pixels; i<=@pixels;i++) { float2 uv= (@adjacency.bufferIndex((int2)(@ix,@iy+i)).xy); float4 px= (@tmp.bufferSample(uv*(float2)(@xres,@yres)-(float2)(0.5f,0.5f))); sum+=px; } sum/=@pixels+@pixels+1;
@blur.set(sum); } “`
bind “pixels” as int in the bindings tab. src and adjacency as inputs blur and tmp as outputs. enable writeback and include iterations.

you need the adjacency rasterizer i made a while back for the adjacency input…

now this is a pretty dogshit blur implementation mostly as proof of concept but it does blur the image so there’s that.

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20253311/07/25/houdini_XnfFGtckSi.mp4