Page 2 of 84 FirstFirst 12341252 ... LastLast
Results 16 to 30 of 1257

Thread: [Tool] NITROGEN , a random world generator for 7DtD

  1. #16
    Colony Founder Damocles's Avatar
    Join Date
    May 2018
    Posts
    1,162
    Rep Power
    1
    Quote Originally Posted by mrsquish View Post
    Hey mate,

    Looks really awesome, I'm definitely going to download and try.

    Hey, I'm up to doing the road generation in my program, could you share any insights as to what to research for the path finding? Like is the algorithm called something specific? Also, it looks like you're using some kind of erosion algorithm? something I've also struggled to find a decent example of.

    Cheers mate.

    [Edit] Yeah, nevermind on the path finding, what kind of name is A*!!
    Not used here, but a very interesting demonstration of using erosion on a Unity terrain ... if you want to try out dynamic erosion.

    https://www.youtube.com/watch?v=eaXk97ujbPQ
    and the github source:
    https://github.com/SebLague/Hydraulic-Erosion

    ---

    For A* there are lots of tutorials. Its quite straight forward here:
    -have a hightmap representation in memory
    -scale it down to a usabe size (I have used a quarter of the hightmaps resolution)
    -mark the position of POIs and other areas that should be avoided (by increasing the hightvalue on those areas)
    -make a path between POIs (between towns), the heuristic used here are distance and elevation change.
    -follow the path, and smooth the terrain along the way on the original hightmap
    -in parallel draw the road splatmap pixels (there are only 2 road texture types I know of, so 2 pixel colors for the splatmap). There are some random pixels left out to make it a bit more jagged and looking overgrown.

  2. #17
    Refugee
    Join Date
    Jan 2017
    Posts
    22
    Rep Power
    0
    My daughter downloaded your map generator last night, and we played a multiplayer game for a few hours. Thanks for sharing this - it's so much nicer to start a map knowing it's not going to end up being over half burned and wasteland. It did take a while for me to download the map once she'd started it, but it worked just fine.
    The ground outside the settled areas is quite... rugged. Some high hills/mountains, yes, but also just a lot of bumpy ground. Not necessarily a bad thing, mind you, but it made running across the wild areas visually challenging.

  3. #18
    Hunter
    Join Date
    Nov 2013
    Posts
    104
    Rep Power
    0
    Quote Originally Posted by Damocles View Post
    Not used here, but a very interesting demonstration of using erosion on a Unity terrain ... if you want to try out dynamic erosion.

    https://www.youtube.com/watch?v=eaXk97ujbPQ
    and the github source:
    https://github.com/SebLague/Hydraulic-Erosion
    Yeah, I found that repo too, downloaded the source (it's mostly the Erosion.cs) and then tried to apply it to my bitmap code, but it took some tweaking to get it to compile, and then doesn't seem to work. Like, it doesn't seems to erode properly, so I'm not sure. I might have to write it from scratch, which wouldn't be a bad thing I guess as I'd fully understand what's going on.

    Quote Originally Posted by Damocles View Post
    For A* there are lots of tutorials. Its quite straight forward here:
    -have a hightmap representation in memory
    -scale it down to a usabe size (I have used a quarter of the hightmaps resolution)
    -mark the position of POIs and other areas that should be avoided (by increasing the hightvalue on those areas)
    -make a path between POIs (between towns), the heuristic used here are distance and elevation change.
    -follow the path, and smooth the terrain along the way on the original hightmap
    -in parallel draw the road splatmap pixels (there are only 2 road texture types I know of, so 2 pixel colors for the splatmap). There are some random pixels left out to make it a bit more jagged and looking overgrown.
    Yeah, since posting I did some reading on it. And I can see why it would be slow. Even still I'm going to give it a shot.

  4. #19
    Colony Founder Damocles's Avatar
    Join Date
    May 2018
    Posts
    1,162
    Rep Power
    1
    Quote Originally Posted by ZanySerendipity View Post
    My daughter downloaded your map generator last night, and we played a multiplayer game for a few hours. Thanks for sharing this - it's so much nicer to start a map knowing it's not going to end up being over half burned and wasteland. It did take a while for me to download the map once she'd started it, but it worked just fine.
    The ground outside the settled areas is quite... rugged. Some high hills/mountains, yes, but also just a lot of bumpy ground. Not necessarily a bad thing, mind you, but it made running across the wild areas visually challenging.
    Good to hear that you both had a good time.
    That what I make those tools for.

    You could generate a random map without the rough terrain (only mountains, flat land and forests). Thats the advantage of having configuration options in an RWG.
    And also place more or less POIs, depending on how much you want to spend on walking through the terrain.

    Wasteland and buring forest biomes are not generated. I just dont think they are making the game any better, and basically just annoyed me, every time I was in them.
    i could add maybe a few small patches of burned forest here and there...
    Last edited by Damocles; 04-05-2019 at 11:49 AM.

  5. #20
    Colony Founder Damocles's Avatar
    Join Date
    May 2018
    Posts
    1,162
    Rep Power
    1
    Updated to v0.12 - same download link

    -new country roads (gravel) between towns (more roads overall now)
    -more efficient road generation
    -additional setting for landscapes with a more balanced default (more flat land, less rough terrain)

  6. #21
    Colony Founder Damocles's Avatar
    Join Date
    May 2018
    Posts
    1,162
    Rep Power
    1
    Updated to v0.121 - same download link

    -more roads overall
    -some changes in default preset (8k singleplayer map, more flat land, less rough)
    -player can spawn a bit closer to town/city when spawning far away
    -some changes to the prefabs list
    -more junk for rednecks


  7. #22
    Refugee
    Join Date
    Jan 2017
    Posts
    2
    Rep Power
    0
    Hi

    I try the V0.121, I have no problem to generate 4k Map (in less than 1 minute) but for the 8k it seems that there is a problem after 1h still nothing.
    The program is stuck in running terrain generation .......

  8. #23
    Tracker
    Join Date
    Oct 2016
    Posts
    160
    Rep Power
    0
    Just tried this out and I wish TFP came up with something like this Works like a charm and maps looks great!

  9. #24
    Colony Founder Damocles's Avatar
    Join Date
    May 2018
    Posts
    1,162
    Rep Power
    1
    @Bhaaltazar, thanks for the feedback, that everything worked correctly.

    Its a different approach how to generate the world, than the included RWG. It gives me more control about the look of the landscape, and placement of specific settlement types (cities, towns, farms, trailer parks, mountains huts). I could easily add a grand canyon type landscape, or volcanos, or a south asian limestone mountains + blue sea type of area. (If there where the biomes and water for that)

    The noise-map based approach of the vanilla RWG turns out to be very hard to handle. Its a tad too random for deliberate landscapes. The noise function based type of terrain generation works better for very large random worlds (flight sim, space sim), not so much for relatively small areas traversed in first person.
    Last edited by Damocles; 04-09-2019 at 02:30 AM.

  10. #25
    Colony Founder Damocles's Avatar
    Join Date
    May 2018
    Posts
    1,162
    Rep Power
    1
    Quote Originally Posted by BSPhoenix View Post
    Hi

    I try the V0.121, I have no problem to generate 4k Map (in less than 1 minute) but for the 8k it seems that there is a problem after 1h still nothing.
    The program is stuck in running terrain generation .......
    Does the generator complain about files already being in the directory? Its a safety check that can be turned off.

    If not, this might be a case of Java running out of heap-memory. Its quite memory intensive to process the data. An 8k map should be done in about 3 to 5 minutes with the default settings.

    Try starting the generator using the commandline option / edit the .bat startscript:

    java -Xmx2G -jar nitrogen.jar

    or even

    java -Xmx4G -jar nitrogen.jar (for 4 GB of allocated memory)


    ---

    If java complains about that, you might have the 32 bit version of it installed. In this case you would need to upgrade to a 64 bit Java to generate the large maps. (4k maps are quite ok for a singleplayer game though, as the world can be populated more densely).
    Last edited by Damocles; 04-09-2019 at 02:29 AM.

  11. #26
    Colony Founder n2n1's Avatar
    Join Date
    Oct 2015
    Location
    Alpha 9.3
    Posts
    2,157
    Rep Power
    1
    Quote Originally Posted by Damocles View Post
    It's a beautiful view...

    I take it You don't have a city street generation right now?

    By the way, everyone loves the mountains?
    Unnatural mountains - the most common trouble of all generators.
    In 16 alpha i did the generator settings that removed such high mountains - and it looked so natural!
    It is not even necessary to make them low, but you need to make gentle slopes, and when the mountains are less common in the journey - they cause more admiration.
    Otherwise, everything I've seen always looks like an extraterrestrial landscape in the distance.

    Perhaps You should make it a standalone utility as soon as possible.
    I understand that the convenience of programming is important for You now...but...You need to come up with something
    Last edited by n2n1; 04-09-2019 at 11:18 AM.

  12. #27
    Refugee
    Join Date
    Jan 2017
    Posts
    2
    Rep Power
    0
    Hi Damocles

    Thank you for the soluce, it works properly now (with the 64bit version of java)
    Map 8k generated in less than 3 minutes.

  13. #28
    Colony Founder Damocles's Avatar
    Join Date
    May 2018
    Posts
    1,162
    Rep Power
    1
    Quote Originally Posted by n2n1 View Post
    It's a beautiful view...

    I take it You don't have a city street generation right now?

    By the way, everyone loves the mountains?
    Unnatural mountains - the most common trouble of all generators.
    In 16 alpha i did the generator settings that removed such high mountains - and it looked so natural!
    It is not even necessary to make them low, but you need to make gentle slopes, and when the mountains are less common in the journey - they cause more admiration.
    Otherwise, everything I've seen always looks like an extraterrestrial landscape in the distance.

    Perhaps You should make it a standalone utility as soon as possible.
    I understand that the convenience of programming is important for You now...but...You need to come up with something
    Cities also generate streets of course. Its nessecary for gameplay reasons anyway (certain resources).





    The mountains: the game only allows terrain hights from 0 to 255 meters. Since some POIs have extensive underground areas, the normal hight of flat land is at 35 meters. So there is not much hight to play with. Realistic Alpine mountains would not work anyways.
    The player can turn off each landscape type in the settings, if needed.

    Also: since its a first person game (walking around), the scale of the world and its features need to be compressed compared to realworld landscapes. Skyrim is a good example of this. Everything (mountains, lakes, rivers) is actually very small, but seams huge from a distance to convey a scenic look and have enough variation in the landscape.

    Each biome is used in a specific landscape type, and not randomly placed onto the terrain. I think thats visually more pleasing and plausible, than random blobs of biomes.
    Last edited by Damocles; 04-09-2019 at 02:43 PM.

  14. #29
    Refugee
    Join Date
    Mar 2019
    Posts
    8
    Rep Power
    0
    Hi there, I was wondering is there a way to access settings on your rwgmixer or are you gonna add more options for landscape, I created mountains and flatlands and maps are 80% or more high mountains, can we adjust the ratio or make desert/forest/mountain maps somehow? I would also like to add big or huge lakes instead of many small ones.

  15. #30
    Colony Founder Damocles's Avatar
    Join Date
    May 2018
    Posts
    1,162
    Rep Power
    1
    I can add more variety in the future. The landscape dropdown has a variety of predefined mixes, that turn on an off more or less of the features.
    I can make that ratio more specific on future versions.

    Whole new landscape types would have to be made too, but that takes a bit more effort.
    Things like swamps, high green mountains, very deep canyons on a high desert plateau.

    I have not finished implementing big lakes (7DtD is quite picky about water flooding the level if not placed correctly, so that has to be done carefully).
    There are lots of smaller lakes - at different elevations - dotting the landscape, to have a source of water available in all areas.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •