Mirroring multiple objects (cloner, matrix, arrange, copy to points) in Houdini



Mirroring multiple objects (cloner, matrix, arrange, copy to points)

add source object which will be copied:

add tube node (cone) rotate: 90 0 0 radius: 0 0.5 add match size node (to align bottom of objects) justify Z: min

add some points to copy object too:

using points from 3d geometry

add sphere node primitive type: polygon mesh rows: 3 coloumns: 6 (circle/line wouldn't work, it needs to be a 3d object, like sphere or tube to get outside pointing normals, see using points from curve or line) add normal node add normals to: points

using points from curve or line (pointing in one direction)

add line node points: 6 add attribute adjust vector node (adding normals pointing upwards) attribute name: N operation: set always constant value: 0 0 1 (turn on normals in viewport) add another attribute adjust vector node (rotating the normals) (to rotate normals) attribute name: N adjustment for: direction only operation: rotate adjust with: random (add copy to points node)

using points from curve (with outwards pointing normals)

add circle node (geometry to copy) radius: 0.2 add another circle node (geometry for creating points to copy to) orientation: ZX plane add polyframe node uncheck normal name check tangent name: N add copy to points node

lots of points, distributed surface

(add vdb from polygons, for distribution inside) add scatter node for random points which have normals to push points apart: use relax iterations (continue with randomize stuff)

using specific points

add add node (or extract all points node) check delete geometry but keep points add blast node remove top most and bottom most point (so there is only a middle row of points, check if normals point outside) add copy to points node and feed tube and points (uncheck transform using target point orientations to align all in same direction)

scale objects based on position, gradient, noise

add a sphere add grid node add scatter add attribute adjust float node operation: set always pattern type: line or noise add copy to points node and feed sphere and attribadjustfloat (also see create dotted version of a photo)

randomize orientation (up):

(rotating sideways while still being aligned with normal direction) add attribute randomize node (after scatter node) attribute name: up the rotation is randomized only 180°, so change the following as well: min value: -1 -1 -1 -1 0 or set Distribution: Direction or Orientation

set/animate rotation (@N + @up):

add attribute adjust vector node (after attribrandomize) attribute name: up adjustment for: direction only operation: rotate axis of rotation: from attribute axis attribute: N rotate angle: (set/animate)

randomize orientation (tilt):

(rotating freely with partial alignment to normal direction) add transform node (after blast node) attributes: N then rotate in viewport to slightly change orientation add attribute randomize node (after transform node) Attribute Name: N Operation: Add value Distribution: Direction or Orientation Cone Angle: 50 Direction Attribute: N (uncheck cone angle for more random look)

randomize scale/color:

add attribute randomize node (after scatter node) Attribute Name: pscale (for size) or Cd (for color) scale (for height) (find more in help under instancing point attributes)

using scatter and align

(don't add attribute randomize) and use scatter and align node instead which has scale and rotation functions build in

using color node

add color node (after scatter node) color type: random (then add copy to points node)

with multiple colors from ramp

add attribute color adjust node (after scatter node) attribute class: point pattern type: random color ramp: adjust this

preventing intersections with scatter and align node

add sphere (new node tree) add grid node rows: 200 columns: 200 add mountain node add scatter and align node coverage: 1 scale -> min radius: 0.1 (additionally this node packs lots of orientation features, doesnt need attribute randomize) add copy to points node and feed sphere and scatteralign nodes

preventing intersections with point relax node (push apart)

add sphere uniform scale: 1 (keep it at 1!) (new node tree) add grid node rows: 200 columns: 200 add normal node (points relax node needs normals!) add scatter node force total count: 2000 add attribute randomize node attribute name: pscale global scale: 0.4 (set here the scale for the sphere!) add point relax node (feed attribrandomize in 1st and normal1 in 2nd input) max iterations: 100 add copy to points node and feed sphere and scatter nodes

preventing intersections with density attribute

(push apart with scaling based on noise pattern) add sphere radius: 1 1 1 uniform scale: 1 (keep it at 1!) (new node tree) add circle divisions: 50 add remesh node target size: 0.05 add attribute noise node attribute names: float Cd (so it's black&white) check enable remap ramp (then click on 2nd icon -> maximize ramp) noise pattern -> element size: 0.4 add scatter node check density attribute: Cd relax iterations: 100 output attributes tab -> check output radius attribute: pscale add copy to points node and feed sphere and scatter nodes

for already connected geometry

add connectivity node (after copy to points or copy and transform) add color node color type: random from attribute attribute: class

distribution based on noise (to create moss)

(add grid or sphere) add normal node add normals to: points add scatter node add attribute vop and go inside add bind export node name: pscale (and move it to end of network, will be last node) add unified noise static node connect P (of vopglobal) to pos and noise to input (of bind) frequency: adjust... fractal type: standard roughness: adjust... (to visualize, just use another sphere and attribVOP and connect the noise to Cd of output, use fit node to adjust, see output on copy to points node!)

randomize color (to create tiles)

add attribute vop node (under grid) run over: primitives (go inside the node) add a random node connect P (of vopglobal) to pos uncheck clamp position to integer add a color mix node connect rand (of random node) to bias connect clr to Cd (of vopoutput) set primary color to blue set secondary color to white (add multiply constant node before random node) (set a value to generate a different seed) add unified noise static node connect P (of vopglobal) to pos and noise to bias (of colormix) frequency: adjust... fractal type: standard roughness: adjust... (for nicer patterns than those of random node but less contrasty)

randomize roation

(under first scatter node or attribute vop) add scatter and align node (feed into second input!!) mode: add attributes to existing point cloud rotation around normal -> min angle / max angle

for sideways rotation:

while keeping orientation of normal: see randomize orientation (up)

multiple versions, variations of geometry with copy to points

creating the geometry

(after adding 5 versions of some test geo ) add merge node add connectivity node attribute: variant

copy to points

add sphere or grid node (source object for points to copy to) add normal node add normals to: +points add scatter or scatter and align node add attribute from pieces node first input: feed the points second input: feed the connectitity node here piece attribute: variant mode: random add copy to points node feed connectivity and attribfrompieces piece attribute: variant (see Falling Leaves for animating this)

painting attributes

to create forest (with density)

add tube node radius: 0.1 0.1 add grid node rows: 200 columns: 200 add attribute paint node click in viewport and press ENTER mouse wheel increase/decrease radius crtl click erase shift click smooth if it's not visible, enable visualization icon (bottom right pin icon next to viewport) add scatter node density attribute: mask add copy to points node feed tube and scatter nodes

to paint colors on an object

add sphere primitive type: polygon frequency: 50 add paint color node (attribute paint node with Cd attribute) mouse wheel increase/decrease radius crtl click paint background color shift click smooth

HSV color correction

add attribute adjust color node color correction -> check enable color correction adjust Hue, Value, Saturation, Brightness

painting attributes independently of geometry resolution

(using UVs, without subdividing geometry) add grid node add uv unwrap node add texture mask paint node resolution: 4096 click in viewport and start painting add scatter in texture mask node (connect the 2 inputs) mask: texture primitive

scattering points in volumes

add a box add isooffset node add volumenoise fog node operation: set add scatter

scatter with grid like structure, minecraft lego style

add a box node and scale it down uniform scale: 0.1 next to it add some test geo add points from volume node add a copy to points node and feed the pointsfromvolume and box nodes

speed up copy-to-points with packing and instancing

check pack and instance

src

https://www.sidefx.com/docs/houdini/nodes/sop/copytopoints https://www.cgforge.com/blog/copy-to-pnts-0239751



Published: September, 2022