Combining Models (Hex)

How to create models in XSI and other 3D applications and make them work in Battlefront 1 & 2. Post models, tips for application usage and share anything XSI, 3DMax, SketchUp, etc.

Moderator: Moderators

Post Reply
User avatar
trainmaster611
Sith Lord
Sith Lord
Posts: 1779
Joined: Thu Aug 24, 2006 5:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Building a railway to Coruscant
Contact:

Combining Models (Hex)

Post by trainmaster611 »

I made an R2 unit for the rep_fly_anakinfighter.msh to replace the old crappy one. The other R2 unit happens to be an individual object from the rest of the mesh.

I based all of the following actions off of rep's cloth tutorial (since its the same basic idea).

I found the selection for the r2_droid in the msh and deleted everything from the first byte after MODL to the last byte as indicated by the long integer and going relative down. I deleted the selection.

Then I opened up my good R2 unit (which was its own msh, and it was the only object in the mesh). I found the first byte after MODL and went down relative to the long integer.

I copied the selection and inserted it after the MODL in rep_fly_anakinfighter.msh where r2_droid used to be. When I tried to place the model in ZE (just to test it), it crashed. I haven't tested it as a vehicle yet because I figured that would be pointless. I had wazmol test my model and it crashed for him too.

I gave Challenger the R2 unit I made and he tried to do the same technique also. But in the end, he phailed also. His model, using rep's technique, crashed ZE just as mine did.

Just some notes, my good R2 unit, as an individual msh, shows up fine in ZE. Also, when I was removing r2_droid, there were some leftover bytes between the end of my selection and the beginning of the next MODL. I don't know if that's important.

Any assistance on this would be helpful. :cpu:
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Combining Models (Hex)

Post by AceMastermind »

According to the amount of time it took you to hex edit, test, crash, send it to someone else to test, crash, send it to someone else to test, crash, type up your reply and submit it, you could have done it properly the first time in XSI. :lol:
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Combining Models (Hex)

Post by FragMe! »

Trust me he has tried :yes: Putting the R2 unit is easy, the getting all the bones back in so the side fins work properly is the fun part. :faint:
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Combining Models (Hex)

Post by AceMastermind »

I was bored this evening, about 45 minutes spent for setup/clean up of Pandemic's Anakin Starfighter msh:
Hidden/Spoiler:
Image

The only parts of this model that Pandemic enveloped to the bones are the flaps on the main_hull, flaps on the sv_mainhull, and flaps on the main_hull_lowrez.

This model only has a takeoff animation which would be very easy to duplicate, you could even take it a bit further and add more to the animation by having the cockpit open and close which would require internal parts to be modeled and/or have R2d2 jump in before takeoff and jump out when landing. :P
User avatar
trainmaster611
Sith Lord
Sith Lord
Posts: 1779
Joined: Thu Aug 24, 2006 5:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Building a railway to Coruscant
Contact:

Re: Combining Models (Hex)

Post by trainmaster611 »

I actually managed to associate (for lack of a better term) two of the flaps with their respective bones, but after I couldn't successfully select the third and fourth flaps, I gave up. I have no idea how to do animation. I figured i could bypass all of the trouble by just hex editing (preserve primitves, animation, bones, etc).

As for rep's tut, I realized I missed the HEDR and MSH2 steps. The first instruction under HEDR has me stumped
1. At the way beginning is the HEDR header. After this is a 4-byte long int that tells how long the file is after HEDR and the 4-byte long int. Use the data inspector to read it.
I'm not sure exactly what he means by that. I know there's 4 bytes after HEDR before MSH2 starts. So that's what he means by "4 byte long int". But I don't understand how I'm supposed to read the whole integer with the data inspector since you can only read one at a time. And each byte gives me a radically different integer.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Combining Models (Hex)

Post by AceMastermind »

Well it's easy to see how this can be confusing to people who don't need to Hex Edit every other day, there should probably be some sample screenshots showing exactly what to click on, but it's not my tutorial so it's not my call.
trainmaster611 wrote:As for rep's tut, I realized I missed the HEDR and MSH2 steps. The first instruction under HEDR has me stumped
1. At the way beginning is the HEDR header. After this is a 4-byte long int that tells how long the file is after HEDR and the 4-byte long int. Use the data inspector to read it.
I'm not sure exactly what he means by that. I know there's 4 bytes after HEDR before MSH2 starts. So that's what he means by "4 byte long int". But I don't understand how I'm supposed to read the whole integer with the data inspector since you can only read one at a time. And each byte gives me a radically different integer.
I think this is the number you want(highlighted in the Data Inspector)
Note: This is just an example, not the actual msh you're working with
Image
User avatar
trainmaster611
Sith Lord
Sith Lord
Posts: 1779
Joined: Thu Aug 24, 2006 5:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Building a railway to Coruscant
Contact:

Re: Combining Models (Hex)

Post by trainmaster611 »

Ok, from there, I understood the rest of the instructions. I added the intergers and the address and all for HEDR and MSH2. I know I've done everything right, but when I place the object, it still crashes ZE. Just to double check, I placed my R2 unit in ZE again and it worked fine. So I know the problem is with the combining.

Like I said, challenger took a crack at it but he didn't say if he did the HEDR and MSH2 steps also (but I can presume that he did).

What else could I be doing wrong?

[edit]

I think I know what it might be. Rep's tut on the HEDR and MSH2 only explains how to increase the long integer since when you're adding a cloth, you're only adding bytes. But in this case, I had taken away a model chunk and added another one, so the long integer I entered did not account for the r2_droid I had taken out. How would I change the long integers of HEDR and MSH2 in respect to this?
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Combining Models (Hex)

Post by AceMastermind »

I think you'll need to know the size of the chunk you removed, then subtract that from the original size, then you must know the size of the new chunk that you are adding, then add that to the new size to keep everything in working order.
Tools>Encode would be where you adjust the sizes in the HEDR and MSH2.
User avatar
trainmaster611
Sith Lord
Sith Lord
Posts: 1779
Joined: Thu Aug 24, 2006 5:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Building a railway to Coruscant
Contact:

Re: Combining Models (Hex)

Post by trainmaster611 »

Yeah, rep said how to change the size in the tut.

How do I find the size of the r2_droid chunk? Look at the long integer in the first byte after MODL?
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Combining Models (Hex)

Post by AceMastermind »

trainmaster611 wrote:How do I find the size of the r2_droid chunk?
I would assume the same way you find the size of a cape MODL chunk.


EDIT
trainmaster611 wrote:I actually managed to associate (for lack of a better term) two of the flaps with their respective bones, but after I couldn't successfully select the third and fourth flaps, I gave up.
Demo vid:
User avatar
Challenger33
Lieutenant General
Lieutenant General
Posts: 726
Joined: Wed Aug 23, 2006 3:44 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: Building a legion of papercraft models.
Contact:

Re: Combining Models (Hex)

Post by Challenger33 »

Yes, I followed Rep's tutorial exactly. I'm 99% sure I followed it correctly; I've used it before successfully. I agree, you would have to account for the chunk you removed.
Post Reply