L3DT users' community
Large 3D terrain generator

Replacing DF2 terrain parts with 3d items

What are you up to?

Replacing DF2 terrain parts with 3d items

Postby Q-dad » Thu Oct 28, 2010 10:07 am

I've previously started a topic in here (http://www.bundysoft.com/phpBB2/viewtopic.php?t=238) for figuring out how to use L3DT to create new terrains for the Delta Force 2 game. That work has been discontinued for a couple of years now, but I'll get back to work on it again one of these days...

In the mean time I will try to figure out methods for using L3DT in the process of replacing certain parts of DF2 terrains with 3d items. Some starter questions (and replies) have already been posted here...: http://www.bundysoft.com/phpBB2/viewtopic.php?t=1698

The reason for doing this, is that the DF2 terrains are solid and static, and there's no way of making tunnels or adding subterranean buildings, etc. After using L3DT for exporting parts of the terrain as 3d items, one could edit those 3d items to include such elements (tunnels, subterranean buildings, etc.), make the corresponding parts of the DF2 terrain flat, and insert the edited 3d items at those locations.

This topic here will be my place to document the complete process of figuring out such methods. More to come...
TXP (Terrain Xpansion Pack) for DF2: txp.df2.org

Image
User avatar
Q-dad
Luminary
 
Posts: 97
Joined: Tue Nov 22, 2005 11:54 pm
Location: Jessheim, Norway

Postby Q-dad » Mon Nov 15, 2010 12:48 am

Ok, I believe I'm going to have some problems accomplishing my task of exporting parts of a DF2 terrain as a 3d item and use it inside a DF2 map. I'll think aloud below, based on the information available in the other topics mentioned above, and see what comes out of it...:

First, the DF2 height field is 1024 x 1024 pixels large, each pixel representing a 0.5m x 0.5m square of the game world, thus totally 512x512 square meters. The height field represents the solid ground which players walk upon.

I could import such a height field into L3DT and export it to an OBJ file, and then I could import the OBJ file into a 3d editor, for instance AC3D, and remove the parts I don't need (since I only want to turn a small part of the complete height field into a 3d item). Let's say I end up with an item measuring only 20x20 in the horizontal plane (instead of 1024x1024, which would have represented the complete height field)...

So far, so good, even if I probably would run into the well known problem of transforming height field pixels into squares which needs 2 points in both X and Y directions, so if I wanted the 3d item to represent a 20x20 part of the height field, I probably would need to use 21x21 of the exported height field...

Anyway, my real problem of making this 3d item look like the corresponding part of the terrain, would be that the game engine, when rendering the height field pixels, is smoothing out sharp differences in height values between neighboring height field pixels, while the 3d item would not be able to hide those sharp differences, unless I manually did something about it, like for instance inserting extra 3d points in between them inside the 3d editor...

Second, the DF2 height field represents only the raw skeleton of the solid ground which players walk upon. In addition, there's the detailed height field, represented by a 64x64 square of pixels per each pixel of the main height field. These can be looked upon as foliage, since they are not being rendered solid in the game, but are instead of the walk-through type. They add more detail to the terrain rendering, and the players can be partly obscured by these detailed height field renderings if laying in prone position on the ground. They can look like grass, pebbles, dirt, etc., but also in special cases like railroad tracks, etc...

Ok, if I worked hard and long, I could probably figure out a way to add the values for each of those detailed 64x64 height field squares on top of each of the main height field square values, inside a 3d editor. I would also first need to figure out which of the many different 64x64 tiles belongs to which of the main height field pixels. The latter would be no easy task in itself...

But, even if I managed to accomplish those two tasks, the end result would still not look very good if I can't also solve the problem of smoothing out the differences between neighboring main height field pixels, mentioned above...
TXP (Terrain Xpansion Pack) for DF2: txp.df2.org

Image
User avatar
Q-dad
Luminary
 
Posts: 97
Joined: Tue Nov 22, 2005 11:54 pm
Location: Jessheim, Norway


Return to Users' projects

Who is online

Users browsing this forum: No registered users and 2 guests