The 3rd Age

BFME+

BFME+

A mod that intends to bring back the fun to BFME1

Button for The 3rd AgeButton for The Dwarf HoldsButton for The Elven AllianceButton for Helm's Deep Last HopeButton for GothmogtheOrcButton for BFME+Button for The Four AgesButton for HDR HeadquartersButton for Middle Earth CenterButton for Project Perfect Mod

Become an affiliate!

   

Quick Lists

Top Rated Popular New Updated Last Comments Users

Register and log in to move these advertisements down

Retain textures when importing for BFME2 models

Tutorial for Battle for Middle-earth II BFME 2, Battle for Middle-earth II: Rise of the Witch-king ROTWK

Avatar of robnkarla

robnkarla

Category: Other
Level: Expert
Created: Thursday August 23, 2007 - 13:40
Updated: Tuesday March 31, 2009 - 11:08
Views: 6831
Summary: How to keep the texture mapping for BFME2 models without re-mapping.

Rating

Staff says

4.6

Members say

4.0

Average

4.3/5.0

17 votes

Page 1 2 3 4 5
Change the Chunk Sizes

1) You can close the rbarmory file you will not need it any longer

2) In the cbharadchurch file you will see in the string for the "39" piece we pasted a value of
              
Code
F4 1F 00 80
This references the size of the chunk. It backwards so the true value is 80001FF4.

3) You will also see right before the "39" value a size there as well. For the cbharadchurch it is               
Code
64 58 00 80


4) Change the               
Code
F4 1F 00 80
to               
Code
64 58 00 80


5) Next we will change the               
Code
64 58 00 80
value to account for the new information added. Take the true hex number (backwards number) 80005864 and add a 14 hex (20 decimal).

6) The result is 80005878 which is:               
Code
78 58 00 80.

7) Change [code]64 58 00 80
value right before the 39 to               
Code
78 58 00 80


Now for the last size change.
1) We need to find the header for the overall CHUNK_MESH. There are a number of ways, but we'll use this.

2) In wdump look at the W3D_CHUNK_MESH_HEADER3 portion of the 3rd CHUNK_MESH. (The problem one)

3) You will see the mesh name is CVH_CHURCH and the ContainerName is CBHARADCHURCH.

4) In XVI32 do a search on the text side for "CVH_CHURCH"

5) There will be a number of them, but they will be "CVH_CHURCHB" or something like that. Search until you see only "CVH_CHURCH". It will be in the hex address 1221E. You can know you are in the correct one because you'll see a               
Code
74 00 00 00
12 sapces before it.

6) Go back another 4 and you will see a               
Code
1F 00 00 00 74 00 00 00


7) Before the "1F" is the size of the chunk. For he cbharadchurch it is               
Code
22 0B 04 80


8) For this value we are going to add A7. (The amount of data we added.) So take 80040B22+A7.

9) The result is 80040BC9 which is [codeC9 0B 40 80[/code]

10) Change               
Code
22 0B 04 80
to               
Code
C9 0B 40 80


Now the file is done. Click save as and save the file to whatever name you want. rjhbchurch.w3d is what I'll be using. Next we will be correcting the texture from rbarmory to the correct one. In this case "MBGeneric.tga". We could have done this in a hex editory, but that would mean we would have to re-calculate the chunk size each time.....I'd rather not.

Next Page - Correcting the Texture

Links / Downloads

 HitsAdded
finished Harad Church used1018August 23, 2007 - 13:45
Gimp Program1787August 23, 2007 - 13:44
w3d Importer1360August 23, 2007 - 13:43
Renegade Tools2564August 23, 2007 - 13:43
Gmax program1037August 23, 2007 - 13:43
Hex Editor1671August 23, 2007 - 13:42

Credits

Comments

Display order: Newest first | Page: 1, 2

MotWlRimli - Thursday September 16, 2010 - 13:49

Works fine, very useful guide, thank you.

I hexed one model successfully. But now I've problems with the second one on page 3:

              
Quote
8) Now quite a few lines down you will see "AlphaTestEnable" in the text side of the XVI32.

I searched the whole w3d file with the Hex-Editor, there is never "Alpha" in side the text box nor the hex values given in this step. :/

Now I don't know where to insert the hex code from the working BFME1 w3d. Anyone knows something about this problem?

Argolis - Saturday August 15, 2009 - 14:04

Fantastic guide, very useful.

Kinda glad I know what Hex is though ;)

Nazgûl (Team Chamber Member) - Monday September 15, 2008 - 21:05

THIS is ADVANCED coding... holy heck! You are a modding God my friend :)

Ridder Geel (Staff) - Thursday June 26, 2008 - 5:51

well... apperently it doesn't work well with Elven buildings i see...
dang... oh well...

Rob38 (Team Chamber Member) - Wednesday June 25, 2008 - 11:34

eh, what kind of w3d importer do you have? Have you tried to open a model that came strictly from BFME2 and was never in BFME1?

Ridder Geel (Staff) - Wednesday June 25, 2008 - 6:45

My W3D importer doesn't make you have to 'Re-Map' I dont have to do all this stuff, i just import the model and add the texture to the right object and it works...
-either I just got lucky with models (I imported at least all the Gondor buildings and others without ANY problems at all, Also no problems with the Units)
-or I got a better W3D importer
-or my Computer is the Best :P Joking

And I can import most of the animations without any problems too... Strange :P (but good!)

robnkarla (Team Chamber Member) - Thursday August 23, 2007 - 16:42

Thank you! I told you I picked up things really quick :)

Crashdoc - Thursday August 23, 2007 - 16:41

Wow, you're fast, you took my random example on msn, practiced on other buildings, and made a tutorial of your own in just one day!

Thumbs Up ;)

Bart (Administrator) - Thursday August 23, 2007 - 15:14

next step: importing animations :p

Argolis - Thursday August 23, 2007 - 15:03

fantastic, just fantastic, i look forward to giving this a go (its a relief to think i wont have to struggle with dale and dol guldur in teh future, and i can finally use those nice ahradrim buildings without collossal hassle).

Somebody give the guy a medal or something of the like!

Go to top

 

"One site to rule them all, one site to find them,
one site to host them all, and on the network bind them."

 
13:21:12