Problem with BF2HMT

Making or wanting help making your own asset? Check in here
Post Reply
TaL
Posts: 8
Joined: 2022-05-11 21:46

Problem with BF2HMT

Post by TaL »

Hi everyone. I'm trying to use BF2HMT to import USGS terrain data into my map according to this tutorial (http://lorneswork.com/projects/BF2HMT/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:

"Processing...
java.lang.NullPointerExceptionjava.lang.NullPointerExceptionjava.lang.NullPointerExceptionjava.lang.NullPointerExceptionjava.lang.NullPointerExceptionjava.lang.NullPointerExceptionjava.lang.NullPointerExceptionjava.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!
Outlawz7
Retired PR Developer
Posts: 17261
Joined: 2007-02-17 14:59

Re: Problem with BF2HMT

Post by Outlawz7 »

Just to check, you have Java installed? The .tiff you load into HMT was saved in correct format from Photoshop?
Last edited by Outlawz7 on 2022-06-14 18:54, edited 1 time in total.
Image
TaL
Posts: 8
Joined: 2022-05-11 21:46

Re: Problem with BF2HMT

Post by TaL »

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:

java.io.FileNotFoundException: C:\Program Files (x86)\Project Reality\Project Reality BF2\mods\pr_edit\levels\usgs_test\HeightmapPrimary.raw (Access is denied)
at java.io.RandomAccessFile.open0(Native Method)
at java.io.RandomAccessFile.open(Unknown Source)
at java.io.RandomAccessFile.<init>(Unknown Source)
at javax.imageio.stream.FileImageOutputStream.<init>(Unknown Source)
at com.sun.imageio.spi.FileImageOutputStreamSpi.createOutputStreamInstance(Unknown Source)
at javax.imageio.ImageIO.createImageOutputStream(Unknown Source)
at javax.imageio.ImageIO.write(Unknown Source)
at BF2HMT.processTile(BF2HMT.java:619)
at BF2HMT.process(BF2HMT.java:549)
at BF2HMT$9.construct(BF2HMT.java:333)
at SwingWorker$2.run(SwingWorker.java:106)
at java.lang.Thread.run(Unknown 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!
Last edited by TaL on 2022-06-15 00:28, edited 2 times in total.
Post Reply

Return to “PR:BF2 Community Modding”