View Full Version : Help! - Xform question for Game Model
Hello, here's a little riddle that maybe you all can help me with:
I have reset the Xforms on a number of parts of a model that I am in the process of trying to get in-game, and as a result, a bunch of the mesh pieces have moved, rotated, rescaled, etc. My job now is to put them all back where they were before.
On the attached screenshot, you'll see an example. I have two torsos; the one on the left is the one I need to rotate, rescale and reposition in order to look like the other one. Both have the exact same number of verticies, faces, etc.
Is there a way (other than manually eyeballing it) to tell the mesh on the left to "transform" itself to be in the exact position as the other? I have a skin modifier applied to all these mesh pieces that I would also like to preserve.
I'm praying there is a modifier or plug-in as I have a ton of these things to reposition, but anyway, any help would be so appreciated.
-clu
|
|
Dave Black
01-14-2003, 05:23 PM
This is, in theory, a simple thing.
Look for the icon(usually at the top of your interface, main toolbar) that looks like two boxes sliding down an angled line.
It's called the "Align" tool. Simply select the object you want to align, then click the align tool, then click the object you want it to be aligned to. A dialog box will appear, and just click the top row of buttons to the on postion(Match X,Y,Z). This will match the objects pivot points.
Works like a charm.
Now, if you messed up the hierarchical pivot point with the reset xform mod, you're a bit screwed. Thos you will have to move back yourself.
Hope that helps.
-3DZ
:D
Great I'll give it a try. What about scale? Is there any way to rescale it to exactly the same size?
Something like "align and transform all faces here to fit on all faces there".
Thanks.
-clu
Dave Black
01-14-2003, 05:35 PM
Let me see if I understand the second question. Do you mean like this?:
You have an arm.
You have a torso.
The arm is 3X bigger than it should be.
You want to take a polygon, say at the base of the arm, and use that polygon in conjunction with a polygon on the torso, say where the arm would fit, to scale the arm to the torso?
-3DZ
:D
That's one possibility that might work too.
But actually what I meant was I have two identical torsos like in the screenshot above.
- One of them is positioned correctly (in the screenshot, the smaller one on the right)
- And one of them is positioned incorrectly and rotated and scaled an unknown amount (in the screenshot, the big torso on the left)
- I want to take the big ugly one on the left and scale/rotate and otherwise transform it so that it aligns perfectly, vertex by vertex, with the original one on the right. Then I'll just select and delete the old, un-xformed torso.
Rotation is actually unimportant. The Xform seemed to do exact increments of 90 degrees. So with the screenshot above I rotated the big torso manually then tried the align tool. It positioned it in the right spot (I think), but the "match scale" option in the align dialog doesn't do the right thing.
- clu
I've got another idea. If I select "properties" of the original torso and look at the dimensions, is there a way to manually type in dimensions for the messed up torso?
Sorry to beat this one to death.
-clu
Dave Black
01-14-2003, 10:15 PM
There sure is.
Right click on the scale icon. It will bring up the Transform Type-In floater.
You ain't beating anything to death, man. You've got a problem. We're going to solve it.
:thumbsup:
-3DZ
:D
Very, very cool of you, thanks. This thing is driving me nuts just because it seems like something pretty routine (it's always the simple stuff that bites you in the a**).
OK, maybe I'm overlooking something, but the scale type in doesn't quite work for true dimensions. Here's what I mean:
- I right click on the proper "reference" torso (00_torso) and look at properties
- Under "dimensions", it has the following values:
X: 21.352
Y: 13.553
Z: 8.27
- However, these numbers aren't the same as the scale type in (or for transform either, for whatever that's worth)
- Basically, my wish is that when you right click on "properties" of an object, the "dimensions" section would be editable (instead of greyed out. Then I would hope the align tool would take care of the rest.
Anyway, it's all good fun, right? Thanks again. By the way, I posted my file just for reference since we've been chatting about it. I've hidden everything except "00_torso" (the reference of how it's *supposed* to look) and "torso" (the one that got all messy from Xform):
http://www.jakekeating.com/pub/tharex_for_Zealot.max
-clu
Dave Black
01-15-2003, 05:20 AM
This certainly bites butt.
I'll take alook at the file and see if anything dawns on me.
Thanks!
-3DZ
:D
Dave Black
01-15-2003, 06:13 AM
Ok, first things first. I gotta know...why did you reset the object's Xforms?
Ok, been playing with it for awhile now. I certainly now fully see your problem.
I did a few things. First, the good news. I got the big torso to match the rotation, scale, and position of the small one.
However, I cheated. But I did figure out something for you to try tomorrow. I realized half the problem is that the pivots, though at the same XYZ, are not equidistant to the models(due to the scale) which is why it's impossibe to even 'eyeball' the damn thing.
So what I did was used 2 tape dummys to measure and lock in the position and angles of each object's pivot points to a common vertex on the mesh(Using Snaps). Then, I copied the length from one dummy to the other(from the small torso, to the large).
Now I had 2 lengths on each object that were equal. I then went into the pivot adjustment mode in the hierarchy panel. I click affect object only, and snaped the points together....One on the that common vertex, and one on the small object's tape pivot.
I know, I know...
Ok, so that made the pivot points of the objects equidistant to both meshs. Now, when I scaled the objects, the fit perfectly within each other...
It's really late(early actually), so I gotta hit the hay, else I'd keep going. I know I've almost got it.
I whiped out the 'ol calculator, and started dividing the differences in scale in the xyz of both the meshes. It's not too hard to figure out where I'm going with that.
Ok, so my fix is insane. You have too many objects to do this to...sort of...But it worked...which, if you are under any sort of brain melting deadline, is a step in the right direction.
Hope some of this is making sense...again, it's late. I'll bring the file to work with me tomorrow and play with it on my lunch break.
...It looks like a max r5 file...I hope it is...I don't wanna do that again. ;)
Oh, and one more thing...That model is rock'n! Good work!
Take care, man! Best of luck!
-3DZ
:D
Wow. Hey you really went above and beyond the call of duty (but I'm not complaining!). I really can't thank you enough. But thanks!!!
There's a lot of good material in your last post so I am going to spend a good chunk of time tomorrow sinking my teeth in. It's late (and I'm new to Max) so some of it will make more sense once I get into it. It's just a big mess in that file, right?
Anyway, to answer your question, the reason I had to reset all the Xforms is because it's a game character that needs to be exported to XSI format (among other things). Although it looks great in Max, when I open the XSI file, there's all kinds of movement, inverted normals, missing heads, etc. Applying the Xform allows me to fix all that stuff.
Anyway, definitely more to follow. Thank you again for your help (and patience!).
-clu
Dave Black
01-15-2003, 06:32 PM
You know, re-reading my previous post, I noticed that I made absolutely no sense. Well...almost no sense.
How are you doing with it? Any headway?
I was thinking that this has been a problem before. Alot of games take XSI format characters. The Mod cummunities usually use 3dsmax, so they needed an XSI import/export utility. If they are exporting to games using this function, you'd think they had to reset their xforms as well.
Which brings me to believe that there is a script or plugin somewhere out there that fixes this....
Still looking.
Hope you're having some luck today.
BTW, had a look at your website. Very cool. Looks like you know way too much to be healthy. And, you did a stint in Maryland...which is where I'm at...small world.
Later!
-3DZ
:D
Yeah my parents moved down to MD a few years ago. I did some web work for a tech company down there one summer. It's pretty great part of the world. Always sunny and hot. Where exactly are you at?
Your post does actually make sense, even to someone that didn't know dummys and tape (F1 is a beautiful thing). But here a few parts of it I am currently unclear on:
Ok, I copied the length from one to the other (didn't use dummys...just snapped the tape from the pivot to a random vertex then did the same on the other part...is this OK?). Copied the length from the reference to the screwed up one.
you wrote
-------------------
Now I had 2 lengths on each object that were equal. I then went into the pivot adjustment mode in the hierarchy panel. I click affect object only, and snaped the points together....One on the that common vertex, and one on the small object's tape pivot.
------------------
1) "and snapped the points together" --> this is where I got stuck. Not quite sure what you mean
2) The next part, you said when you then scaled the objects, they fit perfectly...you mean with the align tool or manual type-ins? When I right click on scale, both objects just say 100.
Other than that I see where you're going with it. Yeah I agree there MUST be a plug-in somewhere. I can't imagine other people don't run into this too. Especially games people.
Thanks again man for all the help. I'll keep you posted.
-clu
Stroker
01-15-2003, 07:34 PM
How about using Morph and targeting the properly scaled mesh? As long as the vert count/numbers are the same, seems like it would work to me. Then maybe reset the pivot or whatever.
Or am I missing something that would discount Morph?
edit:
I added Morpher to the stack.
Morphed it to the proper one.
Moved Morpher underneath Skin.
"Collapse to" on Morpher in the stack.
Seemed to work just fine for me.
edit2:
Whoa. Total weirdness.
I just tried doing it again and it went funky.
edit3:
Got it!
It doesn't work fine, at least for me, until I move Morpher under Skin. While Morpher is above Skin, it goes funky. Once it's under Skin, works just fine. Then "Collapse to". Morpher gone and Skin is intact... I think.
edit4:
Yeap. Skin remains intact.
Man, I got busy with other things.
Thanks for the chance to play.
Dave Black
01-15-2003, 07:54 PM
Damnit, stroker, that's f***ing brillant!!!!!!!!!!
Dude, give that a try!!!!!!
To answer your question:
It's entirely possible that you understand the following state ment, and that I am beating a dead horse, but just to be sure:
Ok, 3Dstudio has these things called snaps. It's the little icon(usually) in the top main toolbar that looks like a magnet with a number hovering over it, either a 2.5, a 2, or a 3. Hell, you are using the angle snap function(I think in 5degree increments) in your scene.
Snaps allow you to pick certain entities, like vertexs, endpoints, midpoints, pivot points, etc. This way you take 2 objects and snap them together from a known point.
Ok, so what I was doing was just that. I was taking points that were known and snapping them together so that there was a common relationship between them.
Hope that helps a bit...
Try morphing the vertexs...that's areally good idea...He's thinking outside the box...bigtime...thanks stroker!
Oh, and I'm up in Hunt Valley Maryland in the big "Games District". What fun. :D
-3DZ
:D
Dave Black
01-15-2003, 07:57 PM
What about the morph compound object? That could work even better, and it won't mess with your skin mod.
I think that's the problem...He can't have the morpher mod in the stack...
Hmmmm....maybe morpher would'nt work...
-3DZ
:D
EDIT: What am I saying?!! Morph compund WOULD mess with skin...duh!
Sweeeeeeeeeeeet! I looked at Morpher earlier but I had never used it before so I chickened out. Curse of the newbie. Thanks a million, Stroker.
I don't know Zealot, I *think* it's working. I tried morpher on the head and it worked like a charm as long as it was below skin. I "collapsed to" and all seemed cool.
Not to be premature, but you guys definitely saved my a** here and I truley appreciate the time spent solving a problem you could have just as easily ignored (believe me...even I wanted to ignore it).
Also Zealot, you the man. Thanks for sticking with it and getting my head around Max. It's just the program I love to have.
OK, I'll shut up before I start thanking the Academy and my agent. I'm going to dive in and mess around a bit with all this advice and post back my results.
-clu
Dave Black
01-15-2003, 09:23 PM
Sounds like you're on the right path. So glad to be of help...though it was stroker how really saved the day. It's funny, I know that if it had'nt been so late last night I know I would have thought of that...Brains are such wierd things...
Anyway...
Stroker, here's to you!
:beer:
And Mr. clu...Here's to you as well!
:beer:
Hell...here's to me...I need a beer after this one :D
:beer:
clu, please do me a favor and post this guy in the game development section...I think you'd get a kick out of some feedback on him...he's quite cool.
Oh yeah, and if you have any requests, please add them to my "I'm making video tutorials" thread. Need as many ideas as I can get.
-3DZ
:D
Stroker
01-15-2003, 09:37 PM
If you are gonna go the long way and use line-factoring, then Utilities > Measure comes in handy.
Glad it didn't come to that.
http://w3.chrlmi.cablespeed.com/~halmich/ozone/cookiemonster.gif
Yeah, beers all around! Cheers to you Zealot. So morpher seems to fit the bill. Thanks a million, Stroker. It always helps to have another set of eyes look at the problem. I tend to get so close to the problem that I lose perspective.
3DZealot, did you mean post the gladiator model? I'll definitely check out that game forum as well as your thread.
See you gents around for certain. I'll be lurking around this forum for the forseeable future. (Who am I kidding, you'll probably see me starting another thread before the day's up...my gladiator's head is still missing-in-action when I export to XSI. Good times).
Now I'm off to get this f***ing mesh fixed, exported and in-game! Thanks again! You guys rock.
-clu
CGTalk Moderation
01-14-2006, 04:02 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.