Home Houdini_intro
Post
Cancel

Houdini_intro

Houdini_intro

Roll Tube - Attributes / Geometry / UV

Base

  • Scatter
  • copytopoints
  • Group -> group the bottom point

PolyLine

Bezier -> PolyLine

  • Resample

Mesh

  • add noise in pscale and p

Attributes

https://entagma.com/courses/ahtya-2-adding-houdini-to-your-arsenal-2-0/ahtya-2-0-pt-08-understanding-attributes-in-houdini/

Unlike groups, attribs allow us to specify a data type. In this case we’re using a float attrib (a number with a decimal point) to create a smooth

P - Positions (VectorPoints)
N - Normals / Directions (VectorPoints or Vertices)
uv - UV Coordinates (VectorPoints or Vertices)
Cd - Color (VectorPoints)
pscale - Scaling / Size of stuff (FloatPoints)

  • maskbyfeature

  • timeshift -> become static 解决让某一部分不按frame变化 (remove attribute animation)

    Output

    remove extra output, clear attribute -> which can be clear in the shader

Geometry

  • edge: not for building the model, but for selection

  • vertices has direction

When working with groups and attribs, using points or prims is usually a lot simpler and more practical, than using vertices.

However in some cases, for instance in normals or uvs, vertices do offer us more options, we might need to get the desired result.

UV

For Loop

https://entagma.com/courses/ahtya-2-adding-houdini-to-your-arsenal-2-0/ahtya-2-0-pt-13-understanding-for-loops-in-houdini/

  • Foreach loop
    • piece (name)
    • point
    • primitive
    • feedback(add randomness to each element)
  • clip
  • blast
  • matchsize

  • switch

    • selection input(bool) eg. rand(detail(0, "iteration", 0))>.75

Procedural city - Node / VOPs / Wrangle

import 2D OSM data to bego format

  • get data from OpenStreetMap

  • osm_import & osm_filter

Setting random height

  • give random height according to a base

  • measure (area base)

  • more noise
    • attribrenoisse
    • attribrandom
  • Remap -> make some different on certain building

VOPs

  • Bind -> import attributes

  • Remap

  • noise

  • index of the current primitives -> random

Wrangle / Vex

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//Get Attrib
float area = f@area;

//Remap
float zscale = fit(area, 1.0, 25000.0, 0.0, 1.0);
zscale = chramp("Remap", zscale);
zscale = fit(zscale, 0.0, 1.0, 10.0, 30.0);

//Noise
float noise = noise(v@P/1000);
noise = chramp("Noise", noise);
noise = noise * 100;
zscale = zscale + noise;

//Random
float random = rand(i@primnum);
random = fit(random, 0.0, 1.0, 0.8, 1.2);
zscale = zscale * random;

//Update Attrib
f@zscale = zscale;

Data Visualization

  • import CSV -> tableimport -> Get Arrtibutes

  • degree -> cartesian coordinate
1
2
3
4
5
6
7
8
9
10
11
12
//Load in lat lon attribs and convert them to radians.
float lat = radians(f@lat);
float lon = radians(f@lon);

//Calculate xyz coordinates based on lat lon
float x = cos(lat) * cos(lon);
float y = cos(lat) * sin(lon);
float z = sin(lat);

//Write coordinates back to position and normal
v@P = set(x,y,z);
v@N = set(x,y,z);
  • transform -> rotate x axis

  • color -> country

  • pop - pscale

  • add pillar to the sphere

    • line
    • copytopoints
    • sweep

Rock Generation

low poly rock

  • Scatter: make it to points-> voronoifaracture: make random division
  • matchsize: make each piece in the center

high poly rock

  • uv: reserve the original uv info
  • remesh: make more division
  • mountain: deform
  • mesh_sharpen: modify the iteration -> make it rough
  • edge_damage: method: boolean -> sharpen some edges
  • vop: random color cd -> random greyscale

Rails

Facet: Clean up points. Make sure every line only has two points as endpoints

resample: Treat polygons as Subdivision Curves -> set up points evenly

Convertline: take lines into primitives

Instance model in different size based on line’s length

primitivesplit1 + primitiveProperty -> sacle = 0: get the middle point of the primitives

Divide different property -> uniform scale: maintian the scale in the wrangle

This post is licensed under CC BY 4.0 by the author.