Create geometry from texture/color in Houdini



Create geometry from texture/color

workflow v1

(this workflow create 3d-models from 2d-images, like stamp/alpha) create a b/w image (affinity designer/photo) in 1:1 square format only 2 values (black and white, no gradients) in houdini, add a grid node add UV texture node scale: 1 -1 1 offset: 0 1 0 add subdivide node depth: 7 add attribute from map map source: file texture map: b-w-image.png add blast node group: @Cd<.01 group type: points add polyreduce node percent to keep: 1 add clean node check remove attribs check remove groups add labs dissolve flat edges node

to create random height of elements (brick wall, city blocks):

add attribute randomize node attribute class: primitives attribute name: zscale dimensions: 1 distibution -> min value: 0.4 0 0 0 add polyextrude node distance: 0.3 local control -> distance scale: zscale

workflow v2

(path trace a logo, generate geo from an image/logo) add labs regions from image node (and load the image) neighbor consolidation -> check add custom attribute attribute name: name visualization color -> attribute value: black (add file cache node) add blast node group: @name=black add attribute delete node check delete non selected to clear all

more 3d-geometry generating

with attribute from map

add a grid add attribute from map node texture map: $HFS/houdini/pic/Mandril.rat (right click in file browser -> show images) add attribute promote node (to move Cd attribute from points to primitives) original name: Cd original class: point new class: primitive add poly extrude node divide into: individual elements distance: 2 local control tab -> distance scale: Cd

create round dots of a photo

(same effect as above but with round tubes) add tube add grid add attribute from map node texture map: $HFS/houdini/pic/Mandril.rat (right click in file browser -> show images) add attribute wrangle node v@P.y=v@Cd; or to invert the colors: v@P.y=1-v@Cd; add copy to points

with attribute adjust color

add a grid add uv unwrap node add attribute adjust color node pattern type: color map add attribute promote node original name: Cd original class: point new class: primitive add poly extrude node divide into: individual elements distance: 3 local control tab -> distance scale: Cd

with attribute adjust float

add a grid add uv unwrap node add attribute adjust float node attribute name: height attribute class: primitive pattern type: color map channel: R add poly extrude node divide into: individual elements distance: 2 local control tab -> +distance scale: height

separate object from background/green screen

(needs a photo with object + black background) top view -> press D -> background -> select image add a grid and scale it to the dimensions of the image rows: lots of columns: lots of add attribute from map node texture map: select image image settings tab -> check invert U add attribute promote node original name: Cd original class: point new class: primitive add blast node group: @Cd.r<0.02 group type: primitives (or use points and without attribpromote)

create curves from image with trace node

add trace node image input: select a photo threshold: adjust this check add point texture (to add UVs!) filters tab -> check hole faces boundary color: black/white/custom add planar patch from curves node (to convert curves to polygons) check resample curves interior edge length: 0.008 (or use remesh node instead) add attribute from map node (to get texture) map source: select the photo

create dots version of a photo

(needs a black and white photo, square format) add circle uniform scale: 0.05 add grid rows: 100 columns: 100 add uv unwrap node add scatter node generate: in texture space density scale: 10000 relax iterations: 1000 add attribute adjust float node attribute name: pscale pattern type: color map color map: select the black and white photo channel: R add copy to points node feed circle and attribadjustfloat (add another grid with black color)



Published: August, 2024