The 3rd Age

Immersive Middle-earth (v. 1.392)

Immersive Middle-earth (v. 1.392)

An attempt to make the original BFME1 more enjoyable

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: 6795
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
W3D_CHUNK_MATERIAL_INFO

Well, the first thing that we will be doing is modifying the W#D_CHUNNK_MATERIAL info settings. The shaders used in the BFME2 models are completely different than the w3d shaders used in BFME1 which is part of the reason why the mapping is not retained.

******* Detailed Description ***********

BFME1 models use the following settings in the W3D_CHUNK_MATERIAL_INFO (Which can be seen if you look open up the cbharadchurch.w3d in wdump and look in the first CHUNK_MESH's W3D_CHUNK_MATERIAL_INFO):

              
Code

PassCount - 1
VertexMaterialCount - 1
ShaderCount - 1
TextureCount - 1


For the BFME2 models they have the following settings for the materials (which can be seen in the 3rd CHUNK_MESH in the model)

              
Code

PassCount - 1
VertexMaterialCount - 0
ShaderCount - 0
TextureCount - 0


You can also see the problem areas for the model in the CHUNK_MESH when you have the UnKnown pieces.

******** End of Description **********

So, to edit these settings:

1) Open the cbharadchurch.w3d in XVI32
2) Once Open, search for the hex values
              
Code

28 00 00 00 10 00 00 00 01 00 00 00 00 00 00

3) Change:
              
Code

28 00 00 00 10 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

to
              
Code

28 00 00 00 10 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00


The first step is done. To give you an an idea of what we just did:
"28 00 00 00" - W3D_CHUNK_MATERIAL_INFO identifier

"10 00 00 00" - The size of the chunk part - 16 in decimal - 4 values of 4 bytes each

"01 00 00 00" - The value of each setting - 01 00 00 00 = 1 and 00 00 00 00 = 0

Next Step - Fill the gaps

Links / Downloads

 HitsAdded
finished Harad Church used1010August 23, 2007 - 13:45
Gimp Program1779August 23, 2007 - 13:44
w3d Importer1347August 23, 2007 - 13:43
Renegade Tools2539August 23, 2007 - 13:43
Gmax program1032August 23, 2007 - 13:43
Hex Editor1657August 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."

 
12:51:36