City Viewer aka Toy Town 2


City Viewer is released!

City Viewer is a separate application which can build and display a 3D model of a city generated in MFCG. In contrast with its spiritual predecessor Toy Town, it doesn't do procedural generation - the cities you see before importing your custom ones, are generated in MFCG as well, they just come bundled with the viewer.

Is it Toy Town 2?

I used to call this project Toy Town 2, but eventually decided to abandon the name in favour of the plain and unimaginative "City Viewer" because the images it produces doesn't look like toy towns. In some aspects this application is simpler or even cruder than the original Toy Town: no gable roofs, no windows, no trees. It's not a complete degradation though, the viewer is much faster and can handle much larger cities. Also I'm planning to improve visuals gradually, but I'm not sure yet what I am aiming for.

What are the plans for it?

As I said I am going to improve the quality of produced models and probably quality of render. I don't know if anybody really needs it (I mean if anybody has some real use for it, not just to have a look and say "right"), so for now I'll try to focus on stuff which interests me.  For example, if everything goes well, the next release will include the "elevation" option to place a city on a hilly surface instead of a plane. Also this project will be used to test some UI libraries / approaches / ideas, which eventually may be adopted in MFCG.

Comments

Log in with itch.io to leave a comment.

(+2)

Could I use this to import the generated cities into UE4?

(1 edit) (+1)

It depends on what you are going to do with it there. I tried to export the model as OBJ (link). It's trivial, so I'll probably add it as "documented" feature, but I'm not sure it's useful for anybody.

(1 edit) (+1)

If it's not too hard to add, I for one would certainly like it for map making.

Edit: Especially if you incorporate your mansion generator!  Not sure how hard it would be to do though.

(+1)

I'd find it useful for sure. I don't particularly like white boxing or level design, so if I can just plop down a city as a testing bed for whatever I'm working on that would be really cool.

(1 edit) (+1)

This is pretty cool! Have you considered CityJSON (https://www.cityjson.org/) over (or in addition to) GeoJSON export? Using a standard specification for city buildings should lead to better interoperability between different tools!

I'll take a look, thanks! But right now it seems to me that I'll have to switch to some custom (JSON-based) format.

(+1)

Love your stuff! Could you combine this with your mansion generator in some way? That way we'd get gabled roof geometry too?

The mansion generator was created with this use in mind, but in practice it's not easy to implement and performance is just one of the problems. 

(+1)

Makes sense. I, personally, wouldn't worry much about performance. I'd be using it for generating images to paint over in photoshop.

(+2)

This is great! Is there an option to export to STL so I can 3D print my generated towns?

Thanks! At this moment I'm not planning to add more formats to export, but this may change in the future.

(+1)

I have exported a medium city as JSON, but how do I get it into City viewer? I have tried Crt C then Crt V, but nothing happens.

Drag and drop the exported JSON file to the viewer.

and import it here (by dropping the file onto the viewer)

I tried this, and got this: (shorthened for space, and no pic at all.

{  "type": "FeatureCollection",  "features": [    {      "type": "Feature",      "properties": {        "id": "values",        "roadWidth": 0.00007207207207207208,        "towerRadius": 0.00006846846846846847,        "wallThickness": 0.00006846846846846847,        "version": "0.7.4",        "riverWidth": 0.00030589267170456956      }    },    {      "type": "Feature",      "geometry": {        "type": "Polygon",        "coordinates": [          [            [              -0.011786272398350993,              0.0007293488994151453            ],
(1 edit)

Er... are you sure you are dropping the file on the generator itself, not somewhere else on the page containing it? (I don't have an app to capture a video how it should look)

Anyway, I'll try to implement a more obvious way to import maps, this one causes too much confusion.

(+1)

I have worked out what I was doing wrong. Boy, it is FANTASTIC. Now a 3D view of my generated city, from which I can take multiple snap images, and lead my players along 3D streets. This tool has become just fantastic.

What did you do? I dropped it directly onto the view and nothing is working.