# howellwang04/grad-app-project-coal architecture

> Architecture diagram of the GitHub repository howellwang04/grad-app-project-coal, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/howellwang04/grad-app-project-coal
- Repository: https://github.com/howellwang04/grad-app-project-coal

## Overview

This repository is a Unity environment-art project with Blender authoring scripts for a coal-plant entrance gate and modular factory-boundary pieces, plus Unity Editor tools for prefab creation and scene integration. The main workflow is to build and export textured models, import them into Unity, create prefabs, and replace or refresh the gate in a scene. Separate supported capabilities include modular boundary assets and per-brick color variation. The README is empty; relationships below rely on the supplied tree and sampled source, so unsampled feature wiring is omitted.

Main entry points: [`ArtSource/FactoryBoundary/build_boundary.py`](https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryBoundary/build_boundary.py) (Boundary builder), [`ArtSource/FactoryGate/build_gate.py`](https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryGate/build_gate.py) (Gate builder), [`ArtSource/FactoryGate/refresh_brick_color.py`](https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryGate/refresh_brick_color.py) (Brick recoloring), [`ArtSource/FactoryGate/BuildBoundaryPrefabs.cs`](https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryGate/BuildBoundaryPrefabs.cs) (Prefab builder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_author["Blender authoring"]
  node_gatebuild["Gate builder<br/>[build_gate.py]"]
  node_textures["PBR textures<br/>[texture_maps.py]"]
  node_boundarybuild["Boundary builder<br/>[build_boundary.py]"]
  node_brickcolor["Brick recoloring"]
end

subgraph group_assets["Art deliverables"]
  node_gateblend["Gate source"]
  node_gateexports["Gate exports"]
  node_boundarymodels["Boundary models"]
  node_prefabs["Boundary prefabs"]
end

subgraph group_unity["Unity integration"]
  node_unitybuild["Prefab builder"]
end

subgraph group_scene["Scene operations"]
  node_replace["Gate replacement"]
  node_refresh["Unity refresh"]
  node_unityscene["Unity scene"]
end

node_artist(("Art author"))
node_unityeditor(("Unity Editor"))

node_artist -->|"authors"| node_gatebuild
node_gatebuild -->|"generates maps"| node_textures
node_gatebuild -->|"saves source"| node_gateblend
node_gatebuild -->|"exports models"| node_gateexports
node_artist -->|"requests modules"| node_boundarybuild
node_boundarybuild -->|"uses gate logic"| node_gatebuild
node_boundarybuild -->|"uses texture tools"| node_textures
node_boundarybuild -->|"updates source"| node_gateblend
node_boundarybuild -->|"exports models"| node_boundarymodels
node_artist -->|"requests recolor"| node_brickcolor
node_brickcolor -->|"loads source"| node_gateblend
node_brickcolor -->|"uses texture tools"| node_textures
node_brickcolor -->|"re-exports gate"| node_gateexports
node_unityeditor -->|"runs build"| node_unitybuild
node_unitybuild -->|"imports gate"| node_gateexports
node_unitybuild -->|"imports models"| node_boundarymodels
node_unitybuild -->|"creates prefabs"| node_prefabs
node_unityeditor -->|"runs replacement"| node_replace
node_replace -->|"replaces instance"| node_unityscene
node_unityeditor -->|"runs refresh"| node_refresh
node_refresh -->|"imports updated asset"| node_gateexports
node_refresh -->|"inspects materials"| node_unityscene

click node_gatebuild "https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryGate/build_gate.py"
click node_textures "https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryGate/texture_maps.py"
click node_boundarybuild "https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryBoundary/build_boundary.py"
click node_brickcolor "https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryGate/refresh_brick_color.py"
click node_gateblend "https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryGate/FactoryGate_Rebuilt.blend"
click node_gateexports "https://github.com/howellwang04/grad-app-project-coal/tree/main/Assets/Art%20Resources/Environment/Gate%20Area/FactoryGate_Rebuilt"
click node_boundarymodels "https://github.com/howellwang04/grad-app-project-coal/tree/main/Assets/Art%20Resources/Environment/Gate%20Area/FactoryBoundary/Models"
click node_prefabs "https://github.com/howellwang04/grad-app-project-coal/tree/main/Assets/Art%20Resources/Environment/Gate%20Area/FactoryBoundary/Prefabs"
click node_unitybuild "https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryGate/BuildBoundaryPrefabs.cs"
click node_replace "https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryGate/ReplaceGateInScene.cs"
click node_refresh "https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryGate/RefreshBrickMaterial.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_gatebuild,node_textures,node_boundarybuild,node_brickcolor toneBlue
class node_gateblend,node_gateexports,node_boundarymodels,node_prefabs toneAmber
class node_unitybuild toneMint
class node_replace,node_refresh,node_unityscene toneRose
class node_artist,node_unityeditor toneIndigo
```

## Components

### Blender authoring

- [Gate builder](https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryGate/build_gate.py): `ArtSource/FactoryGate/build_gate.py`
- [PBR textures](https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryGate/texture_maps.py): `ArtSource/FactoryGate/texture_maps.py`
- [Boundary builder](https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryBoundary/build_boundary.py): `ArtSource/FactoryBoundary/build_boundary.py`
- [Brick recoloring](https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryGate/refresh_brick_color.py): `ArtSource/FactoryGate/refresh_brick_color.py`

### Art deliverables

- [Gate source](https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryGate/FactoryGate_Rebuilt.blend): `ArtSource/FactoryGate/FactoryGate_Rebuilt.blend`
- [Gate exports](https://github.com/howellwang04/grad-app-project-coal/tree/main/Assets/Art%20Resources/Environment/Gate%20Area/FactoryGate_Rebuilt): `Assets/Art Resources/Environment/Gate Area/FactoryGate_Rebuilt`
- [Boundary models](https://github.com/howellwang04/grad-app-project-coal/tree/main/Assets/Art%20Resources/Environment/Gate%20Area/FactoryBoundary/Models): `Assets/Art Resources/Environment/Gate Area/FactoryBoundary/Models`
- [Boundary prefabs](https://github.com/howellwang04/grad-app-project-coal/tree/main/Assets/Art%20Resources/Environment/Gate%20Area/FactoryBoundary/Prefabs): `Assets/Art Resources/Environment/Gate Area/FactoryBoundary/Prefabs`

### Unity integration

- [Prefab builder](https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryGate/BuildBoundaryPrefabs.cs): `ArtSource/FactoryGate/BuildBoundaryPrefabs.cs`

### Scene operations

- [Gate replacement](https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryGate/ReplaceGateInScene.cs): `ArtSource/FactoryGate/ReplaceGateInScene.cs`
- [Unity refresh](https://github.com/howellwang04/grad-app-project-coal/blob/main/ArtSource/FactoryGate/RefreshBrickMaterial.cs): `ArtSource/FactoryGate/RefreshBrickMaterial.cs`
- **Unity scene**

### Other components

- **Art author**
- **Unity Editor**

## Connections

- Art author → Gate builder: authors
- Gate builder → PBR textures: generates maps
- Gate builder → Gate source: saves source
- Gate builder → Gate exports: exports models
- Art author → Boundary builder: requests modules
- Boundary builder → Gate builder: uses gate logic
- Boundary builder → PBR textures: uses texture tools
- Boundary builder → Gate source: updates source
- Boundary builder → Boundary models: exports models
- Art author → Brick recoloring: requests recolor
- Brick recoloring → Gate source: loads source
- Brick recoloring → PBR textures: uses texture tools
- Brick recoloring → Gate exports: re-exports gate
- Unity Editor → Prefab builder: runs build
- Prefab builder → Gate exports: imports gate
- Prefab builder → Boundary models: imports models
- Prefab builder → Boundary prefabs: creates prefabs
- Unity Editor → Gate replacement: runs replacement
- Gate replacement → Unity scene: replaces instance
- Unity Editor → Unity refresh: runs refresh
- Unity refresh → Gate exports: imports updated asset
- Unity refresh → Unity scene: inspects materials
