Jump to content

[Random map] Schwarzwald


niektb
 Share

Recommended Posts

Will be hard (I'm quite busy with school currently, I've got my hands on a very large, time-consuming project):

TODO:

- make map circular

- revert biome changes

- Rewrite path placement

- Make sure the water and a open space around it stays clear of trees. (Might even require a total rewrite of heightmapgeneration)

- Add resources

- add eyecandy

This is an initial list, there might be items added to it.

  • Like 2
Link to comment
Share on other sites

Those are old files and should get replaced some time. The new files are all in png format.

Actually not necessarily. The game still uses .DDS, the PNG files are more to make it easier for artists/modders and I doubt using PNG files in the actual game would be a good idea. And unless there are better versions created of those skyboxes I doubt they will be replaced. It's not too easy to create a skybox as well as the texture has to be seamless in so many directions :P (I gave it a quick try :P Actually, now that I remember it, when I tried it it didn't work using PNGs, but when I saved the same images as DDS files it worked - in the sense that the game could load it, I didn't spend enough time on it to make it actually seamless.)

  • Like 1
Link to comment
Share on other sites

Now, what is going on???? :scratch_one-s_head:

tcNDqZ7.jpg

The road + forest stops at class clOpen just as it should, but strangely it continues in clWater:

var placer = new HeightPlacer(heightRange.min, ByHeight[2].height);var painter = new LayeredPainter([tWaterBorder, tWater], [2]);createArea(placer, painter);paintTileClassBasedOnHeight(heightRange.min,  ByHeight[2].height, 3, clWater);setReliefmap(myReliefmap);var placer = new HeightPlacer(ByHeight[3].height, ByHeight[4].height);var painter = new LayeredPainter([terrainBase, terrainBaseBorder], [4]);createArea(placer, painter);paintTileClassBasedOnHeight(ByHeight[3].height,  ByHeight[4].height, 3, clOpen);setReliefmap(myReliefmap);

Strange, since exactly the same piece of code is used. Also it seems that the height is overlapping (since part of clOpen is in the water) You can see it because of the pigs and textures. I guess that clWater isn't painted at all (no sand texture) but why?

  • Like 1
Link to comment
Share on other sites

Now, what is going on???? :scratch_one-s_head:

tcNDqZ7.jpg

The road + forest stops at class clOpen just as it should, but strangely it continues in clWater:

var placer = new HeightPlacer(heightRange.min, ByHeight[2].height);var painter = new LayeredPainter([tWaterBorder, tWater], [2]);createArea(placer, painter);paintTileClassBasedOnHeight(heightRange.min,  ByHeight[2].height, 3, clWater);setReliefmap(myReliefmap);var placer = new HeightPlacer(ByHeight[3].height, ByHeight[4].height);var painter = new LayeredPainter([terrainBase, terrainBaseBorder], [4]);createArea(placer, painter);paintTileClassBasedOnHeight(ByHeight[3].height,  ByHeight[4].height, 3, clOpen);setReliefmap(myReliefmap);

Strange, since exactly the same piece of code is used. Also it seems that the height is overlapping (since part of clOpen is in the water) You can see it because of the pigs and textures. I guess that clWater isn't painted at all (no sand texture) but why?

How are you setting the constraint? "createArea(placer, painter);" will set the constraint to "undefined" and that means there is no constraint. Unless you have changed more parts of the code, you should instead use something like: "createArea(placer, painter, avoidClasses(clWater, 0));"

Edit: To also paint a tile class, you can use this: "createArea(placer, [painter, paintClass(clSomething)], constraints);"

Link to comment
Share on other sites

Spahbod:

Glad you look into this.

I rarely work with placers/painters but he wanted to paint tiles by height.

So I wrote an example function HeightPlacer().

Could you check if I forgot anything to make it work with avoids/constraints?

(That's what I guess is at least part of the problem)

Edited by FeXoR
  • Like 1
Link to comment
Share on other sites

OK, I fiddled with the code a bit. It seems that these lines in the end are the cause of the problem:

myReliefmap = getRescaledReliefmap(myReliefmap, heightRange.min, heightRange.max); // This is risky since it might bring players on another height!

setReliefmap(myReliefmap);

You basically lower the grounds where there are trees into the water area. Your placers and constraints are working properly.

I commented them out, deleted the extra "setReliefmap(myReliefmap);" in other parts of the code, and it worked. It seems that you should change the way you generate the map a bit to fix it.

Though indeed the ground was lowered beneath trees, still no luck with commenting that part out here. Did you do something other than that?

K0yaAHh.png

Thanks for your help though, it made me clear that it was not (directly) my fault that parts of clOpen was in the water.

Also there isn't a texture painted so I get the feeling that something is wrong in the clWater part. Maybe the heights?

Edited by niektb
Link to comment
Share on other sites

Though indeed the ground was lowered beneath trees, still no luck with commenting that part out here. Did you do something other than that?

K0yaAHh.png

Thanks for your help though, it made me clear that it was not (directly) my fault that parts of clOpen was in the water.

Also there isn't a texture painted so I get the feeling that something is wrong in the clWater part. Maybe the heights?

Right, in addition to lowering the ground, there is another problem. You make the set heightmap "after" you paint the water areas. This means that there will be o water area in your map. To fix this, you should comment out all of your "setReliefmap(myReliefmap);", and write just "one" before you paint the water textures (Like this):

//place water texturesetReliefmap(myReliefmap);var placer = new HeightPlacer(heightRange.min, ByHeight[2].height);var painter = new LayeredPainter([tWaterBorder, tWater], [2]);createArea(placer, painter);paintTileClassBasedOnHeight(heightRange.min,  ByHeight[2].height, 3, clWater);
  • Like 3
Link to comment
Share on other sites

Headache. How do I get your new Terrain Diamond generation reverse compatible with setReliefmap(myReliefmap)?

Currently it fails at newHeightmap not being defined. Quite buggy it is now and absolutely not final (Whole eyecandy placement needs to be rewritten, it is currently just a matter of copy-pasting and deleting lines, just to get everything to work)

var myReliefmap = setBaseTerrainDiamondSquare(heightRange.min, heightRange.max, 0.5, initialReliefmap, myReliefmap);// Apply simple erosionfor (var i = 0; i < 5; i++)	decayErrodeHeightmap(0.5, myReliefmap);rescaleHeightmap(heightRange.min, heightRange.max);setReliefmap(myReliefmap);

It is especially about this piece of code.

schwarzwald2503.zip

Link to comment
Share on other sites

I'd remove "var myReliefmap = " and search for myReliefmap.

All new functions directly manipulate g_Map.height instead. So if you have a function really needing a heightmap to set use "g_Map.height" instead of "myReliefmap".

If you only use the new functions that should not be needed though because every function should fall back to g_Map.height if no argument is given for the heightmap.

Since this argument is optional now the order of the arguments have changed as well so you might check them.

(That's the problem with using heavily "work in progress" code)

Edited by FeXoR
Link to comment
Share on other sites

  • 2 weeks later...

Concerning TILE_CENTERED_HEIGHT_MAP variable:

Could someone plz tell me the reasons for/advantages of the two different terrain texture paint methods?

It is quite annoying for implementation of some heightmap functionalities (like e.g. using height/slope maps to paint tiles).

If one of the methods have proven to work better then the other it may be worth the thought of removing the other one.

(If both are suited in different cases (as I suspect) I'll just have to adjust the functions to that)

Edited by FeXoR
Link to comment
Share on other sites

I voted for included this one in the game, we can show this to Michael, he like do it maps and he can put in game if he are pleased with this one.

What an honor. Alas, I feel it is not game-ready yet. I could use some advice on the visuals especially texture choice.

  • Like 1
Link to comment
Share on other sites

What an honor. Alas, I feel it is not game-ready yet. I could use some advice on the visuals especially texture choice.

Maybe you should use a darker grass texture. It's schwarzwald after all. And also, a fir texture for the forests like this

defensive_space3.jpg

Link to comment
Share on other sites

  • 3 weeks later...
So, I have generated 3 Black Forest scenarios. My comments are below:


1. Is there any way you could make the water deeper, and more active? It looks very plain, without waves and such (I don't know if this is because of the main engine itself, or the way RMS is painting the map).


2. The greens are a bit monotonous. Like Stan's suggestion, maybe you could have the RMS paint different shades of greens, with some patches of dirt and non-grass in between?


3. Could you make a splattering of other rock types too?

  • Like 1
Link to comment
Share on other sites

@1.:

Have to the graphics settings up?

Create a local.cfg by copying the default.cfg

in (Linux)

binaries/data/config/
Or (Windows)

Users/<Shieldwolf>/AppData/Roaming/0ad/config
.

Quality up to 10 .. and activate all effects. Also preferglsl and gentangents = true variable. And whatever you like (local.cfg overwrites default.cfg).

Btw. FeXoR needs our moral support to continue working on different water heights (random map generation) - e.g. per lake. The engine supports it. But it's not visible in the Atlas. :/

Edited by Hephaestion
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...