PDA

View Full Version : Poly. Mesh > Merge - How to preserve mix of hard and soft edges?


KevinKraeer
05-15-2011, 11:38 PM
Hi everyone. I'm a maya guy switching to XSI (Mod Tool) to do some work on a Half-Life 2 mod. For viewmodel weapons, I do my modeling and texturing in Maya, then use Crosswalk to port stuff over to XSI (dotXSI format).

In Maya I delete history, and freeze transforms; then I have a clean mesh for any piece that moves - clip, trigger, slide, and main gunbody, for example. Right now I'm working on a rifle, which I can export and bring into XSI without any trouble. Textures and stuff look great, and the modeling work - which includes a combination of hard and soft edges - is preserved perfectly.

For viewmodel guns to work in HL2, the gun and the arms need to be one mesh. I've worked out all the particulars of skinning, parenting to the hand, getting it into the game, etc. My problem is that when I'm in XSI and I use Poly Mesh > Merge to combine the gun pieces, the nice mix of hard/soft edges on my gun is lost. Instead, the gun seems to be all "Soft" edges. I found a couple of things around here and elsewhere about setting the "Tolerance" to 0 during the merge, or using "Freeze M"(?), but I don't think I'm using either solution correctly.

If you have an idea what I could be doing wrong I would greatly appreciate your advice! Thanks in advance for your help.

P.S. - I am totally cool with re-softening/hardening edges on an edge-by-edge basis if that's what it takes, just not sure which tool to use.

ThE_JacO
05-16-2011, 12:13 AM
How are those hard edges obtained?
If they are made "hard" by breaking connectivity, then merge will merge that, and that's why discontinuities are lost. Set the threshold to 0 so that no points are merged, and you'll be fine.

If they use pointperpoly clusters for the normals (sample clusters in xsi), then make sure those are coming across.

KevinKraeer
05-16-2011, 12:33 AM
I don't think they're created by breaking connectivity; I'm using Maya's "Normals > Soften Edge" and "Harden Edge", where I can select an edge or face and change how hard/soft it looks. In Maya I can also change normal angles on an edge by edge basis. Not sure - would those be pointperpoly clusters?

ThE_JacO
05-18-2011, 02:43 AM
Normals are an attribute of the pointperpoly (samples in xsi).

When merged (softened) they are aligned for all points per poly to the average normal of that point they share, when hardened they are split to the normal of the facet (triangle) of that pointperpoly.

Make sure custom normals are exported from maya to XSI and you'll be fine.
As of 2011 (or was it 2010?) you do have control over those normals in XSI too, before you used to have to jump through hoops or write some tools which are now in the default install (normal editing).

KevinKraeer
05-18-2011, 06:14 AM
Ah, I gotcha. I'll double check my export/import process. As for XSI, I'm using the free Mod Tool, and it's an older version (6), the only version I could get to work with the Valve plug-ins. I think that's part of the problem, could be some features just don't exist in the version I'm using. They made up to I think, a version "7.5", but the plug-in simply wouldn't run there. I'll check out compatibility issues as well.

ThE_JacO
05-18-2011, 07:13 AM
Support for sample clusters hosting custom normals has been around for a long time, long before 6 (it was in fact a non-issue tricking new users into thinking of a bug when running the old obj importer for a long while).

That said, I'm not quite sure what was culled or not, features and I/O wise, in the old mod tool and in the related supported FBX versions, so you're kind of on your own here as far as my help is concerned, sorry :)

You could consider downloading a more recent version and using it in trial mode to double check your exports against a more fully featured version though, might help you to know if your issue is at export time or at import time.

KevinKraeer
05-19-2011, 02:53 AM
Good call, thanks, I will do that. I'm far from out of options, now I just have to do the work to figure this out. Thanks for all your advice!

CGTalk Moderation
05-19-2011, 02:53 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.