3DS Max 9 SMD Exporter NewsFri, February 23rd, 2007 @ 01:58
Quick update on the 3D Studio Max 9 exporter…
I’d planned to release another update this week but Xander pointed out a wierd bug which needed some investigation. After some rather complicated detective work it turns out that bone and helper objects that have been flipped with the mirror modifier get exported backwards if they dont have their transforms reset. The most obvious way to spot these is when importing an SMD because the bones appear inside-out.
Just a tip – it’s generally BAD to mirror something and not reset it’s transforms before export. It causes strange things to happen and not just in the SMD exporter. It’s also the reason why sometimes your meshes end up with their normals flipped. 3DXI auotmatically deals with mirrored mesh geometry but it doesn’t handle bones hence the bug Xander experienced.
That said, I don’t like fixing bugs like this because it makes my head hurt writing the following code:
// figure out of the parent node is mirrored. Point3 a = pNode->GetNodeParent()->GetObjectTM(0).ExtractMatrix3().GetRow(0).Normalize(); Point3 b = pNode->GetNodeParent()->GetObjectTM(0).ExtractMatrix3().GetRow(1).Normalize(); Point3 c = pNode->GetNodeParent()->GetObjectTM(0).ExtractMatrix3().GetRow(2).Normalize(); Point3 d = CrossProd( a, b ).Normalize(); pExportNode->parentMirrored = DotProd( d, c ) < 0 ? true : false;
I also discovered a bug with Mult/Sub-Object materials where it’s crashing trying to retrieve invalide sub-materials and borks when has a material ID assigned but there is no matching ID in the actual material itself. This has been fixed.
Still some small fixes/enhancements to test and hopefully a updated download by the weekend.
Comments are closed.
The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.