(Ed'42, BF SPC) Pathfinding texture not aligned

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

(Ed'42, BF SPC) Pathfinding texture not aligned

Post by Swaffy »



That video shows what I did. I decided to edit the AI pathfinding for my Iwo Jima map, and it seems like the files that BF SPC (Battlefield Single Player Creator) isn't producing map textures that line up correctly with the actual map. As you see in the video, the heightmap is positioned correctly but the ground texture is way off to the North-East side of the map.

Does it have anything to do with this line?
(Init/Terrain.con)
Console.worldSize 2048
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
one
Posts: 50
Joined: Thu Sep 15, 2011 4:14 pm

Re: (Ed'42, BF SPC) Pathfinding texture not aligned

Post by one »

As I understand it happens because BFSP has fixed map segment size. Use AI_GenerateForLevel by Rexman, tutorial is here: http://www.cajunwolf.com/pathmapping_with_ed42.html
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: (Ed'42, BF SPC) Pathfinding texture not aligned

Post by Swaffy »

I followed the tutorial and used the AI_GenerateForLevel tool properly.

I tried using the Medium map settings (using "8" for 8 segments) because that's what Iwo_Jima's "texture.con" said the size was. I got the same texture layout/outcome I got when I used SinglePlayerCreator, the one you saw in the video above. Then, I used "4" (or 4 segments, small map) in case I just needed to use the small map settings. I got the proper amount of files and file names like the original set of textures, but this is what it looks like:

Image
(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: (Ed'42, BF SPC) Pathfinding texture not aligned

Post by Senshi »

Why don't you just merge and scale it to the correct size? Sorry, no "proper" solution proposal from me, I never touched AI once.
cajunwolf
Posts: 115
Joined: Tue Jul 10, 2012 2:03 am
Location: Houston, Texas
Contact:

Re: (Ed'42, BF SPC) Pathfinding texture not aligned

Post by cajunwolf »

Check in the init/terrain.con file and see of they are using map offsets. Just set them to zero and your pathmap will align, then switch back again. Several mappers at DCX did that and I scolded them for it big time. I see no need myself for even using offsets and think it was originally a way to save memory especially in large sea maps.

Another issue is as mentioned the texture tile size used by various maps, I just resize my image before conversion to match tile size for a particular map. I run into this problem a lot because I no longer use Rex's tool to convert to pathmaps to texture, but instead use the bmp image provided by Genpathmaps, convert to TGA and resize, then convert to terrain tiles. I was converting straight from the 8bit.raw's that the bf1942 engine creates during the pathmapping process, but they were difficult to convert (unless someone has a better method). The reason being that Rex's converter tends to skew the textures like BC does with material maps. Actually unless the map has a lot of tree's or statics to path, it's faster to create a height-slope texture in ED42 to cover hills, valleys, and below water areas then hand path all your statics, which you need to do anyhow.
Image

"When you're up to your butt in alligators, you forget your original intent was to drain the swamp!"
Post Reply