Skip to content

dotthegod/MC2CS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCtoCS

Convert Minecraft structures to Counter-Strike 2 .vmap maps.

MCtoCS reads .nbt files exported from Minecraft and generates fully textured CS2 maps you can open in Hammer and compile.

imageimage


Features

  • Full block textures — applies textures from any Minecraft resource pack (Java .zip or Bedrock .mcpack)
  • PBR support — Bedrock RTX packs with normal/MER textures generate proper PBR materials in CS2
  • Model blocks — fences, torches, stairs, flowers, and other non-cube blocks render with correct geometry when MC assets are provided
  • Face culling — hidden faces between adjacent solid blocks are removed for performance
  • Animated textures — water, lava, fire, and other animated textures are exported as sprite sheet animations (Still W.I.P.)
  • Liquids as func_water — optionally convert water/lava to CS2 water entities
  • Damage blocks — cactus, magma, etc. can generate trigger_hurt entities
  • Climbable ladders — ladders generate func_ladder entities
  • Slime bounce — slime blocks generate bounce trigger brushes (Still W.I.P.)
  • Stair/slab clip ramps — auto-generates invisible ramp brushes so players can walk up stairs and slabs smoothly
  • Auto-lighting — light-emitting blocks (glowstone, torches, sea lanterns) automatically place light_omni entities
  • Multiple output modes — Per Chunk (default), Per Block, Merge Same Touching, Per Block Type, or Single Mesh
  • Compact output — reduces file size by minimizing indentation and inlining array data
  • Rust acceleration — optional Rust-powered mesh builder for faster conversion. See rust_core/README.md for build and install instructions.
  • Addon export — exports textures and materials directly into your CS2 addon folder with optional resource compiler integration

Getting Started

Download

If a prebuilt MCtoCS.exe is available, download and run it. Otherwise build from source using the instructions below.

Running from Source

pip install -r requirements.txt
python main.py

Requirements: Python 3.11+

Building the Executable

.\build_onefile.ps1

Output: dist/MCtoCS.exe


Usage

1. Select Input File

Click Browse and select your Minecraft structure file (.nbt).

Tip: The default "Per Chunk" mode works well for most builds. For very large structures, "Merge Same Touching" or "Single Mesh" produce the smallest files. Avoid "Per Block" for anything over a few hundred blocks.

2. Texture Pack (Recommended)

Provide a Minecraft resource pack so blocks get proper textures instead of the default placeholder material.

  • Vanilla Minecraft textures: Download the default resource pack from
    https://texture-packs.com/resourcepack/default-pack/
    and select the .zip file.
  • RTX / PBR textures: For the best visual quality, use a Bedrock RTX .mcpack that includes normal maps and MER (Metalness/Emissive/Roughness) textures. These will generate full PBR materials in CS2 with proper metalness, roughness, and normal mapping. Popular RTX packs like Kelly's RTX, SUSPENDED's RTX, or Vanilla RTX Normals work well.

3. MC Assets (Optional)

To render model blocks (fences, torches, stairs, flowers, rails, etc.) with correct geometry, provide the vanilla Minecraft client assets. You can point to either:

  • A folder containing assets/minecraft/blockstates/ and assets/minecraft/models/
  • A .zip file of the same (e.g., the Minecraft client .jar file)

Without MC assets, model blocks will fall back to simple cubes.

4. Conversion Settings

Setting Description
Block Scale Size of each block in Hammer units (default: 64)
Cull Hidden Faces Remove faces between touching solid blocks (recommended)
Output Mode How blocks are grouped into meshes (see below)
Compact Output Reduce file size with minimal indentation and inline arrays (recommended)
Origin Offset Shift the map origin (X, Y, Z) in Hammer units
Liquids as func_water Convert water/lava to func_water entities instead of world geometry
Trigger_hurt Add trigger_hurt brushes for damage blocks (cactus, magma, etc.)
Climbable ladders Generate func_ladder entities for ladder blocks
Slime bounce Generate bounce triggers for slime blocks
Stair clip ramps Add invisible ramp brushes over stairs and slabs for smooth player movement
Auto-lighting Place light_omni entities at light-emitting blocks

Output Modes

  • Per Chunk — Blocks grouped by 16×16 spatial regions (like Minecraft chunks). Default and recommended for most builds.
  • Per Block — Each block is a separate mesh. Only useful for tiny builds (<100 blocks) where you need per-block editing.
  • Merge Same Touching — Adjacent blocks of the same type are merged. Good for large builds.
  • Per Block Type — All blocks of the same type become one mesh. Good for very large builds.
  • Single Mesh — Everything in one mesh. Smallest file but no per-block editing.

5. Addon Export

To get textures into CS2:

  1. Set Addon Folder to your CS2 addon's content directory
    (e.g., steamapps/common/Counter-Strike Global Offensive/content/csgo_addons/your_addon/)
  2. Set Map Name — textures are organized under materials/<map_name>/
  3. Optionally set Resource Compiler path to auto-compile textures to .vtex_c
    (usually at game/bin/win64/resourcecompiler.exe)

Click Convert and the .vmap file will be saved alongside your input file. Open it in Hammer.

Click Recompile Textures to re-export and compile textures without re-converting the map.


Special thanks

  • Thanks to krays for helping me while creation of this project

Tips

  • Export your builds from Minecraft using Structure Blocks (.nbt) .
  • Large builds: Use "Per Chunk" (default), "Merge Same Touching", or "Single Mesh" mode. Avoid "Per Block" on anything over a few hundred blocks — it creates massive files.
  • RTX packs significantly improve visual quality in CS2 — normal maps add surface detail and MER textures give proper metallic/roughness values.
  • Stair clip ramps make stairs walkable like real ramps in CS2 instead of requiring jumping.
  • Auto-lighting saves you from manually placing lights — glowstone, sea lanterns, torches etc. all emit light automatically.

Todo

  • Auto-particle for ingame objects
  • Surface properties for materials

About

A tool that can port Minecraft .nbt files to CS2 .vmap's

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors