Jump to content
Official BF Editor Forums
Sign in to follow this  
bladefinor

Anybody Succeeded To Extract Heightmaps?

Recommended Posts

Is there anybody who have succeeded to extract the heightmaps? I'm considering to make a few maps based on BC2's maps, and I've been struggling too much to find out how to open the heightmaps properly in Photoshop.

Much appreciated if anyone wants to help me out :)

Edited by bladefinor

Share this post


Link to post
Share on other sites

Oh yeah, I have. You'll need QuickBMS or something to open up the fbrb file, and then the heightmap itself is essentially just a .raw file with some extra bytes at the start as a header. You can either manually work out how many bytes to chop off at the start, or you can probably use either of Remdul's or PiratePlunder's texture converters. All the textures in BFBC2 are DDS files with different headers, and technically so are the heightmaps, so those tools should be able to do it. The tools you need are here: http://www.bfeditor.org/forums/index.php?showtopic=14207

Good luck!

Share this post


Link to post
Share on other sites

Been researching a bit now... I seem to be able to load textures with Remdul's FrostyBits Texture Converter. But whenever I'm trying to convert something that's .raw, the converter tells me this (for instance):

file: C:\Program Files (x86)\Electronic Arts\FBRB Extractor\New Attempt\mp01_terrain\Terrains\mp_001\MP_001.Heightfield-000.res

u1: -1006632960

u2: 0

format: -1006632960

u4: 1140850688

size: 1140457472x1140850688

u5: 1024

mipmaps: 7

Probably not a texture, aborting...

Soo... I guess it's not possible to convert .raw files, even though it's a .res (?)

This "MP_001.Heightfield-000.res" is 2.175 KB, so there gotta be something in this file.

Edited by bladefinor

Share this post


Link to post
Share on other sites

The heightmap files are stored as .raw files, 16-bit greyscale.

You have to cut off 49 bytes from the header (.res header)

Delet this part from the file's header(hexadezimal)

00 00 00 C4 00 00 00 00 00 00 00 C4 00 00 00 44 
00 00 FA 43 00 00 00 44 00 04 00 00 07 00 00 00 
08 00 00 00 00 00 04 00 00 00 00 00 00

Then rename the file to .raw and import the file eg. to Photoshop.

Resolution:

1024x1024 ( if the file's size is around 2mb)

2048x2048 ( if the file's size is around 8mb)

etc.

Channel: 1

Byteorder: 16-bit IBM PC

This way you can get the file without problems to eg. 3DS Max or the Unreal Engine (after resizing)

sorry for my bad english

Edited by apfelbaum

Share this post


Link to post
Share on other sites

I have managed to extract the terrain file but am now left with the files in the picture below, anyone know how to get the heightmap into a .raw file that bf2 can use?

20120730160235.jpg

Share this post


Link to post
Share on other sites

I have managed to extract the terrain file but am now left with the files in the picture below, anyone know how to get the heightmap into a .raw file that bf2 can use?

20120730160235.jpg

You have to rename the .terrainheightfield to .raw and follow the steps i described. I don't know which options are used for BF2 by exporting from Photoshop. The other files (.watermesh, .visualterrain...) are useless for us.

Edited by apfelbaum

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×