Blender + Babylon.js level authoring: using Blender as a Unity-like frontend editor

Hey everyone!

My 3 year old son has wanted me to build a game called “Underwater Truck Train” where you drive a train that looks like trucks underwater. Pretty deep, pun intended!

I decided that since I’ve been wanting to move away from Unity I would use BabylonJS. I experimented with the awesome work being done on the BabylonJS Editor but decided that for my workflow I didn’t need a lot of what it was offering and instead wanted to keep everything in Blender, a tool I’m very familiar with.

So I took inspiration from projects like Armory3D and the Blender Game Engine and built an addon and a Babylon runtime that makes BJS+Blender function like Unity.

What it is

Author in Blender: attach components (colliders, rigid bodies, scripts, cameras, particles, GUI, etc.), export a .glb + .scene.json manifest, and load everything in Babylon with Havok physics and TypeScript behaviors.

Links

How it works

  • glTF carries meshes, hierarchy, lights, cameras, animation
  • Sidecar manifest carries ECS-style components matched by stable GUIDs (renames don’t break links)
  • Behaviors are TypeScript classes with @exposed fields edited in Blender

Supported today (high level)

  • Physics: colliders, rigid bodies, constraints, triggers, collision layers (Havok V2)
  • Scripts: lifecycle + collision/trigger hooks, Input Actions, @exposed / @inputMap
  • Cameras, audio, 2D GUI, 3D GUI, particles, MSDF text
  • Scene: IBL/skybox, fog, atmosphere, post-processing (bloom, DOF, SSAO, LUTs, …)
  • Materials: Node Material Editor JSON with scan/extract/override workflow
  • Workflow: export validator, Live Link (Ctrl+S → browser reload), debug colliders + inspector
  • Prefabs via linked .blend + library overrides

Full feature list: Babylon Level Kit — 13 — Feature List

Dev tooling (optional)

  • Babylon Launcher — local hub at :3200 to pick project/level, start Vite, build/serve docs, manage MCP
  • bjs-mcp — Cursor MCP for behavior authoring
  • Extensive documentation

Status

At the moment I’m just sharing this to let people know it exists. Feel free to modify it as you’d like but it is currently under active development.

Conventions and architecture are documented in the repo (including STYLE_GUIDE.md).

Screenshots:

^ Shows Component based system in Blender

^ Shows BJS Scene editor panel in Blender, including post procesing, environment fog, input manager.

^ Shows BJS Material Override editing in Blender

^ In game shot of WIP starter project.

^ In-editor shot showing collision geometry and center of mass previews.

9 Likes

This is coool !!!

This is so awesome! Thanks for sharing!

Continuing development on the game. Just added component addition and removal at runtime, but I figured I’d keep this thread updated with the art process. :slight_smile: I’ve created the landscape for the Underwater Truck Train to explore. Made in Blender using painting and displacement maps, with a bit of sculpting touch up. Very rough renders. The player will start at one end of the channel, an abandoned area that’s recently been renovated because it’s very close to the anomaly on the ocean floor. Then they drive out and down to explore the seabed.

3 Likes

Here’s some more work, including the procedurally textured terrain and a new feature I added: detail map support in the material panel. I also did some more work on the water, which I think is looking pretty good! I’ve started blocking out the starting location too.

1 Like

Hey all, more work here! I decided to move the starting position out to sea on a ship or something, because I was spending a lot of time working on something that would only be seen for like five minutes (the harbor). So here is the topside background, completed.

In terms of features, I have added prefab support. There are three ways you can use them - you can pick an object in the scene, link a collection from another scene, or bring in a linked object and pick that from the scene (so like, 2 and a half ways haha). A prefab is a cloning operation that also includes any BJS Level Kit components and the full object hierarchy. It’s exposed in scripts via a decorator:

@exposed({ type: “entity”, label: “Prefab” })
prefab: Entity | null = null;

5 Likes

This is excellent!

Thank you!

I have added .cube LUT support and started adding some sea creatures with the prefab spawning system. I have also added a rudimentary animation editor.

Thanks to Heaust for foundational work on this: Color grading using .cube LUTs

1 Like

Added:

Engine

  • Trigger volumes aligned with auto-fit Havok bounds
  • Axis conversion docs + MCP helpers
  • Cached Blender viewport overlays (cog/collider)
  • Project Control Panel + publish / start-level wiring
  • npm kit packaging (game/ layout, release pack, standalone install)

Game

  • Train Scene behaviors (BoatRocker, ObjectiveArrow, camera/fish tweaks)
  • HUDController for exported Train Scene GUI & HUD
  • Animal spawn depth as world-Y

Other stuff I don’t remember lol.

3 Likes

Very cool!
Makes me think of Antarctica.. idk if anyone saw the holes they bored down to the lakes under the ice and found life in there.. a game where you explore it jumping between now and when it didn’t have ice would be pretty neat

4 Likes

Beautiful!

I’m going to call the game “done” for now since it’s in a good state to show my toddler. He picked the rainbow color scheme and really enjoyed driving off the ramp and down to to find the whale bones. Also, finding the sea animals floating around was a big hit! I’d say the biggest missing thing is sound - the plumbing is there I just need to add it all and I feel like taking a break to work on some other things for a bit haha.

I did a bit of optimization work and uploaded a version of the build that uses the encrypted pipeline. You can check it out here:

I’m away from my desktop so I can’t test the game controller stuff, please let me know if it doesn’t work! Otherwise I hope you enjoy this fun little experiment. :slight_smile: I will be continuing to develop the Blender2Babylon Kit as I use it for future projects and will eventually stand up a more mature website and tutorial thing for it. In the meantime, it is available at the git repo or through NPM! npm install b2bkit

Changes:

Engine

  • GameClock — pause / slow-mo / freeze gameplay time from scripts
  • LevelDirector — restart or reload a level from behaviors without tearing down the app by hand
  • Mesh shadow authoring — mark meshes to cast/receive shadows in Blender
  • Fixed physics step + OnFixedUpdate — stable physics at low FPS, smooth rendering at high refresh
  • Portable web publishes — drop a published build folder anywhere (site root or a subpath) and it still loads
  • Built-in load progress bar — default overlay while assets download (including encrypted packs)
  • InstancedMesh physics hulls — shared-mesh instances (e.g. multiple Small Rovers) no longer bake colliders in the wrong frame, so visuals and physics stay aligned
  • Control panel asset browser — scans any folder under game/workspace/ (not fixed presets); Reload recopies a workspace file into the deployed level without a full Blender re-export

Blender / tooling

  • Safer prefab overrides — linked prefab component edits no longer get scrambled by renames
  • Quieter Babylon Inspector — kit metadata no longer clutters the property tree

Game (Train Scene)

  • Endgame flow — win/end UI, LUTs, fog/camera/HUD polish
  • On-screen controls + gamepad look/zoom on the train camera
  • Reliable train reset — reset puts the whole train (cars + suspension) back without exploding
  • Endgame behavior — trigger zone + delay, then end UI / look
  • FogChanger 3 zones — outside / zone 1 / zone 2 with separate fog + LUT
  • Animal exclusion volume — optional collider that blocks / clears spawns inside it
  • TrainCamera collision feel — gradual slowdown near geometry, harder to punch through or get stuck; look deadzone
  • Controls UI — controls panel + HUD Controls button; gamepad move / look / zoom / reset bindings
  • HUD roll — no longer flips when the vehicle is upside down

@withADoveInOneHand that would be super cool, and even that color radar map gives me ideas, like what if you were choosing your target zones to teleport between using that map?

Also, thank you Deltakosh, I really appreciate the positivity (and sebavan and AlitarSemarimis)! :slight_smile:

4 Likes

Sweet, glad the tot loves it.
Pretty hefty asset has me at 47% stalled, I don’t wanna hound your servers retrying.

The images look great and the features list is impressive! I tried loading the train scene, but the loading gets stuck at 80% for me and never completes.

Thanks for trying - my server is unfortunately not great. If you’re especially motivated you can grab it here and run it with npm run start. I gotta upgrade, right now I just have basic namecheap hosting lol.

EDIT: Looks like the issue might be just a bad service worker config due to the encrypted files. I’ve published the unencrypted version to the previous link and it’s working now :slight_smile:

1 Like

Some additional pushes to the NPM package: creating a new project is easier. Now you just:

npm install
npm install b2bkit
npx b2bkit-create --title “My Game”
npm start

When you’re ready to install the Blender plugin:
npx b2bkit-addon-path

Hey I just realized I never provided the git link lol: GitHub - Elevons/Blender2BabylonKit · GitHub

2 Likes