Houdini Reference
# Creating Groups in Vex
You can create groups in vex in various ways.
|
|
example:
|
|
# Chramp shape of line
|
|
# BBox expression
You can use this in parameters
|
|
in a wrange you can use similar expression
|
|
# Random Attributes in Copy to Points
Copy to points goes in a for each loop, for each begin is on the points side
Randomized attribute goes on the points prior to the loop
On the parameter on the geo side you want to read the attribute into, run a point function
General format being
point("../foreach_begin<whatever>", 0, "attribute_name", 0)
# Resample into random length segments
Houdini VEX code to resample a (two point) curve into segments of random length (with restrictions)
|
|
# Adding second to last point to a group
setpointgroup(0,"controlPoint",npoints(0)-2,1,"set");
Here’s what each part of the expression means:
setpointgroup
: This is the function used to set the group of a point in Houdini.0
: This is the index of the point cloud that contains the point you want to set the group for."controlPoint"
: This is the name of the attribute that defines the point’s group. If this attribute doesn’t exist, it will be created.npoints(0)-2
: This is the index of the point you want to set the group for. In this case, it’s the next to last point in the point cloud (npoints(0)
is the number of points in the point cloud with index0
, andnpoints(0)-2
is the index of the next to last point).1
: This is the group number you want to set for the point. In this case, the point will be assigned to group1
."set"
: This is an optional string argument that sets the mode for setting the group. In this case,"set"
means that the existing group will be overwritten.
This line of vex code sets the group of the next to last point in point cloud 0
to group 1
. The group is defined by the "controlPoint"
attribute, which will be created if it doesn’t already exist.
# Houdini vex create tunnel
|
|
# Houdini vex parabola
|
|
# Houdini vex golden ratio
|
|
# Strange Attractor vex houdini
The below code goes in the wrangle above.
|
|
The below should go in a wrangle inside of solver
There are several different attractors.
|
|
|
|
|
|
|
|
|
|
# Houdini vex rotate object
|
|
# Golden Ratio Tower
Below is each wrangles code in order according to the screenshot:
|
|
|
|
|
|
|
|
# Houdini vex prep bricks
|
|
# 2D fractal on a grid
|
|
# 3D fractal from volume
|
|
# Copy Fractal
in transform1 put the following code in universal transform
|
|
# Calculating Light angle in vex wrangle
|
|
# Lsystem snowflake
# Modular Arithmatic Vex
|
|
in the copy to points put the following in the total copies field:
|
|
# Golden Ration Sunflower Vex Houdini
|
|
# Find Borders Vex
|
|
![[notes/attachments/Pasted image 20230207163516.png]]
# Attribute Falloff
|
|
@P.y += @Cd.r;
=> raise geo
# Houdini Vex Spiral
|
|
# Houdini Vex Create Circle
|
|
# Houdini Labs mapbox
# Advect on surface
atribvop1:
attribvop2
DOP:
wrangle1:
|
|
wrangle2:
|
|
# Vex add point to center of faces
|
|
Lift points off surface
|
|
|
|
|
|
# Vex random variants
|
|
# Houdini Scale Setup
|
|
|
|
|
|
|
|
# Orient Along Curves Polyframe
# Houdini add first and last point to group
|
|
# Houdini correct normals
Reversing & Correcting Normals in Houdini Pt. 4/4 – Correcting Primitive Normals - YouTube
# Centroid of Prims
using v@P
in a prim wrangle returns the centroid
# Groups to Attributes Vex
|
|
# Gradient Vex
|
|