Houdini Digital Asset is outputting bad geometry that Maya cannot handle

   8747   11   6
User Avatar
Member
27 posts
Joined: Sept. 2017
Offline
Hello forum,

After exporting my hda to Maya I'm getting errors with the generated mesh (this also happens when the mesh is exported from Houdini as FBX).

The error from the Houdini Engine in Mays is like this:

// Warning: Attempted to create 42 polygons, but only 40 polygons were created. // 
// Warning: Attempted to create 244 face-vertices, but only 160 face-vertices were created. //
// Warning: This likely means that the Houdini Digital Asset is outputting bad geometry that Maya cannot handle. As a result, other attributes (such as UVs and color sets) cannot be transferred. //

The error from the FBX import is a bit more helpful:

The plug-in has detected mesh nodes containing polygons with overlapping vertices.

My Houdini asset is very simple, it consists of points, extruded surface and some polybevels.

Any pointers to a fix that produces clean geometry are highly appreciated.

Thanks
Paul
User Avatar
Member
1743 posts
Joined: March 2012
Offline
Maya, unfortunately, doesn't support polygons with “bridges” to holes, (e.g. attached image). They handle holes as completely separate entities. They also don't support any other sort of polygon with the same point occurring two or more times.

If you can get away with triangulating the geometry (e.g. Divide SOP), that should solve the issue in most cases. For the rest of the cases, after triangulating you'll also need a SOP that removes triangles with the same point two or more times. I can't seem to find where that is at the moment, but the following should work in a Primitive Wrangle:

int pt0 = vertexpoint(0, vertexindex(0, @primnum, 0));
int pt1 = vertexpoint(0, vertexindex(0, @primnum, 1));
int pt2 = vertexpoint(0, vertexindex(0, @primnum, 2));
if (pt0 == pt1 || pt1 == pt2 || pt2 == pt0) {
removeprim(0, @primnum, 1);
}

Attachments:
BridgeToHole.png (49.0 KB)

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
27 posts
Joined: Sept. 2017
Offline
Thanks for the quick reply.

The divide SOP has already been used and the resulting geometry is a real mess (there are overlapping triangles that show up in renders and impossible to UV map, etc…).

I've slapped the code above onto a Wrangle SOP but it didn't seem to make much difference.

ndickson
you'll also need a SOP that removes triangles with the same point two or more times. I can't seem to find where that is at the moment

Do you mean there's a SOP node that I can use to help with this process?

Thanks
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
I made an asset that attempts to identify/clean these unsupported polygons. Maybe give it a try and see if it helps.

Attachments:
maya_unsupported_prims.hda (7.0 KB)

Andrew / アンドリュー
User Avatar
Member
27 posts
Joined: Sept. 2017
Offline
Thanks for taking the time. Much appreciated.

However I am nowhere near Houdini right now. Will try your asset as soon as I can and will update my answer.

Thanks again.
User Avatar
Member
11 posts
Joined: Nov. 2017
Offline
awong
I made an asset that attempts to identify/clean these unsupported polygons. Maybe give it a try and see if it helps.

This worked great for me, thanks Andrew!

Edit: I've run into an issue where this HDA barks at me for not being a complete definition when placing it at the end of my stack for an HDA I'm making. Any suggestions?

Edit 2:For those that have the same issue as I: I didn't install the asset into the asset I was developing. I installed it into the hip file only.
Edited by tmishler - March 2, 2018 11:49:58
User Avatar
Member
18 posts
Joined: March 2015
Offline
Andrew this tool you made fixes lots of problems encountered when authoring HDAs for use in Houdini Engine for Maya. You should look at a way to incorporate it into the tool somehow or make sure it gets distributed with Houdini Engine itself.
User Avatar
Member
146 posts
Joined: Oct. 2017
Offline
I'll add an RFE to either include the tool or add the cleanup functionality to the plugin's geometry output. Andrew's tool I believe splits 2-edge loops (i.e. where consecutive points are shared by the same edges, and then removes degenerate prims) Any other issues with bad topology/degenerate geometry that should be in there as well?

(normals, uvs and colors are probably a topic for another thread).
User Avatar
Member
11 posts
Joined: Nov. 2017
Offline
This tool helps and catches a lot of issues, but in some cases it still doesn't catch all the issues. (usually when making hipoly models in an HDA for maya) Ends up causing geo to be created without attributes, most notably no UVs or Cd. I put in an RFE regarding this.
User Avatar
Member
146 posts
Joined: Oct. 2017
Offline
I haven't had that RFE land on my plate yet - but what kind of bad geometry is getting though (besides the missing UV's or colorsets that is). Is it missing some of cases it was created to catch (edges sharing both endpoints) or some other kind of bad geo.

Also, could this be a case of the maya_unsupported_prims asset not being loaded in the maya session? If it's sometimes not finding the asset depending on your enviroment and the locations of your other assets?
Edited by juliap - April 5, 2018 15:19:43
User Avatar
Member
1 posts
Joined: April 2018
Offline
awong
I made an asset that attempts to identify/clean these unsupported polygons. Maybe give it a try and see if it helps.

This guy is my newest hero. Your asset works like a charm, you saved my deadline!!
User Avatar
Member
3 posts
Joined: Nov. 2013
Offline
awong
I made an asset that attempts to identify/clean these unsupported polygons. Maybe give it a try and see if it helps.

Just wanted to chime in as well and say this saved a bunch of shattered geo from coming in all broken from Houdini Engine. Great stuff, UVs were imported perfectly. Thanks!
  • Quick Links