Jump to content

konstantin magnus

Members
  • Content count

    324
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by konstantin magnus

  1. Rigging a book

    You can also wrap pages by offsetting rotations a little for every page. // PARAMETERS float start = chf('start'); float touch = chf('touch'); float speed = chf('speed'); float flip = 1 - chf('flip'); vector fade = relbbox(0, @P); // POSITION @P.y -= vector( getbbox_size(0) ).y * 0.5; // WRAP PAGES matrix m = ident(); float copy = ( ch("../copy1/ncy") - prim(0, "copynum", @primnum) ) * flip; float t = @Time * speed - start - copy + sin( fade.x ) + fade.z * touch; rotate(m, smooth(0, $PI, t) * $PI, {0, 0, 1}); @P *= m; // TEXTURE COORDINATES v@uv = set(fade.x, fade.z * -1, 0); book_flip_pages.hipnc
  2. Dear Admins, could you possibly extend the recent replies and topics list on the main page? It´s getting hard to follow at a glance. Or am I missing a setting? Thank you!
  3. Rock formations

    Noise. Either from mountain SOPs, VOPs or heightfields, I´d say.
  4. MiG-23 DPRK Combat Plane & Various ammo

    Looks good! Maybe next time you could screen record your polymodeling, just to show that classic modeling can be done inside Houdini just as well. And perhaps also to convince people that are still too lazy to fully make the switch (like myself ).
  5. How would you cut holes in to the mesh?

    Boolean results in lots of bad triangles. What is it you are trying to achieve in the end?
  6. Select every second row/edge loop on a grid?

    There is a range functionality in the Group SOP, where you can refer to the X divisions of the grid.
  7. Best way to slide verts along the existing path?

    As long as its just a sphere you can also rotate the points around the cross-product of their normals and an up vector. slide_sphere.hipnc
  8. Best way to slide verts along the existing path?

    It´s not that simple I think. You will need topolar for making the selections and in the end frompolar to slide the points. Maybe you can deduce it from this example:
  9. Best way to slide verts along the existing path?

    Use polar coordinates. There are polar nodes inside PointVOP.
  10. new to Houdini from Cinema4D, need to copy and scales a line

    Try polyexpand.
  11. Edit SOP (spherify)?

    btw: Another option would be offsetting the spherification center. vector center = getbbox_center(0) + chv('offset'); float size = max(getbbox_size(0)); vector sphere = center + normalize(@P - center) * 0.5 * size; @P = lerp(@P, sphere, chf('spherify'));
  12. Edit SOP (spherify)?

    Useful idea. I compressed the code a little.. vector center = getbbox_center(0); float size = max(getbbox_size(0)); vector sphere = center + normalize(@P - center) * 0.5 * size; @P = lerp(@P, sphere, chf('spherify'));
  13. Edit SOP (spherify)?

    Yes, it places all points exactly one unit away from the world center. A compromise would be interpolating between the current state and a spherified shape. @P = lerp(@P, normalize(@P), chf('mix')); While it might lead to geometrical collisions, you can for sure create really cute baby pigs with it
  14. Edit SOP (spherify)?

    @P = normalize(@P); //turns your mesh into a sphere
  15. Orient Along Organic Surface?

    Has to do with the winding of the underlying geometry. Just display the vertex numbers of the target geometry and you will see it's the polygons that are not consistent. It works fine on primitive objects, though (tori, grids etc.).
  16. Orient Along Organic Surface?

    Just blast them before counting. Apply a fit01() function on bbox. Make sure your copies have ongoing "copynum" attributes.
  17. Orient Along Organic Surface?

    primuv already is basically a 2d representation of the primitive's footprint. a not-aligned bounding box of each primitive can also be found in the primitives intrinsics called "bounds". if you want to copy and squeeze models onto primitives I would create the copies first, create a "copynum"-attribute and distribute the models with something like this: vector bbox = relbbox(0, @P); int prim = point(0, "copynum", @ptnum); float height = sqrt( primintrinsic(1, "measuredarea", prim) ); @P = primuv(1, "P", prim, set(bbox.x, bbox.z, 0) ); @P += prim_normal(1, prim, {0.5, 0.5, 0}) * bbox.y * height; The bounding box from line 1 is stretched across the primitives from line 2 with primuv in line 4. The approximate height of the copies gets derived from the primitives area size in line 3 and is raised along the primitives normals in line 5. copy_on_prims.hipnc
  18. Noise as Texture?

    Right click on the principled shader and choose "Allow editing of contents", dive inside and put a "Global variables" node and connect 'P' to a "rest position" node (otherwise your texture might float). Connect 'restP' to a noise node and put it´s output to the already existing pbrdiffuse1 node in the top network box that says diffuse_bsdf.
  19. Creating colour with facing ratio

    With optransform(), cracktransform() you can access a nice object chooser that reads out the camera position for you. I also corrected the code which results in this: float thresh = chf('threshold'); matrix cam_matrix = optransform(chs("camera")); vector cam_pos = cracktransform(0, 0, 0, {0,0,0}, cam_matrix); vector dir = normalize(cam_pos - @P); float angle = abs( dot(dir, @N) ); setpointgroup(0, "rim", @ptnum, angle > thresh, "set"); camera_angle_delete.hipnc
  20. Creating colour with facing ratio

    You can compare the angle of the camera direction towards the points against the surface normals with a dot product. float thresh = chf('angle_threshold'); vector cam_pos = normalize( chv('camera_position') ); vector dir = normalize(@P - cam_pos); float angle = abs( dot(cam_pos, @N) ); if(angle > thresh) removepoint(0, @ptnum); camera_angle_delete.hipnc
  21. TOO MUCH TEXT, WHERES THE PICTURE

    I find meaningless titles, long-winded questions, imprecise language and missing HIP-files oftentimes more problematic. And of course if people post their "General chat" under "General Houdini questions" ; )
  22. Use the sort node to sort your primitives reversely by attribute "area" and put 0 in a group or split node set to primitives.
  23. Parallel inset extrude to outer hull (formula)

    Polyextrude has an option "Transform extruded front", where you can define the offsets in detail. extrude.hipnc Maybe these explanations are helpful for getting the correct ratio, as well:
  24. Why would you set the rotation on a point-by-point basis? Just run an attribwrangle on detail, which stores one attribute for the whole geometry: f@uv_rot_y = 24.67; And access the attribute inside the uvtexture node´s rotation with a detail expression: detail(0, "uv_rot_y", 0);
  25. Spiral Unrolling / Rolling Animation

    If you know VEX, you can use an attribute wrangle inside a solver. Here is a rough sketch.. Set up a (quadratic) spiral: float rounds = (@numpt - 1) * 0.5; float grad = 1 - ( @ptnum / float(@numpt - 1) ); float spiral = (rounds * $PI * grad); @P.x = cos(spiral); @P.y = sin(spiral); @P *= grad; Unroll the curve inside a solver: int pt = int( ceil(@Time) ); float amount = ( radians(@Time % 1.0) * $PI * 2.5 ); matrix m = ident(); vector axis = set(0, 0, 1); vector offset = point(0, "P", pt); if(@ptnum > pt) { @P -= offset; rotate(m, amount, axis); @P *= m; @P += offset; } To get the wavy curve, merge it with a trail SOP running on the last point. Useful links: http://forums.odforce.net/topic/24056-learning-vex-via-animated-gifs-bees-bombs/ http://www.tokeru.com/cgwiki/index.php?title=The_solver_sop Example file: spiral_moving.hipnc
×