zoot Posted July 9, 2012 Report Share Posted July 9, 2012 Those mountain ridges look quite nice. I guess the circular map format cuts out the valleys at the bottom of the heightmap. Quote Link to comment Share on other sites More sharing options...
myconid Posted July 9, 2012 Author Report Share Posted July 9, 2012 Those mountain ridges look quite nice. I guess the circular map format cuts out the valleys at the bottom of the heightmap.All maps are square internally, so if a rectangular heightmap is given it has to cut off the parts that don't fit. Not a huge problem, I don't think. Quote Link to comment Share on other sites More sharing options...
kosmo Posted July 9, 2012 Report Share Posted July 9, 2012 Fine, thanks. I'll start heightmapping the places of the battles of the peloponnesian war (respectively which are described in Thukydides book, since this is my main resource) the next days. I'll try to supply other relevant information to the specific battles as far as I am able to find it. Is there a list of battles that should get implemented? Quote Link to comment Share on other sites More sharing options...
zoot Posted July 9, 2012 Report Share Posted July 9, 2012 I don't think there is, but you could open a thread in the art forum and ask for ideas. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted July 10, 2012 Report Share Posted July 10, 2012 By the way, we do support rectangular (non-circular) maps, so if you really want to copy an exact heightmap, it should be possible There's a value in the scenario XML for this ("CircularMap"). Quote Link to comment Share on other sites More sharing options...
fabio Posted July 10, 2012 Report Share Posted July 10, 2012 Weren't rectangular maps decided to be dropped, along with engine support? Quote Link to comment Share on other sites More sharing options...
myconid Posted July 10, 2012 Author Report Share Posted July 10, 2012 By the way, we do support rectangular (non-circular) maps, so if you really want to copy an exact heightmap, it should be possible There's a value in the scenario XML for this ("CircularMap").If rectangular maps exist they must work like the circular maps, by hiding the parts of a square heightmap that fall outside a predefined shape. That probably happens somewhere in the simulation code... Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted July 10, 2012 Report Share Posted July 10, 2012 Weren't rectangular maps decided to be dropped, along with engine support?Dropped in what way? We don't make square maps anymore, so you won't encounter them very often, but as long as there's no difficulty supporting both I don't see why we wouldn't. Actually importing heightmaps is a good reason to allow square maps, for those who want high accuracy to a real-world map. The circular maps might cut off important features as in the above example. Quote Link to comment Share on other sites More sharing options...
wrod Posted July 11, 2012 Report Share Posted July 11, 2012 and the square maps have more space ^.^ Quote Link to comment Share on other sites More sharing options...
gudo Posted July 11, 2012 Report Share Posted July 11, 2012 (edited) Well.... A circle is more than just a round shape. In this way, one could say that circle maps are "bigger." But since in game, we make a square, then trim off the edges, square maps are actually bigger in this case /tangent Edited July 11, 2012 by gudo Quote Link to comment Share on other sites More sharing options...
FeXoR Posted July 11, 2012 Report Share Posted July 11, 2012 Anyone willing to implement this in rmgen? I'll be gone for 3 weeks but I would really like to have Heightmap/erosion, best both ofc. If anyone is at it please let me know. Would be awesome ofc if it would be in when I return Quote Link to comment Share on other sites More sharing options...
MishFTW Posted July 11, 2012 Report Share Posted July 11, 2012 While we're on the topic, Unity's Terrain Toolkit has some cool features we could borrow. Nice work myconid Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted July 12, 2012 Report Share Posted July 12, 2012 While we're on the topic, Unity's Terrain Toolkit has some cool features we could borrow.I don't see how we could borrow them since it's not open source We could get some ideas, implementing them is the challenging part.If we implement fancy terrain modeling techniques, why not do so in JavaScript and make them part of the random map generator? Unless it turns out to be a very slow process, but slow processes are annoying, we should make them fast. I've seen some decent terrain generators even in old 90s games. The random maps could certainly benefit from more realistic terrains, no less than Atlas. Quote Link to comment Share on other sites More sharing options...
FeXoR Posted July 13, 2012 Report Share Posted July 13, 2012 I don't see how we could borrow them since it's not open source We could get some ideas, implementing them is the challenging part.If we implement fancy terrain modeling techniques, why not do so in JavaScript and make them part of the random map generator? Unless it turns out to be a very slow process, but slow processes are annoying, we should make them fast. I've seen some decent terrain generators even in old 90s games. The random maps could certainly benefit from more realistic terrains, no less than Atlas.I agree. Keep in mind though that implementing it for random maps means you would have to generate a random map and save it as a scenario to use a random map ability for non random maps. Is there any part of the code that can be accessed by both (Atlas and rms)? Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 13, 2012 Report Share Posted July 13, 2012 SimCity 4 (at least) had a nice erosion script. I'm sure you can find some references online for how they did it. The basic idea is to accentuate small local discrepancies. The problem arises when there is no discrepancy, as you have to create them. To simulate it properly, we'd have to consider the terrain (rock, grass…).I'm sure we could get a nice result for any map in under 5 seconds of computation, which remains acceptable to me. Quote Link to comment Share on other sites More sharing options...
myconid Posted July 13, 2012 Author Report Share Posted July 13, 2012 (edited) I haven't looked into the code, but there's a few things I'd like to see first. Like custom Javascript brushes, for example. I'm thinking we could have a general system where you can select, for instance, the "biome-alpine" brush and paint it over the terrain, and it changes the terrain textures and objects to match that biome. Such a brush system could also be made to modify the terrain in specific ways, with erosion being one of them.Let's say we'll simulate erosion as the carrying of dirt by water as it flows downhill. Here's a super-simple way to model it:Create a temporary texture that is several times larger than the piece of terrain you are eroding (eg 8x) and copy into it the terrain heights, with blurring/filtering to avoid jaggedness from stretching.In each texel store (at least) two values: the interpolated height, and the amount of water flowing through it over time."Rain" water in a Gaussian shape at the middle of the brush. Texels that receive water add it to their water amount.For each texel A that has water in it, find the lowest-height neighbouring texel B that is of lower height than that A.Move water from A to B until their (height+water) values are equal, or A runs out of water.Depending on the amount of water that is moved, move with it a corresponding amount of dirt (lower height of A and add it to B ).Repeat from 3.Heightmap values become the average of the texels' heights. Modify textures based on finer data in texture.This will probably need a separate result texture to do properly, though good news is that all the simulation should be straightforward to do on the GPU. Edited July 13, 2012 by myconid 1 Quote Link to comment Share on other sites More sharing options...
kosmo Posted July 24, 2012 Report Share Posted July 24, 2012 Ok, it's been implemented. In Atlas, File > Import heightmap, you select an image file and bam. Code: https://github.com/m...importheightmapStill pretty basic, though. Always generates a map of the same size, for example, based on the default map, and ignores the parts of the heightmap that are outside those bounds.Forgive my stupidity, but how can I get this working?I downloaded these folders, but obviously this is not sufficient^^Do I need to compile it to get it working? Quote Link to comment Share on other sites More sharing options...
zoot Posted July 24, 2012 Report Share Posted July 24, 2012 Do I need to compile it to get it working?Yes. Also make sure you got the right branch. Quote Link to comment Share on other sites More sharing options...
kosmo Posted July 25, 2012 Report Share Posted July 25, 2012 Ok, I downloaded the branch "importheightmap" and installed Visual Studio 2010 from MSDNAA. I tried to follow the http://trac.wildfiregames.com/wiki/BuildInstructions , but after opening build/workspaces/vc2010/pyrogenesis.sln. in VS I have a problem with "Make sure to select the "Release" configuration to build an optimised, more playable version of the game (the target will be pyrogenesis.exe)." since I didn't find a "Release" configuration in VS and there is no pyrogenesis.exe anywhere (also not in the branch itself.). If I try to compile anyway, I get an error like this: "0x7d4e237e in pyrogenesis_dbg.exe: 0xC06D007E: Module not found."I know I'm annoying, but I don't really know something about programming except LaTeX, so sorry. Quote Link to comment Share on other sites More sharing options...
zoot Posted July 25, 2012 Report Share Posted July 25, 2012 Not annoyed, your approach seems interesting, but I have no clue how the Windows build works. Quote Link to comment Share on other sites More sharing options...
myconid Posted July 25, 2012 Author Report Share Posted July 25, 2012 I've never built the engine on Windows either, but it sounds like something went wrong when you executed update-workspaces.bat. Since you need to build Atlas to use this feature, you need to resolve the wxWidgets dependency first. Did you compile or install wxWidgets? Quote Link to comment Share on other sites More sharing options...
Loki1950 Posted July 25, 2012 Report Share Posted July 25, 2012 I've never built the engine on Windows either, but it sounds like something went wrong when you executed update-workspaces.bat. Since you need to build Atlas to use this feature, you need to resolve the wxWidgets dependency first.Did you compile or install wxWidgets?That is where I hit a wall it seems that wxWidgets2.8 the recommended version has a VS6 project file that will not upgrade to VS2010 solution file.Enjoy the Choice Quote Link to comment Share on other sites More sharing options...
myconid Posted July 25, 2012 Author Report Share Posted July 25, 2012 That is where I hit a wall it seems that wxWidgets2.8 the recommended version has a VS6 project file that will not upgrade to VS2010 solution file.Enjoy the Choice Did you try the pre-built binaries? Quote Link to comment Share on other sites More sharing options...
Loki1950 Posted July 25, 2012 Report Share Posted July 25, 2012 Did you try the pre-built binaries?Not yet so thx for that link Enjoy the Choice Quote Link to comment Share on other sites More sharing options...
WhiteTreePaladin Posted July 25, 2012 Report Share Posted July 25, 2012 On a side note, adding JavaScript support to Atlas should make it possible to use the wall/gate system directly in the editor. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.