Name: Procedural Architecture Grammar
Summary: Grammar based system for automatic procedural building generation.
Scope: Module
Current Goal: Read custom grammar files; refine the system.
Phase: Implementation
Curator: Skaldarnar, sdab
Related: Villages and AI Concepts, Preview Renderer, #123, Wiki
The Procedural Architecture Grammar (PAG) is a grammar based system for generating buildings and other architecture related stuff. The building's general appeareance will be defined via a grammar file (*.pag), containing production rules for the automated generation process.
The principles of operation are scopes and shapes. Scopes restrict shapes along the three axis and contain a shape. The derivation process starts with a rough bounding box for the building as scope. This bounding box is dependent on the parcel the buidling is going to be placed in (namely width x height x depth).
Each production rule describes a modification of the current scope. For further information have a look at the wiki page.
Edit (06-20-13): You can find the grammar specification here.
I am looking forward to work on this together with sdab, who helped a lot with the language specification and general brainstorming about the system. Hopefully we can provide some new version soon.
In addition to this I would like to see a good github wiki documentation, providing a lot of examples on how to use the grammar and how it acutally works.
---------------------------------
My old TODO list
Summary: Grammar based system for automatic procedural building generation.
Scope: Module
Current Goal: Read custom grammar files; refine the system.
Phase: Implementation
Curator: Skaldarnar, sdab
Related: Villages and AI Concepts, Preview Renderer, #123, Wiki
The Procedural Architecture Grammar (PAG) is a grammar based system for generating buildings and other architecture related stuff. The building's general appeareance will be defined via a grammar file (*.pag), containing production rules for the automated generation process.
The principles of operation are scopes and shapes. Scopes restrict shapes along the three axis and contain a shape. The derivation process starts with a rough bounding box for the building as scope. This bounding box is dependent on the parcel the buidling is going to be placed in (namely width x height x depth).
Each production rule describes a modification of the current scope. For further information have a look at the wiki page.
Edit (06-20-13): You can find the grammar specification here.
I am looking forward to work on this together with sdab, who helped a lot with the language specification and general brainstorming about the system. Hopefully we can provide some new version soon.
- grammars as assets, which can be added easily
- create/implement a parser for *.pag grammar files (ANTLR, alternatives?)
- review and improve current generation logic (floating point calculations, ...)
Must:
- read in and parse *.pag grammar files (feature reduced, simple rules only)
- use parse result to create structures with reduced feature set
- reduced features: Base Rules without special roofs, no occlusion/sight checks.
- start with rectangular footprints
- provide API for usage by other modules
- use guards for rule selection
- use correct probabilities for rule alternatives
- basic variable definitions (= direct assignments)
- have at least one special roof type
- deal with special blocks/placement (e.g. stairs and slopes)
In addition to this I would like to see a good github wiki documentation, providing a lot of examples on how to use the grammar and how it acutally works.
---------------------------------
My old TODO list
So, what exactly am I planning to do?
Rule Implementation
Rule Implementation
- [Done] Set rule
- [Done] Divide rule
- [Done] Split rule
- Repeat rule
- Guards/Conditions
- Occlusion Queries
- Snapping
- [Done] /build console command
- arbitrary footprints
- scopes of multiple shapes
- more primitive shaps (cylinder, sphere, ...)
- user defined attributes
- generic rules