Jump to content

Atlas - enhance the heigtmap importer and texturing workflow


Recommended Posts

Hi everyone,

Lately I tried creating maps in Atlas, but I encountered some limitations:

I created a heightmap in world machine but when I imported it, not changed. It turned out to be that something was changing but was barely visible. What I like to see are some sliders in which you can adjust the strength from the heightmap. Also it would be nice to import terrain textures (Or actually not the textures, but just the painting) and then replace them in Atlas with whatever texture you like.

When I created elevation myself, the next problem occurred, It is not possible to select a slope to paint on, for example I wanted to paint some cliffs, but of course I do not want the cliffs' texture on flatlands.

Any comments or should I create several tickets?

Regards,

Niek

P.S. If needed, I'm able to upload some screenshots.

Edited by niektb
Link to comment
Share on other sites

I don't know the format of the output of world machine. - to import it to Atlas it should be a grayscale .png.

To increase the hight range/strength it should be enough to increase the contrast of the image (e.g. with IrfanView, it's small, fast, powerful and free of charge).

Automated texture painting on cliffs by steepness would be nice to have in Atlas, yes.

Edited by FeXoR
Link to comment
Share on other sites

Increasing the contrast will work. As black and white mean the top and bottom of your world (or the other way around). So if the contrast is maxed, the peaks will be very steep. If the picture is mostly grey, it will be rather flat.

Some automatic texture importing could also be nice indeed. We could map every pixel of the image to a tile, and use the closest texture available in the special textures (that includes most basic colours). Later on, the map designer can replace those special textures with the grass or cliffs he wants.

Painting cliffs would also be nice, but before you make a ticket, can you think about the best way to set it wrt UI?

(note that some parts of this post are dreaming aloud, I don't have a lot of experience in the Atlas code, so I can't do most of it)

Link to comment
Share on other sites

I made some screenshots to make my point clear.

I added my 2 heigtmaps (the normal one and the one with higher contrast without losing information) and I included 2 screenshots from the Atlas + a blank map.

The result of setting the contrast a little too high is a flat topped mountain and the loss of details in the heightmap.

post-15513-0-01619600-1384282276_thumb.p

post-15513-0-88096600-1384282282_thumb.p

post-15513-0-50786000-1384282331_thumb.p

post-15513-0-59120000-1384282345_thumb.p

post-15513-0-19885500-1384282360_thumb.p

Link to comment
Share on other sites

First of all, the contrast isn't completely up. The whitest part still in only about 90% white, the blackest part is only still about 10% white. Next to that, the resolution of the image is quite big. It only contains one mountain in the centre, so the map is stretched which makes the mountain less steep, but still as high.

If you try reducing the resolution, it will generate a smaller map, but a steeper mountain. For such big maps, if you want them to be mountainous, you need to have multiple mountains.

Link to comment
Share on other sites

Note:

Hight range = ~90 meters (0xFFFF engine height units, 732 units = 1 meter height, 0xFFFF/732 = 89,53...)

Width range = 2048 meters (on giant maps (512x512 Tiles, 1 Tile = 4x4 meters) though maps can be bigger, i'm not sure how big exactly)

(In theory 0xFFFF engine units, 1 Tile width = 4 meters = 4 engine units, 0xFFFF engine units = 16383,5 Tiles)

Taking a smaller map might help so the hight range to width ratio will become bigger.

(sanderd17 was faster ^^)

Edited by FeXoR
Link to comment
Share on other sites

It is a bit silly that our terrain has a horizontal resolution of 4m and a vertical resolution of 1.3mm. We could probably reduce vertical resolution by some factor like 8 or 32 or something (with a corresponding increase in vertical range) without anybody noticing the loss of precision, and it should be easy to make that change without breaking compatibility with the existing maps (we can just divide their heightmaps when loading them).

Link to comment
Share on other sites

Would that limit tall maps (like Minas Tirith)?

I don't understand entirely what you ask but:

Reducing vertical resolution (of the terrain vertexes) while keeping the maximum absolute value unchanged means increased hight range (so actually it would be less limited then).

IMO a factor of 4 will be enough though (that would be a heightRange/mapWidth ratio as tiny maps (128x128 tiles) have now for giant maps (512x512 tiles) then).

Mainly on giant maps the height range is to small.

Edited by FeXoR
Link to comment
Share on other sites

Just out of curiosity. Is 512 the max amount of tiles? How large (in meters) is a unit in comparison?

512 is the maximum of tiles available in Atas or the game setup (guess for the engine as well).

Otherwise: http://trac.wildfiregames.com/wiki/ArtDesignDocument#ScaleandProportions (Pretty outdated though)

On the other hand: http://trac.wildfiregames.com/wiki/Rmgen_Library#MapCoordinateSystem

So that was my error. 1 Tile = 2 Meters then (I edited my previous post accordingly).

1 tile width = 2 meters = 4 model space units = 366 engine hight units

I have no information about the engines units in the plane.

(If it's range is 0xFFFF (65536) as well it would be 1 tile = 65536/512 engine width units = 128 engine width units)

Would seam strange to me though if hight and width had different resolutions in the engine.

EDIT: The engine supports maps at least to 2047x2047 (I resampled the .png to 2047x2047 and it still worked)

At 2048x2048 I get: ERROR: CRenderer::EndFrame: GL errors occurred

(That doesn't necessarily mean I hit an engine limitation but I guess it does because I can't see anything in Atlas despite the fact it's "only" 1 tile larger in each direction).

For comparison of the hight range on different map sizes:

(All with the same increased contrast. About the maximum without getting a flat cut hill top)

128x128

post-14196-0-69392400-1384351913.png post-14196-0-01195900-1384351961_thumb.j

200x200 (original)

post-14196-0-16787100-1384351925.png post-14196-0-43637200-1384351971_thumb.j

512x512

post-14196-0-81894100-1384351936_thumb.p post-14196-0-02405500-1384351984_thumb.j

With gamma correction the focus of detail can be set to different heights:

More details on lower parts by increasing it, higher parts by decreasing it.

Edited by FeXoR
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...