FallingStars123 commited on
Commit
8ef3d53
ยท
verified ยท
1 Parent(s): d26d70c

Create readme.en.md

Browse files
Files changed (1) hide show
  1. readme.en.md +145 -0
readme.en.md ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: "Smart MC Building Generator"
3
+ emoji: "๐Ÿ—๏ธ"
4
+ colorFrom: "blue"
5
+ colorTo: "purple"
6
+ sdk: "streamlit" # ๆˆ– gradio ๅ–ๅ†ณไบŽไฝ ็š„ web ็•Œ้ข
7
+ app_file: "main.py"
8
+ pinned: false
9
+ ---
10
+
11
+ # Smart MC Building Generator
12
+
13
+ ## Project Overview
14
+ The Smart MC Building Generator is an AI-powered tool that automatically generates Minecraft structures based on user prompts (e.g., "flat roof", "dark oak walls"). It combines data augmentation, 3D generative models, and Minecraft data format conversion to create 10x10x10 structures from single images or text prompts, exporting them as `.schem` files.
15
+
16
+ ---
17
+
18
+ [๐Ÿ‡จ๐Ÿ‡ณ ็ฎ€ไฝ“ไธญๆ–‡](Muti_language_Readme/README.zh.md) | [๐Ÿ‡ฌ๐Ÿ‡ง English](Muti_language_Readme/README.en.md)
19
+
20
+ ---
21
+
22
+ ## Key Features
23
+ 1. **Data Loading & Parsing**
24
+ โ€ข Supports loading and parsing Minecraft `.schem` files.
25
+ 2. **Data Augmentation**
26
+ โ€ข Generates diverse building variants via rotation and mirroring.
27
+ 3. **3D Visualization**
28
+ โ€ข Preview structures as point clouds, colored cubes, or slice views.
29
+ 4. **Prompt-Driven Generation**
30
+ โ€ข Generate buildings from text prompts (e.g., "small house with a flat roof").
31
+ 5. **Export Functionality**
32
+ โ€ข Save generated structures as `.schem` files for direct use in Minecraft.
33
+
34
+ ---
35
+
36
+ ## Dependencies
37
+ โ€ข **Python 3.8+**
38
+ โ€ข **Core Libraries**:
39
+ โ€ข `numpy`
40
+ โ€ข `pyvista`
41
+ โ€ข `nbtlib`
42
+ โ€ข `torch` (for model training)
43
+ โ€ข `flask` (for web interface)
44
+
45
+ **Installation**:
46
+ ```bash
47
+ pip install numpy pyvista nbtlib torch flask
48
+ ```
49
+
50
+ ---
51
+
52
+ ## Usage
53
+
54
+ ### 1. Load & Parse Data
55
+ Place your `.schem` file in the project directory and run:
56
+ ```python
57
+ from main import process_block_data
58
+ process_block_data("WoodHouse_3.schem")
59
+ ```
60
+
61
+ ### 2. Data Augmentation
62
+ Generate rotated/mirrored variants of existing structures:
63
+ ```python
64
+ from main import generate_rotated_and_mirrored_data
65
+ generate_rotated_and_mirrored_data()
66
+ ```
67
+
68
+ ### 3. Visualization
69
+ Preview structures using:
70
+ ```python
71
+ from main import preview_point_cloud, preview_cubes_with_colors, preview_slices
72
+ preview_point_cloud(output_data) # Point cloud view
73
+ preview_cubes_with_colors(output_data) # Colored cubes
74
+ preview_slices(output_data) # Slice view
75
+ ```
76
+
77
+ ### 4. Prompt-Based Generation
78
+ Generate structures from text prompts:
79
+ ```python
80
+ from main import generate_from_prompt
81
+ generate_from_prompt("A small house with a flat roof and dark oak walls")
82
+ ```
83
+
84
+ ### 5. Export to `.schem`
85
+ Save generated structures:
86
+ ```python
87
+ from main import save_as_schem
88
+ save_as_schem(house_data, "generated_house.schem")
89
+ ```
90
+
91
+ ### 6. Web Interface
92
+ Launch the interactive web server:
93
+ ```bash
94
+ python main.py
95
+ ```
96
+ Visit `http://Not_created_yet` to generate buildings via prompts.
97
+
98
+ ---
99
+
100
+ ## File Structure
101
+ ```
102
+ MC_Building_Generator/
103
+ โ”œโ”€โ”€ schem/ # put .schem files
104
+ โ”‚ โ””โ”€โ”€ WoodHouse_3.schem
105
+ โ”œโ”€โ”€ npy/ # put .npy files
106
+ โ”‚ โ””โ”€โ”€ block_data_0.npy
107
+ โ”œโ”€โ”€ main.py # Main entry point
108
+ โ”œโ”€โ”€ block_data.txt # Parsed block data
109
+ โ”œโ”€โ”€ metadata.txt # Metadata (dimensions, block IDs)
110
+ โ””โ”€โ”€ README.md # This document
111
+ ```
112
+ ---
113
+
114
+ ## Examples
115
+ 1. **Load a `.schem` file**:
116
+ ```bash
117
+ python main.py
118
+ ```
119
+ 2. **Generate from a prompt**:
120
+ โ€ข **Prompt**: `A small house with a flat roof and dark oak walls`
121
+ โ€ข **Output**: `generated_house.schem`
122
+
123
+ ---
124
+
125
+ ## Notes
126
+ 1. Ensure `.schem` files follow Minecraft's format specifications.
127
+ 2. Use clear and specific prompts for optimal results.
128
+ 3. Augmented data is saved in `block_data_*.npy` files.
129
+
130
+ ---
131
+
132
+ ## Roadmap
133
+ 1. Support more building types and sizes.
134
+ 2. Optimize generation speed and model accuracy.
135
+ 3. Develop a real-time preview interface.
136
+
137
+ ---
138
+
139
+ ## Contact
140
+ For questions or feedback:
141
+ โ€ข **Email**: [email protected]
142
+ โ€ข **GitHub**: [https://github.com/fallingstars123/MC-AI-BuildingGenerate](https://github.com/fallingstars123/MC-AI-BuildingGenerate)
143
+ โ€ข **Discord**: thomasw2004
144
+
145
+ ---