favela city generator notes

2022-02-05 — ballinger philip

Scatter building points

  • init attributes: N, up, scale, floor count
  • point distribution
    • scatter node: relax itterations
    • point relax node: relaxing per pscale and conforming the points to geo in the 2nd input
    • measure: removing points per slope angle
    • vex/vop: nearpoint, pcopen

Template box copying / shaping

  • name template box. floor, ceiling, north, south, etc.
  • copy template box to floor level
  • rbd intersect / detangle hda
  • stack boxes based on floor level
    • feedback loop, isolate ceiling, make centroid
    • set initial attributes, orient, floor level, size of next box
    • copy new floor box
  • shaping
    • taper based on floor levels
    • isolate % of corners -> scatter box -> bool subtract
    • twist, bend floor levels
    • conform / fit building angle to each other and ground
  • insets, cutting out portions for more interesting shapes
    • postifx your template box naming scheme, east_inset, west_inset
    • bool subtract the shapesand the new walls will inherit the new name

Naming convention

  • s@type -> building number, build1, build2, etc
  • s@type_prop -> door, lamps, ceiling, wall, etc
  • i@type_id, i@type_itt
  • s@type_mat -> obsolete with usd
  • i@level, i@level_max -> floor level
  • i@lod -> level of detail
  • i@cluster -> wedging number

Rotation around an axis

Template box labels

  • facet -> unique points , post-compute normals
  • fuse points, set rest position, normals
  • copy to src points

Rotation around an axis

// point wrangle
v@up = @N;
matrix3 m = maketransform(v@dir, v@N);

vector axis = v@up;
@angle = radians(fit01(rand(@build_id),ch('min'),ch('max')));
rotate(m, @angle, axis);

p@orient = quaternion(m);

Template box labels

  • facet -> unique points , post-compute normals
  • fuse points, set rest position, normals
  • copy to src points
// prim wrangle
int pts[] = primpoints(0, @primnum);
vector normal = point(0, "N", pts[0]);

if (normal.y > 0)s@type = "roof";
else if (normal.y < 0)s@type='floor';

if(normal.y==0)s@type='wall';
if(@type=='wall' && normal.x==1 || normal.x==-1)@type='wall_x';
if(@type=='wall' && normal.z==1 || normal.z==-1)@type='wall_z';

img


detangle intersecting

  • bullet solver deintersect hda
  • used it quite allot so i packaged it up, but basically its just setting found_overlap on your packed geometry

img


2022-05-03
hda

bricker

  • cutter tool that aligns itself to the longest edge of a poly. useful for brick walls, rooftops, upres messy topology etc.
  • cut rows and or columns, group every second row

img


2021-07-28
hda

window hda

  • create a couple of window variants for your "copy to points" node
  • output: packed geo (window, pane, sub), lod toggle

img


2020-09-20
hda

electrical box

  • min, max parms on all attribs, seed slider creates new variantes
  • input for external cables feeding into the box

img


2020-08-30
hda

door hda

  • which will be the first and last door i will ever model
  • same logic as the window hda

img


2020-07-26
hda
sculptings houdini assets