L3DT users' community
Large 3D terrain generator

maybe a strange request

It doesn't hurt to ask...

maybe a strange request

Postby demi » Tue Dec 06, 2005 3:13 am

I am using L3DT to make a map for a game. Currently I am using Blender to decimetate the .x files from the export.

Would be nice to be able to adjust the vertex count. Like maybe select every 8th or 16th pixel. Even every 32nd.

Like I said a strange request,

I tried to write a Python script to load the vertex from the export but it does not work. Maybe someone could suggest something.

Apperciate it.

Demi

BTW - Thanks for fixin the Login Aaron
demi
Oracle
 
Posts: 227
Joined: Thu Nov 24, 2005 4:56 am

Postby Aaron » Tue Dec 06, 2005 3:56 am

Hi Demi,

That's quite a reasonable request. Would I be right in guessing this might be for some sort of level-of-detail algorithm?

In answer to your question; I think L3DT can do this already. In the 'export map' wizard you've been using to save the .x files there is also a 'resize for export' option. If you enable this check-box and then reduce the map size by, for example, a factor of 8, you will be saving every 8th pixel (in each direction). Thus for a 1024x1024 map, you would be exporting a 128x128 vertex mesh file. Is this what you want?

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

Postby demi » Tue Dec 06, 2005 11:42 pm

aaron wrote:Hi Demi,

That's quite a reasonable request. Would I be right in guessing this might be for some sort of level-of-detail algorithm?

In answer to your question; I think L3DT can do this already. In the 'export map' wizard you've been using to save the .x files there is also a 'resize for export' option. If you enable this check-box and then reduce the map size by, for example, a factor of 8, you will be saving every 8th pixel (in each direction). Thus for a 1024x1024 map, you would be exporting a 128x128 vertex mesh file.


Is this what you want?

Cheers,
Aaron.


YES! exactly what I want Aaron. I thought about doing this.

Does it work by reducing x,y,z or just x and y?

Here is what I am trying to do:

I have a 8192x8192 map. I have exported it to .x files by making the map 512 mosaics which I reload one at a time in L3DT and export to .x. I have to do this because L3DT does not allow me to export a large map in mosaic except the HFF files. Also, I have to do this because I only have 512 MEG of RAM and I am running a 1.6 GHz P4. hehe yeah, way below recommendation but I have compiled a 31768x31768 with out an issue. Just took 6 days to do it. In Fact this map is a reduced output of that large map.

Ok so I now have 256 - 512x512 directx files which I run decimeter in Blender. The BIG issue is the decimation just screws up the edge of the squares so I have to reload them and line up the edge vertex. If the edge vertex are not aligned then my test character falls through the map and the joined sections just look HORRID!

This process is just killin me in time. It is taking 6 to 8 hours to process 16 blocks and I still have to fix the reduced polys because decimation screws up the mesh.

Now if I understand correctly. I could reduce the output to say 512 square or even resize it to 1024 and export 4 mesh files instead of 16 and then resize it in blender by a factor of 16 or even 32 and have something close to what I designed. Is this fact?

err I hope this made sense.

Thanks for taking time to answer.

Demi


P,S - OH,

I need to explain why I am splitting these so you can understand.

The game engine is limited to ~20k vertex a mesh. Not an issue to use 100 mesh but one mesh can not exceed 20K vertex. The work around is to make multipule mesh and join them.

I just made a 512x512 export and it looks like it will work. all I need to do is split is up and I am done. WOOT!
demi
Oracle
 
Posts: 227
Joined: Thu Nov 24, 2005 4:56 am

Postby Aaron » Thu Dec 15, 2005 9:17 am

Hi Demi,

demi wrote:Does it work by reducing x,y,z or just x and y?


It drops x/y pixels, but doesn't change z.

demi wrote:I have a 8192x8192 map. I have exported it to .x files by making the map 512 mosaics which I reload one at a time in L3DT and export to .x.
...
Ok so I now have 256 - 512x512 directx files which I run decimeter in Blender. The BIG issue is the decimation just screws up the edge of the squares so I have to reload them and line up the edge vertex. If the edge vertex are not aligned then my test character falls through the map and the joined sections just look HORRID!



I think I answered the tile-edge and .x-related stuff in your later thread:

http://www.bundysoft.com/phpBB2/viewtopic.php?t=32

demi wrote:I have compiled a 31768x31768 with out an issue. Just took 6 days to do it.


Wow, that's pretty hard-core. I wonder how many tonnes of CO2 go into the atmosphere every year as a result of generating the electricity to run long calculations in L3DT? Perhaps I should go outside and plant a few trees; I'd hate to think I'm contributing to the greenhouse effect.

Then again, it's probably a drop in the ocean when compared to the CPU-months that go into, say, rendering an animation in Terragen (eh Oshyan?).

demi wrote:Now if I understand correctly. I could reduce the output to say 512 square or even resize it to 1024 and export 4 mesh files instead of 16 and then resize it in blender by a factor of 16 or even 32 and have something close to what I designed. Is this fact?


I'm confused (again). What you'll get will be a low-resolution version of the map you designed, which kind of defeats the purpose of generating a large map in the first place. If you want to reduce the number of tiles while same total map size (and thus resolution), you will need to increase the tile size. To do this you'll have to do something a little shifty:

Export the heightmap as a mosaic of HFF *without resizing it*, and then on the second pane of the export wizard ('mosaic map settings', or somesuch), set the tile size to 1024 or whatever. Then, copy this exported heightfield back over your original heightfield files.

demi wrote:The game engine is limited to ~20k vertex a mesh. Not an issue to use 100 mesh but one mesh can not exceed 20K vertex. The work around is to make multipule mesh and join them.


Okay, that makes sense. I guess it might also help to optimise the mesh to reduce the vertex count in smooth areas.

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

Postby demi » Fri Dec 16, 2005 3:46 am

aaron wrote:
It drops x/y pixels, but doesn't change z.



I figured this out and had to actually compensate by scaling the z factor in Blender. The export is really nice since it does keep the x and y scale. I just made the z scale a little steep.

demi wrote:I have compiled a 31768x31768 with out an issue. Just took 6 days to do it.


aaron wrote:Wow, that's pretty hard-core. I wonder how many tonnes of CO2 go into the atmosphere every year as a result of generating the electricity to run long calculations in L3DT? Perhaps I should go outside and plant a few trees; I'd hate to think I'm contributing to the greenhouse effect.



LOL well I just bought a new HD today (120 GIG) so now I can double the size. :P Seriously I bought it to have storage space for design of this game. I have filled an 80 gig and burnt off several DVDs

demi wrote:Now if I understand correctly. I could reduce the output to say 512 square or even resize it to 1024 and export 4 mesh files instead of 16 and then resize it in blender by a factor of 16 or even 32 and have something close to what I designed. Is this fact?



aaron wrote:I'm confused (again). What you'll get will be a low-resolution version of the map you designed, which kind of defeats the purpose of generating a large map in the first place. If you want to reduce the number of tiles while same total map size (and thus resolution), you will need to increase the tile size. To do this you'll have to do something a little shifty:

Export the heightmap as a mosaic of HFF *without resizing it*, and then on the second pane of the export wizard ('mosaic map settings', or somesuch), set the tile size to 1024 or whatever. Then, copy this exported heightfield back over your original heightfield files.



I will try this out because right now my actor runs across a square in about 4 minutes. Do the math and it works out to about 64 minutes a side. That is 40 KM in 64 minutes which seem to fast. I am trying to increase the detail also but another issue I am trying to get past is artifacting. Due to the size of the landscape, I am seeing artifacting in render. I tried increasing the resolution of the texture but now we get into another issue called useability. If the game requires 1.6 gig for just the land mass,,,, well you see what I mean.

I started to try out some ideas to combat the artifacting. I went to combine the map and then split it but the comp crashed and lost my map. I deleted the current map but forgot to save the combine. No worries it is not an issue with L3DT it was my old beat up P4 1.6.

I am regenerating it now while I write this. I thought about importing each square and doubling the size but I think it will cause more problems.
demi
Oracle
 
Posts: 227
Joined: Thu Nov 24, 2005 4:56 am


Return to Feature requests

Who is online

Users browsing this forum: No registered users and 2 guests

cron