2024-12-03, 18:14 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
Pages: [1]
  Print  
Author Topic: A Modeling tip from the bird (This could save some real headaches)  (Read 32936 times)
0 Members and 1 Guest are viewing this topic.
Phoenix
Bird of Fire
 

Team Member
Elite (7.5k+)
*********
Posts: 8814

WWW
« on: 2003-02-18, 05:35 »

I figured I would post this here since this has been a huge problem for modeling MD3's in MAX that is very hard to find an answer for if you don't know it already.  In 3D Studio MAX if you issue a mirror command, here's what happens.

1)  The object mirrors correctly in Max, no problems apparent.
2)  You export the model as an MD3.
3)  You load the model into Npherno's MD3 compiler to rebuild and skinlink it and...
4)  WTF?  Part of the model is inside-out???

This is what you end up getting.  Note the inverted magazine and magazine port.

EDIT:  PICTURE IS NO LONGER HOSTED.



This seems to happen any time you mirror a part, and only to the parts mirrored.  They appear fine in Max, but when exported bork.  Well, you HAVE to be able to mirror parts in the model generation process, so how do you fix that?  And moreso, how do you PREVENT it?  Here's the solution.  I found the fix for the normals flipping after digging around on Polycount's forums archive.  Some thanks go to JANUS for the clue.

Here's what you do, in this order, when you mirror a part in Max.  This only applies for a single-axis mirror (X, Y, or Z) Not a 2-axis mirror.  Those can be done with a rotate command anyway. Slipgate - Tongue

Select the object you want to mirror.  Mirror the object.
On the UTILITIES tab, click Reset XForm.  Then click "Reset Selected".
The normals will "flip" on the mirrored object on screen, turning it inside-out.
Go to the Modifiers pull-down menu, Mesh-editing, then Normal Modifier.
Click "Flip Normals".
Next, do a "convert to editable mesh" to kill off the modifier stack with all the X-forms in it if you like.
Voila.  Fixed.  Exports like a dream, as shown below.  Thumbs up!



« Last Edit: 2017-03-13, 05:04 by Phoenix » Logged


I fly into the night, on wings of fire burning bright...
Daedalus
 

CyberDemon
******
Posts: 192

« Reply #1 on: 2003-02-18, 11:27 »

Invaluable  Thumbs up!

Thx pho
Logged
Tabun
Pixel Procrastinator
 

Team Member
Elite (3k+)
******
Posts: 3330

WWW
« Reply #2 on: 2003-02-20, 20:05 »

oh wait, it's right here, I've been reading all over the place, and missing this pinned topic :]] good show!

Update: for animated models this is not such a good fix. To export part of a model to md3, the stack needs to be collapsed - when one collapses the stack after the fix mentioned above, all keyframe info is lost... I must say this surprises me quite a bit. It also scares the shit out of me ;]

I inverted the normals for said object, and exported it. It looks fine in npherno's glviewer, so i trust it's ok. (suprises me tho, seeing how flipping the normals normally doesn't fix this?)
« Last Edit: 2003-02-20, 22:21 by Tabun » Logged

Tabun ?Morituri Nolumus Mori?
Phoenix
Bird of Fire
 

Team Member
Elite (7.5k+)
*********
Posts: 8814

WWW
« Reply #3 on: 2003-02-22, 09:54 »

Well, from my standpoint I think it's better to correct any potential normals problems before trying to animate a mesh.  That way you KNOW the normals are correct before working keyframes into the question.  It's a good thing to know that collapsing the stack kills that off on a pre-existing animation however! :o

As for why flipping normals doesn't fix it, well... it DOES fix it, but it visibly flips the normals inside Max.  That leaves you with the choice of either having the model look right in max and export incorrectly which is very bad for our purposes, or have the model look inverted in max and export correctly, which isn't much of an improvement.  I've never had trouble with normals or mirror functions in Q2m, and I've never heard of other programs having this problem, so I would write this off to being a "max quirk". Fainting
Logged


I fly into the night, on wings of fire burning bright...
Tabun
Pixel Procrastinator
 

Team Member
Elite (3k+)
******
Posts: 3330

WWW
« Reply #4 on: 2003-02-22, 15:18 »

Agreed (and i'm sure it has somewhat to do with quirky exporting too Slipgate - Wink).

The problem I'm facing now has to do with the fact the model was animated, before both the cause and the solution to the problem were known to me. I've described it in detail on the internal board, so if you'd be so kind to let your light shine on it (bird-flames always help at that) I'd be very happy ;]
« Last Edit: 2003-02-22, 15:19 by Tabun » Logged

Tabun ?Morituri Nolumus Mori?
Phoenix
Bird of Fire
 

Team Member
Elite (7.5k+)
*********
Posts: 8814

WWW
« Reply #5 on: 2003-07-31, 18:42 »

I had to make a small fix to one of the ammo boxes so far which involved copying and mirroring a part.  The work involved in finding my little fix just paid for itself! Slipgate - Tongue
Logged


I fly into the night, on wings of fire burning bright...
Phoenix
Bird of Fire
 

Team Member
Elite (7.5k+)
*********
Posts: 8814

WWW
« Reply #6 on: 2007-10-31, 00:22 »

Another tip, and a rather important one.

WELD YOUR VERTEXES!!

There's a good reason to make sure you weld your vertexes.  If you do not, and you have a model with a bunch of disjointed surfaces or unjoined edges, Q3 won't calculate the model bounds properly.  If Q3 gets confused about the model bounds, it assumes the model doesn't have any bounds.  This means if the origin point of the model goes out of view, the model will disappear off the screen.  I found this out while doing some work with our old grappling hook clamp model.  Apparently whoever did the model did not understand the concept of vertex welding and so I had this problem.  It has thus been corrected.

There are other reasons to weld.  Welding the vertexes brought the model from 145 to 73 vertexes, and it eliminates "bleed through" where seams can expose culled backfaces, and thus, the world behind the model.  It also improves how the model lights in the world.

To weld vertexes in Max, it's pretty simple.  Select your object.  Select the vertex subobject.  Select all vertexes.  In the rollout menu, find the Weld box.  Click "selected".  Poof!  All vertexes weld to any nearby vertex within the target radius.  You just want to make sure your target radius is not so large that it grabs a vertex you don't intend to weld, nor so small that it doesn't grab a vertexes that should be welded to its neighbor.  Be sure to inspect your mesh afterward to make sure all the faces are correct and nothing went wrong during the weld.
Logged


I fly into the night, on wings of fire burning bright...
StevieBoss1
 
Unnamed Player

Posts: 1

WWW
« Reply #7 on: 2017-03-10, 09:51 »

Hey I have to agree with pheonix that
Quote
Well, from my standpoint I think it's better to correct any potential normals problems before trying to animate a mesh.  That way you KNOW the normals are correct before working keyframes into the question.  It's a good thing to know that collapsing the stack kills that off on a pre-existing animation however! :o

As for why flipping normals doesn't fix it, well... it DOES fix it, but it visibly flips the normals inside Max.  That leaves you with the choice of either having the model look right in max and export incorrectly which is very bad for our purposes, or have the model look inverted in max and export correctly, which isn't much of an improvement.  I've never had trouble with normals or mirror functions in Q2m, and I've never heard of other programs having this problem, so I would write this off to being a "max quirk".

If you need a help I can help you. Just send me a private message so we can have a talk. take care
Logged

Danny Somerville
Phoenix
Bird of Fire
 

Team Member
Elite (7.5k+)
*********
Posts: 8814

WWW
« Reply #8 on: 2017-03-11, 04:17 »

Hello there, and welcome to the Wirehead message board, StevieBoss1!  I've sent a private message your way.
Logged


I fly into the night, on wings of fire burning bright...
Pages: [1]
  Print  
 
Jump to: