Create "holes" in the Heightmap for tunnels?

Ask questions, discuss ideas, get answers
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Create "holes" in the Heightmap for tunnels?

Post by Swaffy »

I just thought of this idea. I understand how hard it is for people to make tunnels in this game, how they need to "recreate" the map's surface onto the 3D model of the tunnel so that it fits well with the Heightmap and its texture.

But is there a way to "delete" two squares in the heightmap that are some distance apart, then to have the tunnel go under the heightmap's first hole and back up through the second hole? So, in other words, the players would be able to walk underneath the map on a StaticObject (the tunnel object), and so they won't fall into the abyss. I would think this can make tunneling easier for mapmakers, instead of them having to lower part of the heightmap a few miles to put the tunnel object on top.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: Create "holes" in the Heightmap for tunnels?

Post by Senshi »

This only is implemented in the Battlefield Vietnam engine (vanilla, even), as far as I know. Any attempt to replicate that in BF42 led to crashes or simply a filled heightmap, as the engine expects a continous heightmap and there simply is no code to parse a certain value into a "blank" terrain pixel. It's easy to do codewise before compiling, but if it's not implemented, you can't fix it without a serious exe hack.
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Create "holes" in the Heightmap for tunnels?

Post by Swaffy »

Okay. I thought the heightmap acted similar to a 3D model, with faces and a texture attached to them. Good to know, though.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Diamondback
Posts: 590
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada
Contact:

Re: Create "holes" in the Heightmap for tunnels?

Post by Diamondback »

Your best bet would be to use the Eagle's Nest tunnel objects and retexture them accordingly to the surrounding terrain.
See my Strasbourg map project here.
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: Create "holes" in the Heightmap for tunnels?

Post by Senshi »

The only viable alternative of not using the "lower vertex several miles" is to completely abandon the height map and instead using a static object. Most tunnel maps are rather small, so the usual clipping and LOD issues you get if you e.g. convert El Alamein heightmap to a static won't apply here. Making sure that the correct materials are applied everywhere on the terrain static can be tricky, but for new map projects it's easy to work with.

To convert, best use Rexman's old BF Scripts or my updated 2.76 MDT version if you use 3ds Max versions above 7 (8 through 13, that is).
POTAmatt
Posts: 89
Joined: Mon Dec 07, 2009 9:09 pm
Location: New Yawk

Re: Create "holes" in the Heightmap for tunnels?

Post by POTAmatt »

"Your best bet would be to use the Eagle's Nest tunnel objects and retexture them accordingly to the surrounding terrain."

I did just that when adding an unused BFV tunnel to Iwo Jima. Pathed out for the bots, it adds extra spice to the map:

Image
Diamondback
Posts: 590
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada
Contact:

Re: Create "holes" in the Heightmap for tunnels?

Post by Diamondback »

Wow man, very, very nice work, really impressed. You can still see the boundaries of the object outline it, but it's still a very nice addition in a map.
See my Strasbourg map project here.
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Create "holes" in the Heightmap for tunnels?

Post by Swaffy »

What you can do to further improve the tunnel is to texture the land around the tunnel object so that the textures "fade" more smoothly, opposed to the straight line you see on the edge of the object.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Diamondback
Posts: 590
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada
Contact:

Re: Create "holes" in the Heightmap for tunnels?

Post by Diamondback »

There will always be an outline, no matter what you do to conceal it.
See my Strasbourg map project here.
POTAmatt
Posts: 89
Joined: Mon Dec 07, 2009 9:09 pm
Location: New Yawk

Re: Create "holes" in the Heightmap for tunnels?

Post by POTAmatt »

Yeah, it wasn't as noticeable at ground level. Haha. Shows you where my priorities are at.
Post Reply