Game Development Community

Black terrain

by Rudolf Kajan · in Torque Game Engine Advanced · 07/04/2007 (5:27 am) · 10 replies

I have implemeted partial fixes from forum to tgea 1.01 and now I am able to export terrain from l3dt and import it , everything is OK but when I import terrain and run terrin-water demo terrain is black. what can cause this ? (terrain size is standard 1024x1024)

#1
07/04/2007 (12:00 pm)
Be sure you copied all your created texture maps from l3dt to the same place as the terrain. TSEA terrain will be black if you don't have a Light map with to it.
#2
07/04/2007 (12:03 pm)
Also make sure you have installed the DirectX April 2007 SDK runtime files.
#3
07/05/2007 (1:05 am)
@Cornell Cook : can you please be more specific ? "Be sure you copied all your created texture maps from l3dt to the same place as the terrain" - in no atlas terrain demo are textures copied to .atlas file directory
#4
07/06/2007 (11:06 am)
When you create terrain for TGEA it is not lit by the world lighting.(be cool if it was) -.-

Therefore in your terrain modeling package you have to create a lightmap along with the terrain plus the textures you used(ie. grass, mountain, road, blah blah). The 2 pieces of software I own L3DT and Freeworld3D create these files for you, just have to set the settings for the lighting. If you just created the height map and import it into TGEA your land will not be lit.

I'm assuming you rendered everything in L3DT if so, it's supposed to export all the files that were used to your specified export directory and you just modify the Mission file to specify your .atlas file and boom off you go . :)


Yes the textures go inside the same directory as your .Atlas file.
#5
07/06/2007 (12:12 pm)
I'm really sorry but I still don't get it :

this is what I do, please tell me what I do wrong -

I have l3dt + plugin L3DTio_Atlas2 that creates: mapname_HF.raw and mapname_TX.jpg (terrain texture, not lightmap)

through console commands I do conversions :
mapname.raw -> temp.chu
temp.chu -> temp.geom.atlas
mapname_TX.jpg -> temp.text.atlas
temp.geom.atlas + temp.text.atlas -> mapname.atlas

in .mis file :

new AtlasInstance2(NewTerrain) {
position = "-151.417 7.48933 80";
rotation = "1 0 0 0";
scale = "1 1 1";
detailTex = "~/data/terrains/details/detail1";
atlasFile = "~/data/terrains/mapname.atlas";
lightMapSize = "1024";
};

I can export lightmap from l3dt to mapname_LM.jpg and copy it to mapname.atlas directory but nothing happens (terrain is correctl loaded but black). what's wrong ?
#6
07/06/2007 (1:27 pm)
AHh doing it the old fashion way, have to convert the mapname_LM.jpg also.
#7
07/06/2007 (1:40 pm)
So I convert _TX.jpg and _LM.jpg to two different temp.text.atlas files ? then what ? if this is the "old fashion way" what is new way ? I didn't see any new tools or scripts or plugins. thanks
#8
07/06/2007 (3:22 pm)
Hmm just a tad bit different from Blended Terrain, I take you your using Unique. According to Click Here you copy the Lightmap.jpg to where ever your atlas file is which you already did.

I wrote a script using my files and atlasGenerateUniqueTerrain will only allow you one texture file.


Lets see something, comment out the detail1 texture with a // in front of that line. The other day I messing with detail textures it killed all my other textures and gave me the black terrain.

*edit
Just to see what happens I created a new terrain in L3dt with all the textures map generated and I used the export to Torque atlas inside L3DT(I just let it do all the work), and everything works cept for the mipp mapping but thats a setting have to fix in my code.
#9
07/07/2007 (9:05 am)
If I use default exporter terrain is black, commenting out detail texture doesn't help, link you posted says nothing about lightmap, only if you are using GIS data, but there is nothing about copying LM texture to .atlas directory (anyway I tried it -> terrain still black ) :((((
#10
07/08/2007 (3:07 pm)
Lightmap info is there starting at "Within L3DT" to right before "From GIS data".

"Make sure the Texture Map is the active map View-->Show map-->Texture Map then export by going File-->Export-->Active map. Set the File format to JPG and set the file name and path to your project folder's /data/terrains". Guess it could of been worded better you just goto whatever map you want to export, but you already did this and not working.

In the blended mode you have to make it .atlas file(sorry didn't know which conversion you were using)

You mention you added partial fixes, what exactly was it that you added to TGEA1.0.1. Also have you tried to import the land into a clean copy of TGEA?