Skip to content
Kurt Pachinger edited this page Sep 29, 2022 · 35 revisions

Process Flow

flowchart LR;
r3f((r3f))
vlay((vlay))

 r3f-->init
 r3f-->CSG<--geometry-->v

 vlay -- uid --> 
 gcut <--> morph --> segs --> v
 gcut --> matgen --> mat

Loading

Properties

mat

  • MAX -- maximum texture dimension
  • box -- BoxGeometry for cubemap
  • emit -- PointsMaterial for median
  • img -- Material for cubemap face
  • map -- Material for cubemap
  • neg -- Material for negative geometry
  • pos -- Material for positive geometry
  • xyz -- Array to lookup cubemap transforms

v

  • LOD -- relative unit, from display or geometry
  • R -- relative unit
  • csg -- updated by r3f in useFrame
  • emit -- Points for median
  • opt -- used by gcut, set by gui
  • out -- Group of csg and gcut result
  • state -- react-three-fiber
  • uid -- seed results

Methods

gcut (opt)

Raycast geometry's cubemap to accumulate morph defects, then output segs.

  • opt.init -- initialized Group will be reset, then replace materials and geometries
  • opt.i -- iterations of recursion
  • opt.s -- seed for matgen, to seedmap
  • opt.uid -- identifier for Group and seed
  • opt.img -- images for matgen, from remap

init (state)

Initialized with r3f reference and formats ux such as gui and minimap.

matgen (opt): Array

Creates a Material from opt.img Array, or from opt.s via seedmap.

morph (opt): Geometry

Raycast cubemap PYR from geometry center and face normal. RGBa sets vertex color and elevation scale (med/pos/neg) via accumulate transforms.

scope: blurs > positions > sample > scale > moment

  • opt.accum[cornerIndex] -- average position and scale lerps geometry position
  • opt.contour[faceIndex] -- defects labelled by scale are used in segs

segs (opt)

Classify features and set attributes of Geometry (or Points):

scope: contour > profile > topo > align > wrap

  • c.label -- defects (med/pos/neg) adjusted by count drift from local to overall
  • c.scale -- sum of cluster's normalized average scale and bias from median
  • system -- defect cluster's overall scale and spread determine connectedness
  • hull -- system's secondary union, from local proximity
  • seg.buff -- pos/neg defects create Mesh, which CSG references
  • seg.emit -- med defects create Points, which augment surfaces

util

  • gui -- dat.GUI options
  • minimap -- clickable cubemap layout
  • num (num, opt): Number -- format number with prefix, padding, decimals, string
  • refit (img, crop): Canvas -- image resize and rotate
  • remap (files) -- process image(s) for cubemap
  • reset (sel) -- remove element from scene, DOM, and memory

Resources

Research

Tools

Terminology

  • geometry: texel, depth, voxel, point cloud, metaball, NURB, blob, tomography, homography
  • texture: volume, quadtree, topology, segmentation, classifier