Jump to content

Blueprints to 3D Mesh


Recommended Posts

Here is a concept for turning blueprints into simple 3d meshes. Its basically carving silhouettes into a volume.

blueprint_to_mesh.jpg.0df30d37ad6236de8510bbe541226f3b.jpg

 

After getting the aspect ratio for defining the volume´s dimensions ...

res_front = hou.imageResolution(img_front)
res_side  = hou.imageResolution(img_side)
res_top   = hou.imageResolution(img_top)

ratio_side  = res_side[1] / float(res_side[0])
ratio_top   = res_top[1]  / float(res_top[0])

geo.addAttrib(hou.attribType.Global, 'ratio_s', ratio_side, create_local_variable=False)
geo.addAttrib(hou.attribType.Global, 'ratio_t', ratio_top, create_local_variable=False)

 

... a wrangle is carving the silhouettes into the volume from all three sides:

vector bbox = relbbox(0, v@P);

float mask_front = vector(colormap(image_front, bbox.x, bbox.y)).x;
float mask_side  = vector(colormap(image_side, bbox.z, bbox.y)).x;
float mask_top   = vector(colormap(image_top, bbox.x, bbox.z)).x;

f@density = min(mask_front, mask_side, mask_top);

 

The rest is a matter of converting to polygons, smoothing and remeshing.

blueprint_to_geo.hiplc

blueprints.zip

Edited by konstantin magnus
  • Like 5
  • Thanks 1
  • Haha 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...