Jump to content

How to cap and triangulate 3d "holes"


Recommended Posts

Hey all, Houdini novice and Maya expert here. I've searched google and beat my head against this for days, and am finally breaking down to ask for help.  

I've been getting a lot of game-rez geometry that has deleted geometry to save backfaces for realtime, but I need to make all objects solid so that I can voronoi shatter them. I need to fill in the open back areas with some sort of sensible, nonmanifold polygon geometry for later destruction.

There's hundreds of meshes like this in the scene, and modelers tend to move things around necessitating reloading and re-repairing geometry, so fixing this stuff manually is a non-starter. Requesting clean/solid geometry is on the docket, but these changes cant take days/weeks for scheduling, and I need to make progress without artists massaging these assets for me. 

Red geo is what I'm given, the underside is what the player sees.

Greeen geo is a divide+remove shared edges+divide to triangulate it. As you can see the ends are trash.

Blue geo is what I need. I've manually split the good corners and then run a divide to triangulate again. 


I know I can poly>vdb>poly these meshes, multiplying the polycount by many times, and breaking UVs/material assignments by polyReducing. This is far from ideal as making attractive voronoi shatters will increase geo by many times again.   

I could fix this in maya in seconds by filling the hole (backside gap), triangulating, then quadrangulating the cap. Unfortunately the source art is a clipped down export of an entire level from Unreal. This reduced file is over 1gb and cant be opened by maya. I was only just barely able to open the file in Houdini and clip the detail down to just the area I needed to work with. 

I'm at a loss and burning time beating my head against simple problems with easy fixes in maya that dont seem to have analogues in Houdini. I've learned a ton from my failings in Houdini, but these types of issues stop my progress completely. 

Any help would be most appreciated. 

Thank you,

    Chris L


Link to comment
Share on other sites

here's an improved version in case you want to retain as much orig geo as possible:

- get the newly created back faces

- add them to the orig geo (ie. retain orig geo)

of course I can't guarantee it works in 100% cases as I don't have all cases for exhaustive tests....only you can do that.


(just realised in step get_backfaces, you can change that to Union and ignore the next step add to orig)

Edited by Noobini
  • Thanks 1
Link to comment
Share on other sites

Thank you for taking a crack at this Noobini, I guess I didnt explain the issue properly. 

The example file is just dumbed down to show what I'm trying to do without leaking game assets onto the forum. These are similar shapes to what I'm dealing with, but are lacking the complexity. 

my geo is often not built on axis (I dont think matchsize or flattening via transform will work). I'm exporting an entire map from unreal, and the level designers move things all over. In order to work on a chunk of the massive FBX with hundreds of nodes I've had to use mergeObject sop to cut the file down to just what I need. I no longer have transform information for these meshes. 

There's a ton of detail in the geometry not represented in the example file.  The parts are also of vastly different thickness, I've used it on a few assets but eventually the insides of part of the mesh start pushing through before the rest of the mesh is thick enough.  

So, to hone my question a bit better. Is there a way to fill nonplanar holes, and automatically add edges to that cap where an edgecusp/normal sop would sharpen normals?

Edited by baalrog
Link to comment
Share on other sites

well can you upload some different geos to illustrate different cases ? otherwise I can't sit here and cater for all cases imaginable, and you wonder why I get peeved at ppl who hide their files but want perfect solutions in return. No, not having a go at you at all, you uploaded your file, unlike a lot of other ppl.

  • Thanks 1
Link to comment
Share on other sites

That's totally reasonable, and I understand why it's frustrating to help people who are withholding assets for various reasons . Thank your for your time. 

I've stripped down and attached the geo I'm currently working on. As you can see all of the pieces of geo have different thicknesses and profiles, and all of them are open in the back. I'd like the ability to run meshes like this through some set of nodes, and have them each made watertight in turn. I'm fine if theres a seam down the middle like your polyextrude example, slightly increased polycount is a necessary evil. 

The floor slabs on the side may not have enough information to do this, since none of their faces actually aim towards eachother, but I believe the rest of the geometry can be processed...somehow. The endgoal of this would be to make an HDA to process meshes that have been hollowed out by artists trying to save polies here and there. 




Link to comment
Share on other sites

Hey eikonoklastes, the engine doesnt render the polys, but we're still paying for vertices to do the visibility calculations against, and the verts multiply if they have split normals, or UVs, so it can add up. I will be sending assets back that need backfaces from now on, but I'm in the middile of this task and getting a model change at this point will cost me far more time than fixing it manually in Houdini. 

Thats way better than I was able to do, Thank you Noobini. I'll see if I can control the consistency or maybe add a twist attribute to these meshes so the edge pairings can be controlled a little bit. 

Thanks for the guidance!

Link to comment
Share on other sites

On 2nd look, the polybridge seems to be making doubled geometry...I assume this is due to the same edge loop being bridged against itself. I haven't had much luck with polydoctor getting rid of every set of duplicate polys, but maybe I can derive some information from the edges that this setup makes. 

Link to comment
Share on other sites

2 hours ago, baalrog said:

On 2nd look, the polybridge seems to be making doubled geometry...I assume this is due to the same edge loop being bridged against itself. I haven't had much luck with polydoctor getting rid of every set of duplicate polys, but maybe I can derive some information from the edges that this setup makes. 

yeah some it just works, while some you have to adjust the Pairing Shift to -2, I'm yet to find a proper way, I've never like Houdini poly bridge anyway, too finicky.

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.

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...