PDA

View Full Version : How to Convert DF2 Terrains to C4 Format



BulletMagnet
03-31-2012, 02:00 PM
I was hoping to convert a custom DF2 terrain to C4 format so I could use it in the C4 editor.

I know several DF2 terrains have been converted and uploaded here on this site, so I was hoping someone knew how.

BulletMagnet
03-31-2012, 03:22 PM
The .RAW files for the depth map are the ones giving me trouble. They don't open with traditional graphics programs or even photoshop. Any ideas on how these work?

Bluetiereign
04-03-2012, 08:59 PM
Wow, sorry for the slow reply. It's bad when even the admin can hardly find time to drop in. If I remember correctly, you had to give the terrains a 1024 x 1024 size as you opened them.

BulletMagnet
04-03-2012, 11:06 PM
No problem. A late reply is better than none!

Both color maps are 1024x1024. However, the C4 color map seems to be 4 smaller "tiled" versions of the DF2 one. Here's an example:

C4 Color Map: DF2 Color Map:

http://img708.imageshack.us/img708/276/dfd1cc4.jpg (http://imageshack.us/photo/my-images/708/dfd1cc4.jpg/) http://img535.imageshack.us/img535/9418/dfd1cdf2.jpg (http://imageshack.us/photo/my-images/535/dfd1cdf2.jpg/)

To resolve this, I simply shrunk the DF2 version and put 4 of them (each 512x512) into a 1024x1024 image, which seemed to work in the C4 editor. I did the same with the depth map (_D.raw file). The height map (greenish one) works fine now. The depth map (gray and black one) is a little off, but I can do without.

But anyway, the (_c).jpg color map and (_d).raw depth map were the only 2 files I used... I used DFD1 (a stock DF2 terrain) files for the other detail maps and such.

It was quite a tedious process, but it seems to work now. If anyone has any input, let me know. I'll report back if anything goes wrong.

BulletMagnet
04-04-2012, 12:49 AM
I've ran into a new problem.

When using the C4 editor and lining up walls, they ALWAYS seem to "transform" z-values in the df2 version. They're lined up perfectly in the C4 editor, but after converting the .mis and exporting the DF2 format, they simply change z-values.

Perhaps this is caused by the terrain? My conversion may not be 100% correct.

EDIT: It's happening with every terrain. Does the 3d Wireframe thing simply not work correctly? :o

Bluetiereign
04-04-2012, 08:58 PM
Could you upload the files and let me take a look please ? BTW, that terrain is already available -> here (http://www.checkpointdelta.net/downloads.php?do=file&id=977) <-.

BulletMagnet
04-04-2012, 11:41 PM
I just realized I never mentioned this... I'm converting the terrains to use in the DF2 C4 MED... not actually for C4 (shouldn't make a difference in the original question, though). I believe I've solved the terrain problem, actually. It's showing up fine now in the C4 editor. My problem now is the Z-values of items messing up when converting from a C4 .mis to a DF2 .mis. I thought it might be because I converted the terrain incorrectly, but the Z-values are messing up even with stock terrains.

BTW, here is the converted terrain I made for C4. Perhaps you guys (or you, lol) could check it out and make sure there are no errors just in case. Heck, if it works, we can add it to the Terrain database here!

Bluetiereign
04-05-2012, 08:09 PM
I get a crash with it. Polytrn error. I'll try to correct it and let you know.

BulletMagnet
04-05-2012, 08:38 PM
Ok. Keep in mind I've only used it for the DF2 C4 editor... not the actual C4 editor or game.

Bluetiereign
04-05-2012, 10:25 PM
Corrected and working. IMHO, the depth map strength needs to be increased. You can do this in the trn file, I just forgot how. I can post a pic if you don't have the game.

BulletMagnet
04-05-2012, 10:38 PM
Appreciate that m8!

Dr.Evil~TAG did the original conversion from BHD --> DF2. I REALLY wish the hill on the beachhead was taller like the BHD version. I'm not sure how Dr. Evil converted it, but he somehow made it smaller.

For example, here's the DF2 Converted Terrain In-Game:

http://img196.imageshack.us/img196/4571/sprw.png (http://imageshack.us/photo/my-images/196/sprw.png/)

Here's what it SHOULD be:

http://img51.imageshack.us/img51/1827/ss00000.jpg (http://imageshack.us/photo/my-images/51/ss00000.jpg/)

jabo1SFH
04-22-2012, 06:13 AM
i think the bhd to df2 conversion of terrains had something to do with the df2 engine needing the terrains lowered in height. i remember reading a post about this issue years ago. dfarena is probably where i read the post.


:baddevil:

Bluetiereign
04-22-2012, 01:44 PM
What issue jabo ?

BulletMagnet
04-22-2012, 07:26 PM
That shouldn't be the issue since some of the hills in DF2 are a lot higher than that BHD one would be.