Giter Site home page Giter Site logo

chauncey-liu / proceduralcity Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pboechat/proceduralcity

0.0 1.0 0.0 37.4 MB

Unity demo that uses a few tricks to build random nice-looking 3D cities

JavaScript 29.07% C# 33.20% ShaderLab 37.53% HLSL 0.20%

proceduralcity's Introduction

Procedural City

Procedural City is a demo that uses a few tricks to build random nice-looking 3D cities.

Screenshot


Idea

First, neighborhood blocks are randomly placed in an irregular rectangle grid.

Irregular Grid

Then, building allotments are packed inside blocks using this bin packing algorithm. Bin packing uses a heuristic that tries to maximize edge contact for "bins". This leads to better fitting of allotments along block edges. Once blocks are filled, non-edge allotments are discarded.

Bin Packing

Buildings are extruded from allotments and their façades decorated by two pattern matrices. Pattern matrices are picked from one of six achitectural styles (art deco, art noveau, brownstone, chicago old school, international and modernist). One pattern matrix implements simple block extrusion/exclusion to be performed in the façade geometry. Another determines which element (e.g., window, door, column) should be appended where in the façade. Details (e.g., headers, rails, firestairs) are randomly selected according to the defined achitectural style. Finally, some common props (e.g., chimney, water tank) are scattered around the rooftops.

Building Generation

Download

Windows

proceduralcity's People

Contributors

pboechat avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.