Jump to content
konstantin magnus

Blueprints to 3D Mesh

Recommended Posts

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



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.



Edited by konstantin magnus
  • Like 2
  • Haha 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now