This is not a city generator, this is a city viewer! It comes with 6 built-in settlements, but to see something new you'll need to generate a city in MFCG (or a village in VG or a neighbourhood in NG), export it as JSON and import it here.

Right-click anywhere on the generator to access the context menu with all the actions and options.

Hot keys:

  • Enter: load another built-in city.
  • 1, 2, 3, 4: switch to one of 4 viewing modes
  • 5, 6, 7, 8, 9, 0: switch to one of 6 colour and lighting modes (styles)
  • G: toggle gable roofs
  • W: toggle windows
  • T: toggle trees
  • X: export the model to .obj

More keys:

  • ~: toggle auto-rotation
  • Shift+1: switch to the fly-through mode
  • Shift+0: switch to a random colour and lighting mode (style)

Use W, A, S, D, +, - and arrow keys to navigate around.

Made with Haxe + OpenFL + Away3D.

StatusIn development
CategoryTool
PlatformsHTML5
Rating
Rated 4.8 out of 5 stars
(124 total ratings)
Authorwatabou
Made withHaxe, OpenFL
Tags3D, City Builder, Generator, mfcg, Procedural Generation
Average sessionA few minutes
InputsKeyboard, Mouse, Touchscreen
AccessibilityColor-blind friendly, Textless
LinksBlog, Patreon, Twitter

Development log

Comments

Log in with itch.io to leave a comment.

Viewing most recent comments 1 to 40 of 71 · Next page · Last page
(+1)

Hi. I can’t see where to paste the json file. 

Right click anywhere to open the context menu and choose "Load JSON..."

(+1)

Hey watabou! I just want to say first, these tools are absolutely amazing! I used this along with the village generator and alot of other tools to make cool towns in Minecraft. In the process of doing so, I found some things that would make the viewer (and specifically the export as obj function) a lot more useful if added. I'm not sure how many of these you have already heard, but it's worth a shot.

First, the paths. I noticed that a lot of the things shown in the viewer don't actually show up in the obj export, but the paths stuck out to me as something essential to the layout of the towns that just wasn't there. So, whether its just a few connected points showing where the paths are supposed to go, or fully wide like shown in the viewer, implementing that would help quite a bit. 

In a similar vein to the paths, it would be useful if water features could also be exported. Though, they may look similar to paths, so that's where this next point comes in.

It would be nice if there was an option when exporting to have the roofs, house walls, town walls, and possibly path and water exported separately, whether that be as different obj files or as different objects in the file; I'm not exactly sure how obj files work. This is because, if you try to import the file into Blender or another 3d modeling program, you currently have to manually seperate all of the parts to change their color or material.

Chimneys would be another great addition, but purely for aesthetic. They could probably be populated onto the roofs somewhat similarly to trees.

Another slight quality feature would be an option to randomize the roof type and pitch for each individual house. This would make them look slightly more realistic and interesting to look at.

Similarly, changing the size of windows on each house would be a great feature to add. This has the same reasoning as the previous suggestion. 

On the topic of windows, I thought it was kind of odd how there is an option for what percent of windows are lit, but not for how many windows in general there are. It would work basically the same I think, just removing a certain percent of the windows. This also has the same realism and interest reasoning.

Just one more thing about windows. This may or may not be a bug, I'm not sure, but in the obj export, windows that were lit become holes in the wall. I thought this might be a bug because the unlit windows still had geometry.

This one you've probably heard a hundred times, but it would be nice if there was an option to have something like the mansion generator implemented into this to give the houses more interesting shapes in 3d. I know you can do something similar with singular houses in the city generator, but having the option to do that in bulk would add a whole new layer of depth. 

Wow this got a lot longer than I was intending, sorry about that! Thank you for reading this, have a nice day!

That's quite a lot, I appreciate it :)

(+1)

hi , watabou, thanks for your tools , are userfull for rpgs.

I test , not with village generator , but with city generator json and , very good. 

two things for my feedback :

+ one the city viewer isn't on procarena card set. ok is seven card , but is used for rpg export city and , as me, make a adventures for ttrpgs. please add it.

+ second the city gen json on city viewer and village , import is perfect. thanks, but beyond the export obj , with blender is perfect , but why add , the my idea, export on stop animation , svg or png ? i take screenshot ok. But a menu inside the right-click is also plus fast :)

thanks ;)

(1 edit) (+1)

This is really cool and very useful.

Couple of little suggestions... Would it be possible to add a pause/play key for the animation? For example, hitting the space bar. It would make it much easier to stop the rotation animation (instead of using the menu) when it is just right to get a nice view of the settlement. Edit: Scratch that. Just worked out how to use fly mode to get any view I want :)

Also, what about a tree option for mixed conical and ellipsoid trees?

Are you intending to take account of ground elevations at some future point? For example, to generate 3D ground from the ground contours in Village Generator. This is not a feature request, just curious.

(+1)

It's easy to implement a mixed forest, but I doubt it will improve the resulting look as it won't be a realistic forest consisting of different types of trees, but just a chaos of cones and ellipsoids :)

Implementing elevation is trickier. I tried this before, but there were too many issues. Probably I'll try again when I finally decide to remake this whole thing using some more modern technology.

(+1)

Help City Build Are Not Loading When I Upload A .json File

What happens when you try? Does this happen to all your JSONs or just a particular one? Do the sample settlements (the ones that load when press Enter) work normally?

(+1)

Yeah Only Ones That Are Very Large

Well, then probably it's just that: your maps are too large. You can try a different browser though.

(+1)

I am trying to parse through your JSON to get the coordinates of the buildings, but unable to do so. I want to recreate your city in unity with gameojbects. Do you have a solution ?

I can't offer a solution because I don't get what the problem is:) What do you mean by "unable to get the coordinates"? You can't locate them within a file?

(+1)

In case anyone is interested, I have added links creating townships in Procgen Arcana to my fictional placename generating spreadsheet in:
https://railstuff.000webhostapp.com/Ortsnamen-rib.html

(+1)

Your tools are so awesome! For some reason though the viewer doesn't accept any of my keyboard input anymore. Only mouse clicks and movement have an effect. As far as I remember it has worked before.

Is it still not working for you? Are you sure you didn't change the language on your keyboard or something like that? This app was last updated several months ago, so this can't be something recently introduced.

(+1)

Ooops ... I guess it's fine. I forgot that I had to disable auto rotation ~ first to make the navigation work. I was confused by the double assignment of "W" for toggle and navigation, but after ~ I was able to navigate as expected. Sorry for the confusion.

And thank you for sharing your creative and unique experiments with us!

(+1)

Hi, I also got the bug that the json file for cities only shows castle and walls.

I read your reported solution but can't manage to find the path you suggested.

Have you any idea on what mught be wrong?

Nvm, I solved it, thanks!

(1 edit)

Could you send me the json file you are trying to load?

Edit: ah, you solved it, cool:)

(+1)

When I load json, I only get the castle and the walls... no buildings.

(+2)

Looks like a recurring problem, I'll try to fix it (again).

(+1)

My god your a legend!

(+1)

Looks interesting. Might come in handy sometime.

(+1)

How export the entire map, not only the buildings?btw, Really nice tool!

Currently only buildings and city walls are exported. I'm planning to fix it in the future ("for completeness"), but actually everything else is flat there, so I don't why would anybody need it :)

(+1)

The placement of the trees and other stuff would be nice.

(+2)

I agree with Felipe. Having everything exported would be excellent and a great time saver when trying to recreate and add details to any kind of settlement in, for example, Blender. And yes, I know it is also possible to import a PNG to use as a ground map for the placement of things, but having everyting as 3D objects would be awesome. Having said that, I totally get that time is a resource and you probably have other things to do that you find more interesting!

I think all these random generators you have done are amazing and thank you for making them available to those of us that do not have the skills to create such utilities.

(+1)

I am having old issue - trying to import a city from MFCG and it appears without buildings. Could it be a problem of a custom city size? (my city has size value of 110)

I doubt it. Have you tried this fix https://www.reddit.com/r/FantasyCities/comments/11jwlmw/comment/jbtr4ou/?utm_sou...?

(+2)

It didn't help. However, i tried different combinations, so the buildings were shown only if the "Show Windows" is turned off.

(+1)

First - Really love this tool for visualizing neighborhoods.  Being able to navigate the streets and such is just great.  That said, would it be possible to add doors to the buildings?

Doors will be added eventually. 

Awesome.. can't wait!  Well, I mean, I can, I just don't want to :)

(+2)

When I try to import a json from a city made on MFCG it just show the error "No Buildings", but when I try VG or NG the city is correctly imported.

Yeah, I broke the json export in the last update, but it's fixed already.

(+2)

Unfortunately when I try to import from JSON it loads in but no small buildings appear. No error message that I can see though.

(+2)

Love the tool! Is there a way to make the exported obj more manifold? The windows seem to be fairly loose geometry, and none of the buildings have floors. Making it require a lot of extra work to make models out of the city. This is doable for smaller villages, but for a large city its not. 

Also, are terrain features contained within the obj? Any things I export are only buildings. 


Great tool though! Helps 

(+1)

I get the problem and I'll try to do something about. It works like this because Away3D (the 3D engine I use) is very old, slow and glitchy, and with it every triangle counts. So when visualizing large cities, omitting floors (and similar tricks) really helps to keep fps reasonably high.

(1 edit) (+1)

What is the proportion of the exported OBJ? How many times do I need to import Blend to be the same size as the actual one?

I'm sorry, I don't understand what "proportion" means in this context. If you are asking how much an exported city needs to be scaled to be the same size (e.g. in metres) in Blender as  it is in MFCG (according to the scale bar), then my answer is "I don't know". It depends on how Blender treats coordinate values in OBJ, which are defined in abstract units (as far as I know), not in meters, millimeters, inches or anything like that.

(+1)

Just wanted to say this is very great and thank you!

(+2)

SO much awesome here.  I exclusively use all of your different map generators to run my entire campaign, and my players are constantly blown away by the amount of detail I'm able to give them in the game.  I just joined you on Patreon, and you'll see you're the ONLY person I'm on Patreon for.  So yeah, LOVE your work.  

Here's some wish-list items for the 3D Generator if you have time:  

1.) The OBJ export: Export in separate material groups so when we pull it into something like Blender, we can add a good bit more detail (different roofs, walls, tree textures, etc.)  Also export it with the ground groups so we can see the roads/farms.  

2.) In animation mode, allow us to adjust (slider maybe?) rotation speed.  

3.) Allow us to have the buildings cast shadows.  (Should be doable on beefier machines.)  

4.) Randomize building colors similarly to how the roofs are slightly randomized.  

5.) If the "center" of rotation/screen could be adjusted with a single-click, we could just use this live in-game as a living 3D map of where players are currently located.

Most of this could be handled by ourselves if the first option (OBJ advancements) were an option.  We could then import the more advanced objects into Tabletop Simulator to PHYSICALLY walk the players through the city, even giving them "line of site" fog of war.  Some epic stuff could be done with that.  

Again, love your work!  Thanks for creating so many awesome tools!

(+1)

Short (and very belated, sorry about that) answer: all of your suggestions make perfect sense, most of them I'll try to implement, and some of them were already on my list.

(2 edits)

Hi there. Great app. I have some feedback and suggestions.

1# When trying to open a json file to load a map made in MFCG it doesn't show any json files, you have to change the file type within open file window from custom to All. I suggest by default it will have all or json so we dont have to do that. Also a new user might not think to choose ALL.

2# When switching from map mode to ground mode, it would be great if the center of the screen is where the ground mode will start. So if you are zoomed all the way in and switch to ground mode it will start where you are on the map more or less. Making it easier to find a place you want to explore from in map mode first.

3# When in map mode, zoomed out would be handy if you could double lmb somewhere on the map and the screen will center the map there, which would work in tandem with suggestion #2

4# On the rmb menu, would be nice to have preset dawn, morning, afternoon, night to change to. I know there is hotkeys to randomly change lighting. But being able to use presets would be useful too.

5# In map mode it would be nice if we could export as PNG (perhaps this will appear where export as .obj was when in map mode) this way we could gen a city within the app and export it without having to use MFCG)

> Question: Why is it when you press 5 and press it again and again the roof tops change size etc. I notice it is changing colors of some roofs to light or darker shade, but also sometimes lowering the size of the roof or raising it. Unless it is the trick of the eye?

Pressing 6 causes the lighting to change but all the gables or roofs disappear entirely. Keep pressing 6 and its just lighting changes, but the trees can shrink or get bigger. Roofs do not reappear.

This all might be intended. 

  1. For me it works normally. It may depend on the browser, which one are you using?
  2. This makes sense, I'll try to implement it.
  3. I would rather expect the map to zoom in when double-clicked (as in Google Maps), but I'll think about it.
  4. Adding presets to the context menu seems excessive to me. You can use the Style dialog or shortcuts (5, 6, 7, 8, 9, 0) for choosing one of them.
  5. The whole point of replacing Toy Town with City Viewer was to decouple generation from visualizing, so no, City Viewer won't be able to generate cities. Besides, City Viewer is used not only to display cities, but also villages and neighbourhoods.
Why is it when you press 5... roof tops change size etc...?

Exported cities contain only some of the information required to build a 3d model of it (e.g. building ground plans). Other information is generated in City Viewer itself: individual roof pitches, walls colour variations etc. When you switch a preset by pressing 5 (or 6, 7, 8, 9, 0) all this information is generated anew resulting in slightly different values.

Pressing 6 causes the lighting to change but all the gables or roofs disappear entirely...

Lack of gable roofs is a part of Desert preset. Choose any other preset to get gable roofs back or enter a non-zero value for Roof pitch in the Style dialog to keep the colours and lighting and get non-flat roofs.

(+1)

Love the heck out of this tool. Any chance for the trees to be included in the .obj export?

I will add it as an option 👍

(+1)

Will you ever make your stuff downloadable?

https://www.reddit.com/r/FantasyCities/comments/wi0euz/feature_request_desktop_a...

(+1)

Reason why i would like to be able to download your stuff is because for me it runs kinda badly for me atleast..

How badly is that? Are there any glitches or the framerate is low or...?

(1 edit) (+1)

Bit glitchy on my end, but on my friends computer in browser it runs fine.

(+1)

Any chance it would be possible to have a scale factor for building heights? Between that and removing the gable roofs it would make for a great modern downtown generator!

(+1)

I'll think about it 👍

(1 edit) (+1)

Couple things: how do you export JSON file from MFCG?

Also for the City Viewer I would love the ability to get the whole scene when exporting not just the buildings.

PS. I'm loving all your tools! I'm using them as blockout tool for Unreal maps. Also I'm thinking the Village generator map image would make beautiful in-game map and/or image for a in-game "you-are-here info-stand".

Settlement > Export > JSON

(1 edit) (+1)

Doesnt work when i try to import just says there are no buildings

Could you post your json content here if it's not too big (it should not be if there are really no buildings) or send it to me via email?

(+1)

This looks amazing! I have a question/feature request though: Do you have plans to support OSM files? Alternatively, if I convert an OSM file to a JSON file using ogr2ogr, will the City Viewer support it?

There's a mod for Cities Skyline that exports an OSM file of a city, and I wanted to see if I can't convert the OSM file to a JSON file and then have your City Viewer generate me a 3D model that I can then take into Tabletop Simulator or FoundryVTT via the 3D Canvas.

I am sorry but the answer to all these questions is no. Currently I am not planning to support any osm formats because I have zero knowledge about osm and converting osm xml to json won't help because json the City Viewer requires is generated only by the applications of the Procgen Arcana family. Maybe one day someone will make a converter from osm to this custom json format...

By why do you even need the City Viewer? This is just a minor tool to support the city generator and other generators of mine. Aren't there better applications capable of exporting 3d models?

(+1)

Fantastic tool! Can we export with materials?

(+2)

Thanks! Initially I was going to implement materials (like in Procgen Mansion) in 1.2.0 but then chose to postpone it for later not to spend too much time on a single update. Hopefully this will be added in the next one.

(+1)

That’s great news! I’m hooked :)

(+1)

This doesn't seem to be working today - all black screen

(1 edit)

For me it works normally and last time it was updated more than a year ago, so it's not like I uploaded something broken recently. All these WebGL applications (City Viewer, Procgen Mansion, Castle in The Mist) are pretty unstable and sometimes they stop working without obvious reason and there is no way (or I don't know how) to fix it. Usually restarting the browser helps.

(+1)

awesome tool! one problem, though - it says you can use .json files from the village generator, but i've tried two different files and neither have loaded any buildings. Help?

It still works for me so chances are you loading wrong jsons (palettes?). You can send me one so I could check it if you want (watabou@gmail.com).

(+1)

I've been having the same problem -- it's just blank for JSONSs created with the Village generator.

Also everything you make is breathtaking! Thank you for all your work!

(1 edit) (+2)

really nice tool but can you update the export to include floor,trees, water and farm land.

(+1)

This is one of the planned features for the next update.

(+2)

thank you for the hard work

(+2)

It's extemely nice.

I have a little suggestion. Could you add a feature so that I can move quickly when 1 viewing.

For example, press "Shift" to move at five times the speed

Will do on my next iteration with this app 👍

(+1)

This program is amazing, but I seem to be having trouble importing my json of the city I made on the city generator. Whenever I try, it says "No buildings!" and returns to the sample city. Any ideas on how I can fix this?

Are you sure you are importing the right json? I mean not some palette json or something like that? Could you send me the file so I could check it? Or maybe just paste it here if it's small enough?

(+1)

I thought I was doing it right- here's the file. https://drive.google.com/file/d/1-LS-mMnuAqgBuXCz6BQk8bXt8gZgItq8/view?usp=shari...

Nope,  it's not a city json. It's an ImageMagick's json ("version": "ImageMagick 7.0.10-58..."), something like a description of an image (a city map I guess) with its dimensions and other stats.

(1 edit) (+1)

niceeeeee

I'm currently on this WIP: (render result) & more recent version (2+ days) [HERE] (For some reason i the second ver tha grass got some horrible coastline bugs) and wdytai?, it's pretty hard to put those lights in the houses, soon i'm planning to put some light source windows there and textures, even if i still haven't managed to get them right ever xDDD

It's a great program, it's very pleasing in my opinion to make towns and this makes it a lot easier, thanks xD

Very cool! That's how I hope to make it look right in the City Viewer in some very distant future. I'm talking about the first render, because there is no chance I'll be able to implement as many details as on the second one :)

Recently there were a couple of requests for OBJ export with materials. I'm planning to implement it in the next update and hopefully it will make working with exported models easier.

(+1)

yeah, i know what you mean there, also it would be impossible to put grass on obj, as it makes many pc’s (mine included) to go to it’s very limit xD

also i know that making the materials for this is hard, let alone puting materials in surfaces on blender is enough”ly” hard, i can’t come to imagine how hard will it be to implement material adding on haxe.

still you are the best, you actually make it easy, not like probableTrain, that made a good algorithm, but ruined it needing to add bools on stl files, wich is extremely conflictive

(+1)

Is there anyway to export the colours along with the OBJ?

https://itch.io/t/1412674/export-obj-with-material-types-mtl-file
(+1)

Thanks. Fortunately its quite easy to select all the rooftops with a top-down view so that's a quick way of separating roofs from walls.

(+1)

I love export option! In fact i even did this render of city i exported, althought i have found some small issues model.
1) City wall exits have faces that are clip through each other
2) Walls also can be cliped inside themselves sometimes, it is pretty annoying
3) There are long random triangles where the roads shoud be, but it is very rare, i had this glitch only once
Anyway, here is my render of cardboard city generated with your wonderful tool

First of all, this render of yours is VERY cool! Can I share it on my Twitter (with credits of course)?

About those issues - that's how the viewer works. I don't have many tools for procedural mesh generation (in Away3D), so, for example, a gatehouse is just three boxes combined without trying to clip anything. I probably can (and should) fixes gatehouses, but walls are harder. If you take a look at exported mansions you'll know it can be much worse :)

(+1)

Thanks! Yes you can share my render. If gatehouses made out of three cuboids I think it can be fixed by moving top of the cuboids down.

(+2)

Everybody likes it: https://twitter.com/watawatabou/status/1390042322855989251 :)

On my next iteration I'll remake gatehouses properly. This 3-boxes thing is copied from Toy Town. It was more or less my first 3D app ever, I can do a bit better now.

(+2)

So for all People Going crazy and having a Problem with the Normals, Export the Obj. to Blender, Go into Edit Mode, Press 1 for Vert, then Press F3 Type "Merge by Distance" then do a Merge by Distance and Shift N to recalculate the Normals should be Fine then.

(+1)

So I made an fbx out of one of my cities I created and passed it to unreal and unity and when they come out they appear concave and completely broken? I am kinda new to all this rotin tottin exportin and wanted to know what am I doing wrong how could I fix it?

  1. I know nothing about Unreal.
  2. I know roughly the same amount of nothing about Unity, but at least I have it installed. Indeed, it looks like all the normals are wrong (flipped). Probably Unity expects a different vertex order or axes are supposed to be oriented differently? Anyway, you'll need to flip the normals of your model, but I have no idea how to do it in Unity.

try importing in URP for unity and add new material to the FBX then play with it

(+2)

I'd love to have the option to load predefined textures. Grass, sand, water, fields, rock/brick walls...

(+2)

Apologies if I am being stupid but when I import my city into the viewer it only displays the castle/temple - every other building is missing. Is there a setting I need to tweak or is this done by design?

Cheers and gratz on the great work.

(+1)

That's weird. This is the second report on this issue, but I can't reproduce it. Could you send me your json file?

(+1)

Happy to but where shall I send it? :-)

(1 edit)

watabou at gmail com

I thought it's displayed somewhere here :)

(+1)

Same here, Just press enter to reload it.

I've found what causes this problem and it will be fixed in the next update. Until then, you can make the export work by choosing any value in Style > Buildings > Shape (Block/Off/Simple/Complex).

(+1)

Thank you that was quick work :-)

(+1)

Hey, I'm also having issues loading my Really Big Map, but there's no such thing as a "shape" menu in the Buildings section. It doesn't exist?

It does, it just is not labeled. The last item on the Buildings tab, a "combo box" with values "Block", "Off", "Simple" and "Complex".

In the city viewer? The only options are "roof pitch" and "towers".

Ok, here is a clarification: that option is in the city generator :) 

The problem is with the export, not with the import. City Viewer is all right.

Viewing most recent comments 1 to 40 of 71 · Next page · Last page