Game Development Community

Very large interiors

by Ironbelly Studios · in Artist Corner · 09/09/2008 (12:40 am) · 6 replies

We are beginning to create some fairly expansive 'interiors' in our project and I had a question about how to structure that..

Essentially we will have a city inside of a large cavern, so for efficiency would it be best to have the cavern itself, walls, ceilings, pillars be part of the map file and then the buildings be meshes/objects or is it better to have the entire level, cavern, buildings, everything be done in the level editor?

#1
09/10/2008 (12:56 pm)
Hi Ryan,
I've had a similar issue in the past, and took the opposite approach. My project called for a gigantic space station with smaller buildings inside. I made the exterior shell a series of DTS objects, and the interiors were DIFs.

This allowed my buildings to take advantage of the full range of lighting features in TGE/A, as well as portaling off interiors for a significant boost in frame rate. Because the outer hull of my ship was distant and mostly inaccessible to the player, the DTS lighting issues (like lack of self-shadowing) weren't noticeable.

Additionally, you can make your buildings separate DIFs, which helps immensely in troubleshooting the inevitable dropped faces and artifacts that come with complex DIFs.
#2
09/10/2008 (2:04 pm)
Id go with a dif for the cavern and another dif for each structure inside of it.
#3
09/18/2008 (6:52 pm)
Thanks for the advice, it is greatly appreciated
#4
09/18/2008 (7:25 pm)
I would refrain from putting DIFs inside of DIFs, For large structures, i have done it 2 different ways. I have done a staduim sized object with a series of Difs. The problem with using a large object is LOD can sometime react badly when you have large objects particular when they are beyond viewing range as they become out of scope and disappear. As for doing it inside a cavern, use the terrain to create your floors and walls, and then place a large DIF scaled over it, if it is a city sized cavern.. are you really going to see the ceiling? If its that small of a cavern, you should just make it tunnels. Bear in mind that if you seal up the area, you have to consider lighting, Such a large area would require alot of light sources, i recommend you portal areas away to reduce the strain of 100's of potential light sources/particles from flames and objects that are in the city. Unless your city, is going to consist of 4 -5 buildings with a handful of lighting sources and 3 guys.

i144.photobucket.com/albums/r183/racs333/cavetest5.jpgThis is a DTS cave, with a Dif Interior, it was one of the the first tests we did regarding a entire zone of underground orcs for Fantasci.

i144.photobucket.com/albums/r183/racs333/lightsoff.jpg
i144.photobucket.com/albums/r183/racs333/background-EarthMissionE.pngThis is example of a DIF castle inside of a large cavern DTS. We had to be careful about the scoping issue with the cave popping in and out at some distances. Hope this helps with some real ingame examples.
#5
09/19/2008 (5:43 am)
Ill propose to create your floor and walls with terrain and the roof with dts (collision in roof isnt necessary)
For interiors use dif files with LOD and NOD uses. If regulate well the detail numbers the interiors become very light :) I have up to 50-60 interior houses in any town with many details and engine render up to 50 fps in town (i use a dualcore PC and ati1950 2yearsold). With 'min_pixels ~10 engine not render a town if you are in another town in cave...
use constractor for this, the last update of constructor 1.0.51 is perfect.
tdn.garagegames.com/wiki/Constructor
ie.

Nod is Number of detail.

If you open a *.map file you can read:

// This map has been written by the Torque Constructor
// For more information see http://www.garagegames.com

{
"classname" "worldspawn"
"detail_number" "0" //----------------- here is the number of detail
"min_pixels" "100" //----------------- here is the pixel size
"geometry_scale" "32"
"light_geometry_scale" "32"
"ambient_color" "0 0 0"
"emergency_ambient_color" "0 0 0"
"mapversion" "220" //--------------- don't replace this

// Brush 2
{
( 667.2 441.6 0 ) .........................


Create a house in the constructor with all object inside rename as house_0.map and come here into map with a text editor and set

"detail_number" "0" // default is 0
"min_pixels" "100" // default is 0, 100 is 15-20 meters

delete all objects in the house in the constructor without walls and roof and save the file as house_1.map
Open the map file with a text editor and replace the:

"detail_number" "1" // default is 0
"min_pixels" "30" // default is 0, 30 is 70-80 meters

now you have 2 nod the 0 and 1

open constructor _
from _file _fileset open the house_0.map

Constructor loading automatic the file 0.map and file 1.map
compile your dif and you are the first .... you have a build with 2 datail_number
you can repeat this for max 5 times = 5 datail_number, and is on you to confing the min_pixels_view of objects as you like. :)

Click Here for a screenshot
#6
09/19/2008 (3:48 pm)
Thank you for yoru insight.. definitely shedding more light on these issues