Jump to content

konstantin magnus

  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won


Everything posted by konstantin magnus

  1. nail polish texture

    Put the noise into a modulo to repeat it and feed this into a color ramp. noise_ramp_modulo.hipnc
  2. Make line length match width of object directly underneath

    The facet node removes those inline points for you. line_intersect.hipnc
  3. Getting Objects to spawn on the Normal location

    Hi Ahmet, just to confuse you a little bit more, here is the definite answer ; ) use addpoint(), prim_normal(), setpointattrib() and removeprim() in a primitive wrangle: int pt = addpoint(0, v@P); vector nml = prim_normal(0, i@primnum, vector(0.0)); setpointattrib(0, 'N', pt, nml, 'set'); removeprim(0, i@primnum, 1); Out of curiosity: Hasn't this already been solved in your old threads? Another thing: You keep posting in the wrong forum section: 'Education' is for posting tutorials and learning resources. Your questions belong to 'Modeling'.
  4. Clustering Objects individually

    Add this before the break: s@name = 'cluster_' + itoa(pt);
  5. Automatically fix mesh tunnels/holes

    You could try to fill the missing pieces with inverted space carving (left) or by re-projecting depth maps (bottom) or rather their tracing curves (right).
  6. Clustering Objects individually

    You can cluster per piece by making sure copy numbers are matching between primitives and cluster points. // primitive wrangle int pts[] = nearpoints(1, v@P, 1.0); i@cluster = -1; foreach(int pt; pts){ if(point(1, 'copynum', pt) == i@copynum){ i@cluster = pt; break; } } voronoi_per_piece.hipnc
  7. If you want to store the displacement between two objects with the same topology, use v@Cd = v@opinput1_P - v@P; Apply the displacement with v@P += v@Cd; In case the topology differs, shoot rays: vector pos_hit; vector st_hit; int prim = intersect(1, v@P, v@N * 5.0, pos_hit, st_hit); vector dir = pos_hit - v@P; v@Cd = dir; You will loose high frequency surface details, though. displacement.hipnc
  8. Automatically fix mesh tunnels/holes

    Hi Alexander, -> try this route: convert to VDB with VDB from polygons dilate with VDB reshape SDF close with VDB reshape SDF erode with VDB reshape SDF convert to polygons with convert VDB Make sure to play around with all parameters and radii to get as close as possible. fill_scan.hipnc
  9. Automatically fix mesh tunnels/holes

    There are greater chances of success by going one step back, eg. improving the meshing algorithm based on the underlying point cloud data. Once you got hold of the point cloud, try (point replicate,) VDB from Particles, VDB reshape, VDB smooth and VDB convert to get a mesh thats closer to the real surface.
  10. rotation matrix to degrees

    Hi Johannes, have you looked into cracktransform() yet? It extracts transform vectors one at a time: // translate (c=0), rotate (c=1), scale (c=2), or shears (c=3) vector cracktransform(int trs, int xyz, int c, vector pivot, vector pivot_rotate, matrix xform) https://www.sidefx.com/docs/houdini/vex/functions/cracktransform.html
  11. Procedural Modeling: Donut Tutorial

    Just to show the blender heads how it's done ; ) I have created a tutorial on modeling a procedural donut and chose this place for posting the (updated) hip file. donut.hipnc
  12. Help With a small project please. For a (Feasibility test)

    Hi Ahmet, simply put an expression like $TY < -0.01 into a delete node. Also please make sure to learn the basics of Houdini. Things like these are well covered and can be googled in no time. copy_to_prim_center_2.hipnc
  13. Yes, this is just a technical concept for getting all kinds of geometries and their attributes from GEO- to COP-context. You can potentially create very specific maps with this. But it's not necessarily meant to be fed directly to an artist.
  14. Help With a small project please. (Feasibility test)

    Hi Ahmet, you can copy geometries to primitive's center by adding points with normals inside a primitive VOP before using a copy SOP. copy_to_prim_center.hipnc
  15. Hi Vincent, you can use those maps as masks when texturing. They transfer geometry information and potentially all sorts of attributes.
  16. Reset Rotation to 0

    Alternatively, if it's really just a set of lines, you could put any other point to its primitive's perimeter: float perim = primintrinsic(0, 'measuredperimeter', @primnum); v@P = @ptnum % 2 ? set(0.0, 0.0, perim) : vector(0.0); center_align_edges_2.hipnc
  17. Reset Rotation to 0

    Hey Robby, you can translate random lines to center by calculating the average of their end points: // translate to origin vector pos = v@P; int pt_nb = neighbour(0, @ptnum, 0); vector pos_nb = point(0, 'P', pt_nb); vector center = avg(pos, pos_nb); v@P -= center; To align them first calculate the direction from one end point to another. Then use the dihedral function to create rotation matrices towards the desired axis. vector axis = chv('axis'); // rotate to axis float neg = sign(pt_nb - @ptnum); vector dir = normalize(pos_nb - pos) * neg; matrix3 rot = dihedral(dir, normalize(axis)); v@P *= rot; That way all lines should point at the same direction: center_align_edges.hipnc
  18. Hi Khaled, you can transfer geometry shapes and attributes to pixel maps with VEX functions such as uvsample(), xyzdist(), primuv(), volumesample() and nearpoint() inside a VOP2COP Generator. I attached examples covering: Transferring attributes Blending image textures by attributes Tracing points Tracing closed 2D curves Tracing open 3D curves Tracing flattened meshes Sampling volumes Combining those should give you a good variety of procedural image painting options, either directly or for masking: Another option esp. for baking ambient occlusion or even rendering perspective views would be raytracing with the intersect() function. GEO_to_COPs.hipnc
  19. controlling random colors per bunch.

    Hi Thomas, Use cylinder columns. Give your copies a copynum attribute. Within each bundle sort primitive numbers randomly. Assign primitive colors by their new primitive number divided by the total number of primitives. f@id = @primnum / float(@numprim -1); v@Cd = chramp('color', f@id); bundles.hipnc
  20. As long as your Python usage is only about listing files, setting parameters, creating nodes and such I don't think you have to wait. The language has very little to do with VEX anyway. I mainly put together my python scripts by combining results from stackoverflow, odforce threads and SideFX's documentation.
  21. Nothing. The python script should fill it. If it does not replace the 2nd but last image line with: image = path + files[num] read_image_folder_fullpath.hipnc
  22. Hi Dave, you could feed the trace SOP with image file paths from a python node: import os import glob node = hou.pwd() node_tracer = hou.node('../trace1') dir = node.evalParm('dir') num = node.evalParm('num_img') path = hou.expandString(dir) os.chdir(dir) files = glob.glob('*.jpg') total_num = len(files) - 1 num = max(min(total_num, num), 0) image = files[num] node_tracer.parm('file').set(image) read_image_folder.hipnc
  23. Scale by Absolute Value?(newbie question)

    You can squeeze an arbitrary object between two other objects by translating it to the center of the gap: (bbox('../LEFT', D_XMAX) + bbox('../RIGHT', D_XMIN)) / 2 temporarily scaling it to unit size: 1 / $SIZEX and scaling it by the size of the gap: abs(bbox('../LEFT', D_XMAX) - bbox('../RIGHT', D_XMIN)) Not entirely sure whether this is what you have requested, though. squeeze_inbetween_objects.hipnc
  24. Hi Ilya, the instance geometry node offers a more usable approach : https://www.sidefx.com/docs/houdini/nodes/sop/instance.html Assign an arbitrary number of objects in a multiparm block. Then apply random choices to s@instancepath for random distribution. int seed = chi('seed'); int inst_total = chi('instances'); int inst_num = int(rand(@ptnum + seed) * inst_total) + 1; s@instancepath = 'op:' + chs('object_instance' + itoa(inst_num)); f@pscale = chf('scale' + itoa(inst_num)); chess_instancing.hipnc You can read more about instancing here: https://www.toadstorm.com/blog/?p=493
  25. Good idea. Here is an example using point instancing for better performance. chess.hipnc