Trace object outline in ortho view

   3716   7   3
User Avatar
Member
2 posts
Joined: March 2018
Offline
Hi,
does someone know a technique to trace the shilouette from a polygon object facing a specific ortho view?
The outlines are needed as a nurbs/poly curve in sop level.

I tried to flatten the object but ran into issues with fixing the overlapping primitives/ remeshing in an efficient and accurate way.

Thanks
Hendrik
User Avatar
Member
1743 posts
Joined: March 2012
Offline
It looks like it works to just do: Triangulate 2D, Group unshared edges (making sure to turn off the “Base Group” toggle), Dissolve the edge group with “Delete Non-Selected” for Operation and “Remove Inline Points” off.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
4 posts
Joined: Dec. 2020
Offline
Hi neil , thank you for your help but it doesn't work for me will add a hip file or explain more of your method , I really need this technic to work and searched hard for it with no luck
User Avatar
Member
686 posts
Joined: Sept. 2013
Offline
SideFX Labs has a node for this:
https://www.sidefx.com/docs/houdini/nodes/sop/labs--extract_silhouette-1.0.html [www.sidefx.com]
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
4729 posts
Joined: Feb. 2012
Offline
Hi,

Here is one way:



Transform into NDC (Point Wrangle):

string cam = chs("cam");

vector p = toNDC(cam, @P);
p.z = -1;
p = fromNDC ( cam, p );

v@outlineNormal = normalize ( p - @P );

v@pworld = @P;
@P = p;


Ray Intersection (Point Wrangle):

vector n = v@outlineNormal;

vector phit = 0;
vector uvhit = 0;
vector p = v@pworld + v@N * 0.001;
int pr = intersect ( 1, p, n*1000, phit, uvhit );

int result = pr != -1;
pr = intersect ( 1, p, -n*1000, phit, uvhit );
result |= pr != -1;
    
if ( result )
    removepoint ( 0, @ptnum );
        
@P = v@pworld;

Attachments:
vex_outline.hiplc (297.3 KB)

Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
686 posts
Joined: Sept. 2013
Offline
Here is another way:
https://procegen.konstantinmagnus.de/drawing-a-silhouette-around-a-mesh [procegen.konstantinmagnus.de]
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
4 posts
Joined: Dec. 2020
Offline
Thanks every body ,I don't want a silhouette around the object I want to extract a full elevations from my model .
Konstantine I am so glad I found you answer me here cause I thought that you will get my point as an architect ,that's why I've sent you an email about it with the hip file,sorry I don't know that you will respond here so fast.
What I want is something like what is in rhino program which giving 2d lines(curves) from 3d model
User Avatar
Member
686 posts
Joined: Sept. 2013
Offline
This would be a way to create curves for floor plans and elevations from 3d meshes:
https://procegen.konstantinmagnus.de/architecture-floor-plans-and-elevations [procegen.konstantinmagnus.de]
Edited by Konstantin Magnus - Jan. 1, 2023 13:06:23

Attachments:
plans_from_3D_title_bw.png (283.0 KB)

https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
  • Quick Links