L3DT users' community
Large 3D terrain generator

Does L3DT work with TSE?

Got a problem or need advice?

Does L3DT work with TSE?

Postby andyhodges » Fri Dec 08, 2006 6:56 pm

It may be a silly question to ask, but are there any problems using L3DT with TSE Milestone version 4.0? I have spent 2 days trying to import a raw file from L3DT with no success.

I either get errors such as "Too many verticles, try a lower treedepth" or a bunch of errors saying "AtlasActivationHeightfield::generateNodeData - Max exceeded! May have paging issues!"

I'm using tutorial:
http://www.bundysoft.com/wiki/doku.php? ... tse:import

Size: 1024
Exported as: 1025
JPG Image: 1024

HeightRange: 718.65
Square size: 6
Vertical scale: 0.0110
Leaf Size: 32

Command to inport to TSE:

generateChunkFileFromRaw16("terrain_water_demo/data/terrains/andy.raw", 1024, 1.0, 0.0110 / ( 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 1.5), "terrain_water_demo/data/terrains/andy.chu", 2.0, 6);

Any help on this is greatly appreciated. The TSE/Torque site doesn't say much about it, and your TSE tutorial on here was actually more useful.

-Andy
andyhodges
Member
 
Posts: 13
Joined: Fri Dec 08, 2006 6:39 pm

Postby tillot » Sat Dec 09, 2006 1:47 am

First off, a lot of these errors seem to be generated most of the time with the import routine EVEN if it works. It involves tweaking the import routine until you get the terrain you want out of it, and the in engine performance you want.

I can send you an L3DT project and the main.cs file I use for importing the .raw file into TSE if you would like.

It took me about 4 days of playing with the import routine to get all the settings right. I'm hoping the plugin they are writing goes a long way to alleviating this problem by reading the settings from L3DT and 'guessing' as to what the optimal import settings should be.

I'll post my settings file when I get home a little later...
tillot
Member
 
Posts: 15
Joined: Thu Oct 19, 2006 3:24 pm

Postby andyhodges » Sat Dec 09, 2006 2:51 am

Tillet, if you could give me your config, that would be great! I have tried all the other terrain generators (Terragen, Freeworld3D, etc) and really like L3DT the most.

Thanks for your help! It's been 2 days and I've been going crazy.

-Andy
andyhodges
Member
 
Posts: 13
Joined: Fri Dec 08, 2006 6:39 pm

Postby tillot » Sat Dec 09, 2006 4:27 pm

Here's my main.cs file for converting a very small terrain:

Code: Select all
// Bring up a dos window to display current status. This lets you see immediately how the // import/generation process is going. 
enableWinConsole(true);

// Enable logging so we get a console.log. This is useful if something goes wrong - we //can check the log for errors. 
setLogMode(6);

// The following lines are the various commands we want to execute this time through:
// Generate geometry from a raw 16 bit heightfield. 
atlasOldGenerateChunkFileFromRaw16("terrain.raw", 256, 1.0, 0.0039,  "terrain.chu", 1.5, 2);

// Import from old CHU format to .atlas.
importOldAtlasCHU("terrain.chu", "terrain_geometry.atlas");

// Import data from some tiles we rendered out with L3DT.
//atlasGenerateTextureTOCFromTiles(8, "LM_x%dy%d.jpg", "terrain_texture.atlas", 0);
atlasGenerateTextureTOCFromLargeJPEG("terrain.jpg", 2, "terrain_texture.atlas");

// Finally, combine into a unique-textured terrain. 
atlasGenerateUniqueTerrain("terrain.atlas", "terrain_geometry.atlas", "terrain_texture.atlas");
echo("done");
tillot
Member
 
Posts: 15
Joined: Thu Oct 19, 2006 3:24 pm

Postby tillot » Sat Dec 09, 2006 4:38 pm

Here's another one I use as well. I usually just run each terrain through one of these 2 initial ones, then I put the .atlas file into a mission in TSE and see how it looks. Then I come back and change the resolution or leaf size until I get something that looks good. If the script gets to the "Terrain Generation Complete" line and a terrain2.atlas file exists, it succeeded, even if it gave you a whole bunch of warnings.
Code: Select all
// Bring up a dos window to display current status. This lets you see immediately how the
// import/generation process is going. 
enableWinConsole(true);

// Enable logging so we get a console.log. This is useful if something goes wrong - we
//can check the log for errors. 
setLogMode(6);

// The following lines are the various commands we want to execute this time through:
// Generate geometry from a raw 16 bit heightfield. 
//atlasOldGenerateChunkFileFromRaw16("filename", gridsize, hozontal_scale, verticle_scale, output_chunk_file, error_size, leaf_size);
//atlasOldGenerateChunkFileFromRaw16("terrain2.raw", 1024, 1.0, 0.0039,  "terrain2.chu",3, 5);
//atlasOldGenerateChunkFileFromRaw16("terrain2.raw", 1024, 8.0, 0.0078,  "terrain2.chu",0.5, 5);
atlasOldGenerateChunkFileFromRaw16("terrain2.raw", 2048, 1.0, 0.0039, "terrrain2.chu", 1, 5);

// Import from old CHU format to .atlas.
importOldAtlasCHU("terrain2.chu", "MountainValley/terrain2_geometry.atlas");

// Import data from some tiles we rendered out with L3DT.
//atlasGenerateTextureTOCFromTiles(8, "terrain2_SplitTextureTiles__x%dy%d.jpg", "terrain2_texture.atlas", 0);
//atlasGenerateTextureTOCFromLargeJPEG("terrain2_texture.jpg", 5, "terrain2_texture.atlas");
atlasGenerateTextureTOCFromLargeJPEG("terrrain2_texture.jpg", 5, "terrain2_texture.atlas");

// Finally, combine into a unique-textured terrain. 
atlasGenerateUniqueTerrain("terrain2.atlas", "terrain2_geometry.atlas", "terrain2_texture.atlas");
echo("   ...");
echo("   Terrain Generation Complete");
tillot
Member
 
Posts: 15
Joined: Thu Oct 19, 2006 3:24 pm

Postby andyhodges » Sat Dec 09, 2006 5:55 pm

Tillet, thanks you! Well this worked right away! I was able to go in and it loaded the L3DT terrain I made.

However, the terrain is black. It's weird, but if I load it inside the Terrain_Water_Demo .MIS file, it lights up. Can't figure out the difference other than Terrain_Water_Demo has a .TER file.

-Andy
andyhodges
Member
 
Posts: 13
Joined: Fri Dec 08, 2006 6:39 pm

Postby andyhodges » Sat Dec 09, 2006 6:37 pm

UPDATE: Got the textures working now. But, I see missing patches in the terrain from a distance. As I walk closer, the missing patches are filled with texture. Anyway to solve this?

-Andy
andyhodges
Member
 
Posts: 13
Joined: Fri Dec 08, 2006 6:39 pm

Postby tillot » Sat Dec 09, 2006 7:33 pm

I don't know, as I haven't spent too much time solving that kind of problem. If you want to upload your Zipped .raw file with the dimension I need to import it, I can see what I can do.
tillot
Member
 
Posts: 15
Joined: Thu Oct 19, 2006 3:24 pm

Postby DeathTwister » Sun Dec 10, 2006 1:52 am

Hay there,

Yes TSEA works with L3DT /smiles......I have not had the time to work with build 4 yet, just installed in on my comp, but the last build I had the terrain in 1.35, but the water block and the paging on the terrain was horrendus and I haven't had the time to see what they have done other then the opening demo which is a L3DT terrain and map. I have a shot of a simple screen I did for "le Galleria" TSEA version and will be working on this next week so I may be here tearing my hair out as well, next week, erggg........
Image
I combined L3DT and Terragen Textures together and combinned them before I brought them into TSE1.35/build3. But there was still to many bugs to work much with it at the time. I am hoping and hear it is almost all fixed and may be one hell of a lot better.

I was reading the Atlas 2 docs some and I am still wondering what happened to the F-12 button for making chunks, but I have not finished the Tut, so won't scream bloody murder until I have hahahahahaha. Having said all that, I hear it is working great, but I am still wondering why we do not have a plugin in L3DT that will allow us to export it all out neet and clean to the exact files we need to bring into TSEA, hum HINT HINT HINT plugin guys?????????????? /many smiles.....

DeathTwister
User avatar
DeathTwister
Dearly missed
 
Posts: 562
Joined: Thu Dec 15, 2005 12:30 pm
Location: Klamath, CA.

Postby Aaron » Sun Dec 10, 2006 3:09 am

DeathTwister wrote:but I am still wondering why we do not have a plugin in L3DT that will allow us to export it all out neat and clean to the exact files we need to bring into TSEA


Testing it now.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby andyhodges » Sun Dec 10, 2006 3:26 am

The only problem I've seen with L3DT are the textures (I finally got my textures working!). They seem to "blur". And, there's no detail either. For instance, Freeworld3D you can have layers, a Detail layer, and a combination of 3 other terrain image types. Which makes it look more like TSE.

However, the Ultimate program is L3DT, because of its easy-to-generate terrain and this has been proven to save time. I just wish L3DT had some of the options for layers, and for us to use other textures that are "brighter", or TSE textures, etc. It's a fantastic program and robust.

-Andy
andyhodges
Member
 
Posts: 13
Joined: Fri Dec 08, 2006 6:39 pm

Postby Aaron » Sun Dec 10, 2006 4:12 am

Hi Andy,

andyhodges wrote:The only problem I've seen with L3DT are the textures (I finally got my textures working!). They seem to "blur".


If the textures are blurring (I presume this is using a high-res texture), then increase the resolution of your attributes map, or else use the 'per pixel land types' option in the texture mapping wizard.

andyhodges wrote:And, there's no detail either. For instance, Freeworld3D you can have layers, a Detail layer, and a combination of 3 other terrain image types. Which makes it look more like TSE.


In the texture settings pane of the land type editor, create a new layer, and set the 'texture->blend mode' to 'mod'. This will make it a detail map. As an example, all the grass land types in the temperate climates have a detail layer.

andyhodges wrote:I just wish L3DT had some of the options for layers, and for us to use other textures that are "brighter", or TSE textures, etc.


Which extra options for layers would you like?

Cheers,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby andyhodges » Sun Dec 10, 2006 7:00 am

Aaron, thanks for the reply! I got my textures looking very good now as I raised the resolution!

I'm having trouble finding the "texture settings" for those layers. Downloaded the latest L3DT that you posted on Dec 9th. Can you guide me on where to find it?

-Andy
andyhodges
Member
 
Posts: 13
Joined: Fri Dec 08, 2006 6:39 pm

Postby Aaron » Sun Dec 10, 2006 11:22 am

Hi Andy,

Sorry, I didn't explain very well. Go to the climate manager ('climates->climate manager'). This will open this dialog:

http://www.bundysoft.com/docs/lib/exe/fetch.php?w=250&h=&cache=cache&media=l3dt:userguide:dialogs:climanager.png

(I would have posted the images directly here, but the documentation wiki forbids deep-linking, and the forum script doesn't accept image URLs that involve fetching from another PHP script.)

Here, pick the climate you're using from the list and hit the 'edit' button. This will open the climate editor:

http://www.bundysoft.com/docs/lib/exe/fetch.php?w=250&h=&cache=cache&media=l3dt:userguide:dialogs:clieditor.png

Then, pick the land type to which you want to add a detail texture, and hit 'edit'. This will open the land type editor:

http://www.bundysoft.com/docs/lib/exe/fetch.php?w=220&h=&cache=cache&media=l3dt:userguide:dialogs:ltedit_pane1.png

Click on the third pane ('texture layers') to get to the goodies:

http://www.bundysoft.com/docs/lib/exe/fetch.php?w=220&h=&cache=cache&media=l3dt:userguide:dialogs:ltedit_pane3.png

Now, to create a detail layer, double-click on '<<new texture layer>>'. This opens the layer settings dialog:

http://www.bundysoft.com/docs/lib/exe/fetch.php?w=&h=&cache=cache&media=l3dt:userguide:dialogs:texlayer.png

And here you set 'texture->blend mode' to mod, set the correct 'texture->filename', set the 'texture->weight' (the weighting depends on the strength of your detail map, but I wouldn't go higher than 0.5).

The scale settings should probably also be explained:

If you want to stretch-out your detail texture, make the 'scale->layer res' setting the negative value of the desired scaling factor (i.e. set to -2 if you want to stretch your texture out by 2x).

If you want your texture to be a higher resolution than the heightfield, set 'scale->layer res' to the positive value of the desired scaling factor (i.e. set to 2 if you want 2x2 texture pixels per heightfield pixel.) This only works if you're generating a high-res texture, of course.

If you want your texture to be 1:1 pixel size with the generated texture map irrespective of the texture resolution used, set the 'scale->use tex res' flag to true.

The 'scale->min res' and 'scale->max res' settings allow you to turn on and off your texture layer depending on the texture resolution chosen by the user. For instance, if I make a texture layer with a 'max res' of 4 and I then generate a texture at 8x resolution, the layer will be disabled.

Hey, that's funny. I just got to this point and realised I'd written this in the userguide already:

http://www.bundysoft.com/docs/doku.php?id=l3dt:algorithms:cli:land_type:layers

Hopefully between these two explanations some sense will be found.

Cheers,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby andyhodges » Sun Dec 10, 2006 4:41 pm

Wow, ok, so L3DT pretty much does everything that I want. I just didn't explore enough in the program!! I did what you suggested and things came out great!

On resolution, I see that my texture is 8192x8192 in resolution to help clean up any blurs. Is there a limit set to this? For Atlas, I'm still adjusting the leaf size to only cut 256x256 tiles. It all looks great.

-Andy
andyhodges
Member
 
Posts: 13
Joined: Fri Dec 08, 2006 6:39 pm

Next

Return to Help and support

Who is online

Users browsing this forum: No registered users and 90 guests