
Posts
1,119 
Joined

Last visited

Days Won
157
Everything posted by konstantin magnus

To animate the spider web threads, you would pin the end points and set vellum to the constraint type 'string'. For membranes to 'cloth'. spiderweb.hipnc

For static models I mostly just fake gravity based on curve lengths or surface distances: https://procegen.konstantinmagnus.de/spiderweb https://procegen.konstantinmagnus.de/minimalsurfacemembrane Eg. for resampled curve segments on a spider web, a is the user defined hanging amount, u the relative and r the absolute length. u * (1.0  u) is a function to make the curves hang in their center. float a = chf('amount'); float u = vertexcurveparam(0, i@vtxnum); float r = primintrinsic(0, 'measuredperimeter', i@primnum); v@P.y = u * (1.0  u) * a * r; spiderweb.hipnc

How would you create this kind of snow accumulation?
konstantin magnus replied to ploytv's topic in General Houdini Questions
Cool, I've just replaced the iterative approach by a tracer that does practically the same thing. int steps = chi('steps'); float w = chf('width'); float dist = 0.0; if(f@mask < 0.5){ vector pos = v@P; for(int i = 0; i < steps; i++){ vector grad = volumegradient(0, 'height', pos); pos = normalize(grad) * w; float mask = volumesample(0, 'mask', pos); if(mask > 0.5){ dist = 1.0  i / (steps  1.0); break; } } } f@mask = max(f@mask, dist); snow_accum.hipnc 
Visualizing mesh thickness
konstantin magnus replied to ikatz001's topic in General Houdini Questions
Hi Isaac, in this case couldn't you work with one ray, eg. using the ray SOP with inverted normals? thickness.hipnc 
How would you create this kind of snow accumulation?
konstantin magnus replied to ploytv's topic in General Houdini Questions

Seamlessly stitch two HeightFields
konstantin magnus replied to Neikke's topic in Lounge/General chat
I think you would still need to correct the point numbers to really make all the tiles match, but yeah, I'm glad it's useful. 
Seamlessly stitch two HeightFields
konstantin magnus replied to Neikke's topic in Lounge/General chat
Copy the height fields to the points of an octahedron to shape a cube, apply noise there and assign them to a cross. Alternatively try sampling the world position noise from a cube mesh right away: int index[] = array(0,2,1,3,5,4); vector bb = relbbox(0, v@P); vector uvw = set(bb.x, bb.z, 0.0); vector pos = primuv(1, 'P', index[i@primnum], uvw); float height = noise(pos * 50.0) * 200.0; f@density = height; heightfield_cube.hipnc 
Seamlessly stitch two HeightFields
konstantin magnus replied to Neikke's topic in Lounge/General chat
Hi Natiq, maybe there is a node for this, but you could overlap both height fields and sample them into a new one: float band = chf('band'); float h_0 = volumesample(1, 'height', v@P); float h_1 = volumesample(2, 'height', v@P); float mask = smooth(band, band, v@P.x); f@height = lerp(h_0, h_1, mask); hf_blend.hip 
Hi PingYen, we had this a while back: https://www.sidefx.com/forum/topic/79315/#post341726

A lowpoly helicopter from a sweep and some extrusions. Raycasted to shine on a CRT monitor.. helicopter.hipnc

Thank you Tesan! I've just translated the first example from C to VEX for a volume wrangle. // Use Monte Carlo integration and ray marching // of signed distance field (SDF) to render emissive circles. // Source: https://github.com/miloyip/light2d/blob/master/basic.c int samples = chi('samples'); function float sd_circle(vector2 uv, pos; float radius){ float dist = distance(uv, pos)  radius; return dist; } function float sd_scene(vector2 uv){ float d_0 = sd_circle(uv, {0.3, 0.18}, 0.12); float d_1 = sd_circle(uv, {0.25, 0.18}, 0.12); float d_2 = sd_circle(uv, {0.3, 0.2}, 0.02); float dist = min( max(d_0, d_1), d_2); return max(dist); } function float trace(vector2 uv, dist){ float t = 0.0; for(int i = 0; i < 100 && t < 2.0; i++){ float sd = sd_scene(uv + dist * t); if(sd < 1e5) return 1.5; t += sd; } return 0.0; } function float sample(vector2 uv; int samples){ float sum = 0.0; for(int i = 0; i < samples; i++){ float a = 2.0 * PI * ((rand(uv) + i) / float(samples)); sum += trace(uv, set(cos(a), sin(a))); } return sum / float(samples); } vector2 uv = set(v@P.x, v@P.y); f@d = sample(uv, samples); light_2D.hip

Hi Robert, yes, you can integrate the minimal surface position with the ray node or minpos(). I've added the pig head to the food input to motivate growth there, as well. mycelium_3d.hipnc

Hi @sessionbeer, not quite the same, but this one comes close: https://procegen.konstantinmagnus.de/growingamycelium

Here's a way to draw a 2D SDFcurve. sdf_curve.hipnc
 5 replies

 1

 signed distance
 copies

(and 2 more)
Tagged with:

Resample in VEX? (imitate Resample SOP  resample vector array)
konstantin magnus replied to Krion's topic in Scripting
Hi @Krion, the spline()function can do this: https://www.sidefx.com/docs/houdini/vex/functions/spline.html 
I need to find a way to detangle some spheres...
konstantin magnus replied to Masoud's topic in General Houdini Questions
Hi Masoud, there are probably some particle operators doing the same thing faster, but you could pull and push a voronoinetwork according to the point scales until all spheres are deintersected. deintersect_spheres.hip 
Geometry Object conforming to another Geometry surface
konstantin magnus replied to virgile's topic in Modeling
Hi @virgile, you could blend positions based on their distance towards the surface: In a point wrangle with first input mesh, second input sphere: float d_min = chf('min_distance'); float d_max = chf('max_distance'); int prim; vector uvw; float d = xyzdist(1, v@P, prim, uvw); vector pos = primuv(1, 'P', prim, uvw); float mask = smooth(d_min, d_max, d); v@P = lerp(pos, v@P, mask); conform_to_surface.hipnc 
What would be the current preferred language to script patterns for Renderman inside Solaris? Eg. turning UV coordinates into dots and stripes as color vectors or float masks: vector uv = v@uv; float d = distance( frac(uv*8), {0.5, 0.5, 0.0} ); float c = 1.0  smooth(0.2, 0.5, d); v@Cd = c;

You would need another vector called "up" that points upwards, eg. v@up = {0,1,0};

Keep primitive attributes when I save as obj
konstantin magnus replied to anicg's topic in General Houdini Questions
Hi Mani, before exporting you can promote primitive attributes to vertex UVs and/or vertex normals and promote them back after importing the OBJ. Wikipedia describes the OBJformat: The OBJ file format is a simple dataformat that represents 3D geometry alone — namely, the position of each vertex, the UV position of each texture coordinate vertex, vertex normals, and the faces that make each polygon defined as a list of vertices, and texture vertices. obj_attrib.hip 
Questions about edgeequalize node and topology. thanks
konstantin magnus replied to markmu's topic in Modeling
Try the circle from edgesnode in case the holes are supposed to be circular. 
I need some advice on the ripples of the ship.
konstantin magnus replied to eunchae's topic in Effects
There is a Kelvin Wakes deformer in SideFX Lab's now: https://www.sidefx.com/docs/houdini/nodes/sop/labskelvin_wakes_deformer1.0.html 
How would you blend positions between meshes with different topology and uneven point count? My idea was to use the 'underlying' primitive's intrinsic UV coordinates for matching. But when transfering to world position I run into this typical "fix boundary seams"issue known from the UV texturenode. blend_pos.hip

How to vertically align a uv texture?
konstantin magnus replied to Bill Mill's topic in General Houdini Questions
Polyextrude does UVs. Just assign UVs on the grid in advance and ignore the viewport issue that comes later. extrude_uv.hip 4 replies

 uv texture
 uv

(and 1 more)
Tagged with: