project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding
10 Aug 2022, 00:00:00 (PRT)
Register Developer Blogs Project Reality Members List Search Today's Posts Mark Forums Read
PR:BF2 Community Modding Making or wanting help making your own asset? Check in here

Thread Tools Display Modes
Old 2022-06-13, 23:00   #1
Default Problem with BF2HMT

Hi everyone. I'm trying to use BF2HMT to import USGS terrain data into my map according to this tutorial ( but for some reason it's not working. Here's what I did:

I started with a rather large .tif that I got from the USGS database, cropped it down to a manageable size, and then converted it to a .raw file. In retrospect I probably didn't have to do this since BF2HMT takes in a .tif, but I didn't read ahead in the tutorial so I didn't yet know that.

Anyways, I put that .raw file in photoshop, cropped it the way I wanted it, and saved that again as a .tif. I then put it into BF2HMT, selected my level, and everything seemed to go the way the tutorial said it should. But then when I went into BF2editor I found that my level was still completely flat and nothing had changed.

After looking at the log in BF2HMT though, I noticed that when I tell it to export the image to the level it says:

java.lang.NullPointerExceptionjava.lang.NullPointe rExceptionjava.lang.NullPointerExceptionjava.lang. NullPointerExceptionjava.lang.NullPointerException java.lang.NullPointerExceptionjava.lang.NullPointe rExceptionjava.lang.NullPointerExceptionjava.lang. NullPointerExceptionDone!"

This doesn't look good, but I have no idea what it means or how to fix it. Another thing I noticed is that my .tif never seems to have the contrast that it should -- the USGS thumbnail of it shows a very detailed terrain greyscale, but anything I open it in (photoshop included) makes it look like there's only contrast between the ocean and land. It even does this after I auto-contrast it in photoshop. I've heard that a lot of applications can't really represent a .tif in full detail, but I thought I'd mention this here in case it's part of the issue.

I'd really appreciate any help y'all could think of!
TaL is offline Reply With Quote
Old 2022-06-14, 18:49   #2
PR:BF2 Developer

Outlawz7's Avatar
Default Re: Problem with BF2HMT

Just to check, you have Java installed? The .tiff you load into HMT was saved in correct format from Photoshop?

Outlawz7 is offline
Last edited by Outlawz7; 2022-06-14 at 18:54..
Reply With Quote
Old 2022-06-14, 23:58   #3
Default Re: Problem with BF2HMT

Yep, Java's installed. I actually figured out how to make the .tiff file look correct -- all that's holding me up is the errors BF2HMT are throwing at me. Actually, in the command line when it runs it says: C:\Program Files (x86)\Project Reality\Project Reality BF2\mods\pr_edit\levels\usgs_test\HeightmapPrimary .raw (Access is denied)
at Method)
at Source)
at<init>(Unknown Source)
at<init>( Unknown Source)
at com.sun.imageio.spi.FileImageOutputStreamSpi.creat eOutputStreamInstance(Unknown Source)
at javax.imageio.ImageIO.createImageOutputStream(Unkn own Source)
at javax.imageio.ImageIO.write(Unknown Source)
at BF2HMT.processTile(
at BF2HMT.process(
at BF2HMT$9.construct(
at SwingWorker$
at Source)

And so on for every piece of the heightmap it's supposed to be editing. I'm not sure what's denying it access, but at least this seems to isolate the problem a little bit more.

EDIT: Oh, I actually just had to give full permissions for users on each one of the heightmap files in the level folder. It works now!
TaL is offline
Last edited by TaL; 2022-06-15 at 00:28..
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT. The time now is 02:02.