{"id":572,"date":"2022-04-14T13:48:12","date_gmt":"2022-04-14T20:48:12","guid":{"rendered":"http:\/\/fx-td.com\/houdiniandchill\/?p=572"},"modified":"2022-04-14T14:09:32","modified_gmt":"2022-04-14T21:09:32","slug":"archived-post-by-sniperjake945-10","status":"publish","type":"post","link":"http:\/\/fx-td.com\/houdiniandchill\/2022\/04\/14\/archived-post-by-sniperjake945-10\/","title":{"rendered":"Archived post by SniperJake945"},"content":{"rendered":"<p class=\"\">One thing I neglected to mention in that post is xyzdist and mindist both require primitives in the geo stream you&#8217;re looking up<\/p>\n<p class=\"\">So they aren&#8217;t totally apples to apples with nearpoints\/pcfind<\/p>\n<p class=\"\">okay i couldnt help myself, but here&#8217;s single pass random overlapping dots &#8220;`c #include <voptype.h> #include <voplib.h><br \/>\nvector dots(vector2 uv_in; vector2 freq; float rand_position, rand_scaling, rand_exp, dot_sharpness, alpha_out){     vector2 uv = uv_in;     uv *= freq;     vector2 iuv = floor(uv);     vector2 grid = frac(uv);     float alpha = 0;     vector color = 0;     float sharpness = fit(dot_sharpness, 0, 1, .5, 1);     for(int i = -1; i <= 1; i++)     for(int j = -1; j <= 1; j++){         vector2 nb_pixel = set(i, j);         vector2 nb_offset = vector2(rand(iuv + nb_pixel + 324)) * clamp(rand_position, 0, 1); \/\/random positional offsetting         vector nb_color = vector(rand(iuv + nb_pixel + 64));         float nb_dot_size = pow(fit01(rand(iuv + nb_pixel), max(1 - rand_scaling,0), 1), rand_exp); \/\/random scaling         float  nb_dots =  length(nb_pixel + nb_offset - grid) - nb_dot_size;          nb_dots = -min(0.0, nb_dots \/ nb_dot_size); \/\/convert from distance field to dot         nb_dots = smooth(1. - sharpness, sharpness, nb_dots); \/\/sharpening the dots         vop_composite(\"AoverB\", color, alpha, nb_color * nb_dots, nb_dots, color, alpha);                }     alpha_out = alpha;     return color; }\nvector2 uv = set(<a href=\"mailto:v@uv.x\" >v@uv.x<\/a>,<a href=\"mailto:v@uv.y\" >v@uv.y<\/a>); float sharpness = ch(&#8220;sharpness&#8221;); vector2 freq = chu(&#8220;dot_freq&#8221;); float random_dot_scaling = ch(&#8220;rand_scaling&#8221;); float random_exponent = ch(&#8220;rand_exponent&#8221;); vector2 offset = vector2(chu(&#8220;offset&#8221;)); float  rand_offset = ch(&#8220;rand_dot_offset&#8221;); float dots_alpha; vector random_dots = dots(uv + offset \/ freq, freq, rand_offset, random_dot_scaling, random_exponent, sharpness, dots_alpha);<br \/>\n\/* comp dots over incoming color*\/ float alpha_out = 0; vop_composite(&#8220;AoverB&#8221;, <a href=\"mailto:v@Cd\" >v@Cd<\/a>, alpha_out, random_dots, dots_alpha, <a href=\"mailto:v@Cd\" >v@Cd<\/a>, 1);   &#8220;`<\/p>\n<p>Attachments in this post: <br \/><a href=\"http:\/\/fx-td.com\/houdiniandchill\/wp-content\/uploads\/discord\/20224804\/14\/22\/unknown.png\">http:\/\/fx-td.com\/houdiniandchill\/wp-content\/uploads\/discord\/20224804\/14\/22\/unknown.png<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>One thing I neglected to mention in that post is xyzdist and mindist both require primitives in the geo stream you&#8217;re looking up So they aren&#8217;t totally apples to apples with nearpoints\/pcfind okay i couldnt help myself, but here&#8217;s single pass random overlapping dots &#8220;`c #include #include vector dots(vector2 uv_in; vector2 freq; float rand_position, rand_scaling, &hellip; <a href=\"http:\/\/fx-td.com\/houdiniandchill\/2022\/04\/14\/archived-post-by-sniperjake945-10\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Archived post by SniperJake945<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts\/572"}],"collection":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/comments?post=572"}],"version-history":[{"count":0,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts\/572\/revisions"}],"wp:attachment":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/media?parent=572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/categories?post=572"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/tags?post=572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}