The right flow of creating a environment for BabylonJS

I’m really new to 3D. I’ve always had interest in learning 3d, but I’,m really bad at drawing and all that other stuff (so not much that I can do :D). But recently I had this Tower Defence idea in my head that has been tickling for quite a while now. I’ve bough a pack from the Unity store (screenshots will be attached) and I wanted to set a base for the game from it until I can afford an Artist.

I’ve been reading some articles for BabylonJS, but i can’t find the right flow for setting the environment and I’m don’t know if I’m in the right way. My idea for now is:

  1. Export the Unity Package as .FBX files and import them in blender.
  2. Use the imported files in Blender to create the environment
  3. Create the TD map and export it as glTF, glb or obj to work with it in BabylonJS
  4. Use the meshes of the different objects to interact with them.

The main idea here is to set placeholders for the turrets that I will interact with later on by referring to their mesh and adding some events. I also plan on making invisible path to set the walking path for the mobs.

I just don’t know if this is the right way at all or if I should import a full scene from Blender and work from there with it or just set the scene in BabylonJS by adding object by object and work with that (this seems as an overkill).

Every advice in BLENDER and BABYLONJS is more than welcome. Never used any of them <3

Some screenshots:

2 Likes

Hello and welcome!

big disclaimer: I’m a HUGE fan of blender so if I was in your shoes I would have picked blender as well (We support Blender with a babylon extension and also through gltf file format).

I think I would probably build some asset scenes that I would place by code in my game

But don’t be afraid to do something wrong. I think there are many ways to do it

1 Like

I just find it strange and very time consuming to arrange items by typing coordinates on hand and importing like 50 objects and then copy and place them on scene.

I feel like doing it first in blender, setting the whole scene in there (naming the objects right as mentioned in the docs :D) And after I got what I need I can target all the meshes that I need to interact with in code. Is there any drawbacks of that? Is placing them in code better?

And if I decide to go by placing them in BabylonJS on hand. Is there a way to export the demo scene from the screenshot (Only the ground, it’s a Unity Object) as a terrain for Babylon and from there on place the needed object on it?

I’m just trying to figure out and find the best workflow to work here with, atleast until I can afford some artists that know what they are doing and work with that xD.

THANKS, for the warm welcome <3

Oh yes, yes… a tower defense game with Babylon :heart_eyes:. I am a huge fan of tower defense. If you choose to make it with BJS, I shall make sure you get all the support you need for your project :smiley:

Bouncing on @Deltakosh comment, I would also likely go the way of creating a ‘library’ of all meshes/turrets at first and work the path and placeholders with code in BJS: But I am far from being an expert on this. There are however a number of members in this community that should be able to give you good advice on this. I hope they will want to step-in…

By any means, I believe that starting with creating all your turrets in Blender, as a single object at zero origin is something you can already do. Along this, I would probably create a couple of ‘dummy maps’ in blender as a reference. And next, just wait until others (like me) get cought by your screenshot and the idea and will eventually want to guide you through the rest of your journey.

Welcome to the community and don’t forget to ping me when I can start experiencing this :heart_eyes:

2 Likes

I just can’t wrap my head around. I guess atleast the terrain will be in Blender and from there on I will import it and work with paths and more in BabylonJS.

I’m more than happy to hear that you are ready to help out ^^. Even more excited to hear that you are a TD lover, so am I since World of warctaft III xD. I would post progress and planning on even making a youtube channel with devlogs for sure. But I need to wrap my head around at first :smiley:

1 Like

Could always check out the BabylonJs Unity Toolkit. I migrated most of my work flow to this because of all the extra tools for creating environments.

It has a bug in 2021 version. I need to downgrade it. So you are doing all your environments work there and export it to blender?

Vice versa do all your modeling in blender, then import it to the toolkit and export right to Babylon as an extended gltf.

1 Like

Thanks a lot. I managed to export the scene from the Unity package but I’m having a problem with the terrain, since no graphics are exported with it, but I will try to fix that. You guys helped a lot, thanks

@Cedric recently created a super useful script to live update a scene in Babylon from Blender Blender Live Update - Content creation (3dsMax, Maya, Blender, glTF) - Babylon.js (babylonjs.com) :smiley:

3 Likes