Jump to content
Sign in to follow this  
oktyabr

L3DT to V3

Recommended Posts

I just bought L3DT Professional and hoped someone had some good tips on how to use this tool to manufacture fantasy terrains that look and work good in Visitor?

One thing I've noticed, and I post here because I'm not sure if it's the way L3DT exports .xyz or rather something Visitor does with them on import but I can make an island the way I want it (in L3DT) after the .xyz export/import process my elevations are much more steep; peaks are like mountains instead of the soft rolling hills that I saw in L3DT's 3D editor... IF I export the exact same HF as a PNG and import into V3 "from picture" I get something much more like what I was expecting, usually only needing a bit of tuning on the terrain.pbl to keep sea level something like what I want it, but even that isn't perfect.

I've gone through literally about 10 solid hours of trial and error trying to find the best work flow to get what I see in L3DT's editor into V3 with the same terrain geometry and sea level. I'm going to keep hacking away at it but if someone has some tips or suggestions that might help I'd sure be much appreciative! And then I can get on with actually making something meaningful.

Also have GIMP and Wilbur and familiar with both, if that helps.

Thanks in advance!

Share this post


Link to post
Share on other sites

Use a .png greyscale export from L3DT as your "first" import of the terrain into Visitor - along with a .pbl file - exactly like in the tutorial...

At this stage things will import fast - you can use the .pbl file to microtune the sea level and generally get things the way you want them.....

Later on, once you've been laying roads, etc - you might decide to use L3DT to tweak some areas - maybe for settlements, or flatten an area for an airstrip... However - at this stage, you may already have manually fine-tweaked heights in Visitor, or smoothed roads, etc - this makes the version of your heightmap currently in use in Visitor the most up-to-date one - so in order to preserve that work, you'll need to Export your heightmap from Visitor - tweak in L3DT, then Import back into Visitor - hopefully without disturbing anything! - this is especially important once you start placing objects at "absolute heights" - like bridge sections, etc... this is where XYZ format comes in handy...

Once your terrain is advanced a little - you'll find that that 2minute "terrain import via greyscale" can take 2 hours!! - it still works - just takes forever to reimport! However - for some reason XYZ format will still import ultra-fast...

So...

Initial .png export from L3DT - note your minimum and maximum heights exactly

Import into Visitor with same max and min in associated .pbl file

For any subsequent terrain editing once work has progressed a bit...

Export terrain as image from Visitor (you'll get a popup with two sets of max/min figures - write down the TOP ones) - this will result in a .pbl and a .png... throw the .pbl away and...

Import .png into L3DT (use the exact max/min you wrote down)

Edit terrain to little hearts content... ;)

Export as XYZ...

Reimport into Visitor.....

Subsequent imports of XYZ seem to work OK - but I've found the initial import should be a .png and .pbl setup - at least until you're happy with the overall heights, sealevel, etc...

B

Share this post


Link to post
Share on other sites

//peaks are like mountains instead of the soft rolling hills that I saw in L3DT's 3D editor

Make sure that the Values in L3DT for Vertical Range match your terrain.pbl

(Operations-Heightfield-Change Vertical Range)

That usually does it for me. On the opposite i inport a .png greyscale file in visitor instead of .xyz

Besided that Horizontal Scale (m) in L3DT should match your Grid. I get good results by doing so.

Edit: lol 3 Ppl posting at the same Time. Now if that aint helpfull :)

Share this post


Link to post
Share on other sites
lol 3 Ppl posting at the same Time. Now if that aint helpfull :)

But who was quickest on the finger though? lol :cool:

Share this post


Link to post
Share on other sites

LOL! And thanks! I never made an exact note of max/min but rather tried to tune terrain.pbl from memory. I'll give another go with exact values this time. Keep the tips coming, if anyone has any more!

Can L3DT be used to render usable masks for V3, even just for testing purposes? What is the best work flow to do so and recommended image sizes?

If I'm using a:

2048x2048 HF as "terrain.png", is there an advantage to making this larger or smaller?

Should my sat_lco.png be the exact same scale?

And masks? I've found GIMP's "posterize" color tool (limits the number of colors in an image) makes at least something a bit easier to work with. Should they be the same size as everything else?

Again, any tips or descriptions of workflow would be very appreciated!

Share this post


Link to post
Share on other sites

Terrain 2048x2048 !

With 10m cellsize this will give you an in-game terrain the size of Chernarus or Sahrani - 20km x 20km thats pretty big... it'll take a while to make...

As a comparison, Icebreakrs well-known islands are 10km x 10km - so your project will be 4 times that big..

General practise is to use a matching Mask and Sat layer 10x the size of your heightmap... so 20480x20480 px in your case... this gives you a 1px = 1m resolution on the distant hills, etc - which is pretty good for "distance" - closer up, the detail textures kick in anyway so you're covered for decent detail there...

Since you haven't yet "started" - I'd consider a 10km x 10km (1024 x 1024 heightmap) terrain as a first go... I started a 2048 x 2048 a good while back and only sheer Scottish stubbornness has kept me from despair so far ;) - for that size - you guessed it - your Mask and Sat should be 10240x10240px - a bit more manageable...

Still on that topic - Yeah - the "Attributes Layer" in L3DT can be exported in colour and used directly as a Mask_lco - and the exactly matching Texture layer can be used directly as a Sat_lco... you'll probably edit these further, but its a good way of getting working and detailed "base files" to expand on...

A few tips...

Redo your climate so the different surfaces in the AM map have the bright primary colours you want to use in your Layers.cfg/mask_lco...

when exporting this as a .png.....

*look at "options" - change it to "color"

When creating/exporting the TX map (Sat tex layer)...

*maybe skip "use lightmap" - it makes odd shadows on the texture that can look wierd in-game, and maybe skip "antialias" as well...

B

Share this post


Link to post
Share on other sites

Thanks Bushlurker!

I was trying to work with 2048x2048 @5m to get a higher terrain resolution, as recommended by L3DT but I see that 10m seems to be the standard for Arma2 so I'll go with your recommendations.

My first project is just a small island anyway, something similar to Spirit's excellent @SIX_SHL island, with a prominent salt-marsh type swamp for a particular mission I once started for Counter Strike years ago, before I found more realistic shooters, so 1024x1024 should be plenty :)

Share this post


Link to post
Share on other sites

Theres been a few experiments with higher terrain resolution recently... I'm pretty sure Takistan is less than 10m, and Proving Ground seems to be about 2m - hence it only being 2 x 2km... yet NOT being particularly FPS friendly...

One of Betons islands - a winter one who's name I can't remember, had 1m ground res I think! - looked just lovely!, but there were quite a few reports of stability problems and stuff... a shame, cause the ground detail was superb.... maybe in Arma 3...

Smaller terrain cell sizes seem to suffer from a bit of a performance hit, and if you go too low - stability issues as well... worth experimenting a bit though if you're interested in doing something a little different... 10m cell isn't a rule - more of a tried and trusted guideline...

There's very few rules really - apart from the basic mechanics of files and configs required and what files go where, etc... if it looks good and works well in-game, go with it...

Its worth taking time at this early stage to get things right, and be 100% sure you're happy with your base terrain before progressing further... a 10km x 10km terrain done to a decent level is likely to take you a few months, so you'll be staring at these hills for a long time... make sure you're happy with them ;)

B

Edited by Bushlurker

Share this post


Link to post
Share on other sites

Anyone figured out a good work path to generating broad, sandy beaches, resort style?

Share this post


Link to post
Share on other sites

EDIT: I'm not sure what was wrong with the first of these two examples but the second one, where I followed the sizes used in the tutorial, the problem was as simple as having "--" in front of the "minHeight" value! -- = +? So it might have compressed my approx. 800m terrain into about 200m?!?!? Anyway, that works. I'll leave the following examples for those that might walk in my footsteps one day.

Hmmm.... now my terrain came out all squashed.

terrain grid: 1024x1024

terrain cell size: 10m

terrain size: 10240x10240

sat_lco.png: 2048 (I wanted a small one that might run fast, for testing purposes)

Image size: 2048 x 2048

Image Resolution (m/pixel): 5.000

Segment Size: 512

My terrain.pbl:

class cfg

{

PNGfilename="terrain.png";

squareSize=2;

originX=0;

originY=0;

minHeight=--769.51;

maxHeight=424.03;

};

minHeight and maxHeight were *exactly* what I had in L3DT's "vertical range" dialog.

"squareSize" I set to "2" based on what I understood as the formula: sat_lco.png size divided by terrain.png size... 2048/1024=2 (or 5120/512=10, in the tutorial)

I had an extinct volcano that was 424m tall at the highest point! In V3, bulldozer specifically, it was like a pot hole in the ground. Yes, my horizontal size in L3DT was also 10m (per pixel).

Any ideas what went wrong here?

Thanks in advance!

---------- Post added at 09:43 PM ---------- Previous post was at 08:53 PM ----------

Ok this time I decided to fall back closer inline with what the tutorial had:

terrain grid: 512x512

terrain cell size: 10m

terrain size: 5120x5120

mask_lco.png: 5120 (the all white one from the tutorial)

sat_lco.png: 5120

Image size: 5120x5120

Image Resolution (m/pixel): 10.000

Segment Size: 512

Again, besides changing the squareSize back to "10" (as in the tutorial) I used the exact numbers I had in L3DT:

class cfg

{

PNGfilename="terrain.png";

squareSize=10;

originX=0;

originY=0;

minHeight= -382.63;

maxHeight= 463.92;

};

Here is my terrain.png... Nothing fancy, just something I wanted to whip up quick for a fast test (click for larger version):

th_terrain.png

It should have plenty of elevation and yet in bulldozer it was almost perfectly flat... my 400+m volcano looked like you might think it a bad pothole if you drove over it. :mad:

Suggestions? Ideas?

---------- Post added at 11:12 PM ---------- Previous post was at 09:43 PM ----------

I'm still looking for a little work flow from an expert ;)

Suppose all you have is L3DT and a working build and tool partition, etc...

What is the right way to go from HF to SAT?

------------------------------------------------

I realize that things just seem to go smoother if the sat_lco (and mask_lco) are 10x larger than the terrain being used but how do YOU get there?

If I follow the tutorial example I'm shown a terrain.png that's 512x512 and a sat_lco that's 10x that, or 5120x5120. So, in regards to L3DT do you start with an HF that is 5120x5120 and then shrink it down for the terrain.png or... work with an HF that is 512x512, export it as the terrain.png, then increase it's size to produce the needed "hi-res" texture or something I haven't thought of yet?

Thanks in advance!

Edited by Oktyabr

Share this post


Link to post
Share on other sites

Maybe you should rise your minheight.... is your map an island or not? As it looks from here it´s not an island.

How big do you want it to be 5x5 km or 10x10km?

Maybe Try:

- 2048 heightmap

- squareSize=5 // for the possibility of better heightediting

- sat and mask lco should be 10240

This would give you a map with ca 10x10 km, terrainvertices every 5 m and a sat and maskmap where 1 pixel represents 1 sqm of land. 5m terraingrid runs fine on most machines today.i used it on my maps... otherwise there is the possibility to lower the "terraindetail" and the "viewdistance" ingame. Regarding computers not becoming weaker in the future there should be no problem with performance.

Remember that the Heightprofile is always linked with the colours available. Every distinct shade of grey represent a certain height dependind on your min and maxheight. If your minheight is very low this means a big part of your dark colours will be below sealevel. In vistor there is no way to define one certain colour as 0m sealevel. Its a trial and error game.

I have not worked with L3dt yet but there should be a way to make it as Bushlurker may know....

Edited by Beton

Share this post


Link to post
Share on other sites

Guys, here's one tip for import of new terrain when your map is already full of objects:

1. CTRL-A select all objects

2. Copy all objects to clipboard (CTRL-C/Copy from menu)

3. Delete all objects.

4. Import new terrain, inspect it in Bulldozer and make necessary tweaks

5. Paste back the objects as absolute height (from the menu) ;)

p.s. 250000+ objects take couple of minutes, but it works. Check the bridges, other stuff should be in place.

Share this post


Link to post
Share on other sites

Yes thats right... that´s what i did a couple of times. You can also make a backup and open two .pew files at once if you don´t have Buldozer running. Then you can copy paste the objects from one to another map... but always make backups...

Share this post


Link to post
Share on other sites
Maybe you should rise your minheight.... is your map an island or not? As it looks from here it´s not an island.

How big do you want it to be 5x5 km or 10x10km?

Yup, an island. 5x5km, 512x512 @ 10m/pixel, in the example I posted the HF from.

Maybe Try:

- 2048 heightmap

- squareSize=5 // for the possibility of better heightediting

- sat and mask lco should be 10240

This would give you a map with ca 10x10 km, terrainvertices every 5 m and a sat and maskmap where 1 pixel represents 1 sqm of land. 5m terraingrid runs fine on most machines today.i used it on my maps... otherwise there is the possibility to lower the "terraindetail" and the "viewdistance" ingame. Regarding computers not becoming weaker in the future there should be no problem with performance.

Thanks, I'm trying those settings now. Glad to know 5m seems to work ok on most modern hardware... I wasn't sure what the convention was... but as I'm working on a relatively complex island, geographically speaking (extinct volcano, avalanched basalt fields, highlands, swamps, sandy beaches... not the HF I posted) double the terrain detail might help make it more believable.

One thing about L3DT is that if you try to render a high res texture map (for sat_lco template) from the existing HF the interface only let's you increment exponentially... so 2x, 4x, 8x, 16x, etc. I'm sure there is a good mathematical reason for this but I'm not sure what it is... All I know is that meandering through my trial-and-error session using this technique means I can't get exactly 5x (10240)... I can go 4x (8000 something) or 8x (16000 something) and resize either larger or smaller before import into visitor3. I'm guessing most people would suggest render large and scale down so that's what I'm working with.

Remember that the Heightprofile is always linked with the colours available. Every distinct shade of grey represent a certain height dependind on your min and maxheight. If your minheight is very low this means a big part of your dark colours will be below sealevel. In vistor there is no way to define one certain colour as 0m sealevel. Its a trial and error game.

I have not worked with L3dt yet but there should be a way to make it as Bushlurker may know....

Yup, I've been playing with grayscale HF's for over a decade: POVray years ago, a little for the original Halflife engine, then Quake 3 and Wolf:ET, most recently trying to build race tracks for rFactor (almost as difficult as Arma2 islands!) so I understand that principal pretty well anyway. The tip about dialing in the exact same min and max heights from L3DT to V3 seems to work pretty well if I don't mess up the scale somewhere else. I know that HF doesn't look like it's got much under water but it happened to come out with a pretty shallow sea with reefs and sand bars, sort of what I'm really on... again, that's just an HF I whipped up quick to try and help me learn these techniques.

if your using l3dt, to make life easier, just export as xyz.

I tried that yesterday and ended up with drastically steep inclines, not what I had in mind. I also wonder how .xyz might convey min/max height information to V3? Anyway someone had suggested using an HF png for the initial import to V3 and then using XYZ after that to jump back and forth from V3 to L3DT and back again. I haven't tried this method yet but I will.

Many thanks again for all the thoughtful replies and tips!

While L3DT isn't quite the perfect HF editor it does have some very nice tools for the price... wish I could figure out why I can't rebuild my DM from HF (it's grayed out in the menu)... perhaps because I've used a generic volcano insert in the DM instead of a "custom" volcano overlay from the HF? Eh, I'll hammer the guys on the L3DT forums about that one ;)

---------- Post added at 08:41 AM ---------- Previous post was at 07:40 AM ----------

Is there a way to easily "squash" the terrain in V3? Perhaps in the terrain.pbl or am I better off darkening the HF.png itself? While my terrain looked good in both L3DT and bulldozer it is still way too steep for practical use in game!

My current settings are minHeight -1839, maxHeight 562.91, producing a range of 2401. I think I'd like it about HALF that or a range of 1200. Can I just reduce both min and max by half and get predictable results?

Thanks in advance!

Share this post


Link to post
Share on other sites
One thing about L3DT is that if you try to render a high res texture map (for sat_lco template) from the existing HF the interface only let's you increment exponentially... so 2x, 4x, 8x, 16x, etc.

If I remember correctly you can just type in "10"...

My current settings are minHeight -1839, maxHeight 562.91, producing a range of 2401. I think I'd like it about HALF that or a range of 1200.

You could "clip" the range - just lose everything below say -100 or -150m... option under "heightfield operations"...

B

Edited by Bushlurker

Share this post


Link to post
Share on other sites
If I remember correctly you can just type in "10"...

You could "clip" the range - just lose everything below say -100 or -150m... option under "heightfield operations"...

B

Thanks Bushlurker! I'll try that.

EDIT -- Ok, I tried that setting min at -100 and max at 300, seeing how the top of my highest peak was 283 or so. The clip seemed to work right but the sea bed (everything clipped at -100) was solid white and 300m high so my island appeared surrounded by a steep canyon! What did I do wrong?

Edited by Oktyabr
Attempted solution: EPIC FAIL!

Share this post


Link to post
Share on other sites

I haven't used L3DT in a wee while tbh - except as a file converter but I think "clip to" is really "replace this range with", and what it's done is to replace all cells within that range with the value "300m" - theres probably a setting in there where you can specify the "clip to" target figure - then it should replace, say, everything lower than -100m with... -100m... something like that...

Currently its "clipping to maximum" or whatever - there'll be an option in there somewhere to set that value... I'll take a look later if I get time...

*edit*

clip.png

B

Edited by Bushlurker

Share this post


Link to post
Share on other sites

DOH! It wasn't until I looked at your screenshot that I realized that it has an option... either "Clip below" or "Clip Above"!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×