As a technical 3D artist, Babylon has been a great way to dive into web dev, and it parallels with standard game engines just enough that I can easily find my way around the documentation.
Do you have any insights into why this is the case? What areas of simulation or tooling are difficult to work with?
Disclaimer: I'm on the Havok team and worked on the Babylon.JS integration.
I think physics engines are difficult for a few reasons:
- They don't mesh with a lot of features that modelers take for granted (non-uniform scaling, concave meshes, lax model scaling)
- It's hard know intuitively what values to use for things like acceleration, density, velocity, damping, friction. Especially because they are very inter-dependent.
- Interaction with moving kinematic or non-physics objects is an undefined behavior that has to be tested pretty rigorously.
- In gamedev, rigidbody physics are basically a trojan horse for gameplay bugs like clipping through the map and sudden bursts of high speeds (Which is both magical and frustrating). It's a non-trivial task to sandbox those behaviors completely.
- Projectiles. There's no catch-all solution for small fast-moving objects, it's always a tradeoff. But that's mostly because big O dictates it to be so.
No kidding. The "Physics" in Babylon.js is at the inexcusably "my first game engine" level of incompetence. Velocity and acceleration are treated as if they have the same dimensions. All kinds of deeply embedded movement code lacks any understanding of world time. You can definitely get a little game going quickly in it because you don't have to think about any "hard" things, but when you try running your game on systems whose frame rates differ wildly you suddenly understand why real game engines care about the fact that velocity is measured in units of m/s and acceleration in units of m/s^2, and that it matters whether you build your art assets at meter scale or centimeter scale or etc.
I'd like to use something lighter than Unity or Godot.
Do you have insights, into whether the new havoc port is better designed? They seemed to have reimplemented the whole physic architecture which they now call V2:
Good to see that Babylon.js is doing well.
Edit: On the coding side, python is great for pipelines (especially now that blender has its own module). Imagemagick is great for formatting textures and huge .tiff files. ffmpeg is the king of video formatting.
Then there is AFrame.IO, which I've used some. It doesn't offer much, so it doesn't disappoint on what it delivers.. It is probably the closest to VRML, but sadly doesn't offer as good an experience as we had around 1999/2000 :-/.
So, I've tried babylon.js. My gripes with it are: - for the usual demos it loads, it doesn't seem to have a 'preferred navigation feel'. - it doesn't seem to care for planet earth physics much. I'm probably not describing this aspect the right way. VRML used to have 1.0 units correspond to 1 meter, and people would size their content based on this. Similarly, rendering client navigation would base on this, so you would move around at speeds akin to walking - it would even default the viewpoint height to 1.8 or something like that (to resemble a human being about 180cm of height.) It's about the look&feel, how it FEELS when you try to navigate the 3d world. If it feels janky, not smooth, that is bad.. And if 10 different 3d/VR experiences have different navigation model feels, that does not feel good to the end user. VRML had this down - in 2001. TL;DR: Default navigation UIs in babylon seems like a kludgy afterthought, instead of a "Steve Jobs design priority".
Another example: Setting up a default test scene. If I were trying to push my 3d engine/tech to people, I would prioritize tools to set up small "hello world" scenarios. Supporting a good 'hello world' is not frivolous. It is about selling your tech, and convincing. If I try out a small demo, and I feel it is intuitive and easy, and that "I am in control", I think 'Yeah I can build something on this!', and get the impulse/momentum to want to build something in this.
Again, VRML did this well: You could set up a scene in like 5 lines of code. For example, you could specify a sky sphere, or a sky box, with 3-5 lines of code. I would often do a 3d world, where I started specifying a ground and a sky and colors for them, with such 5 lines. Being able to load your 3d scene already with this and walk around in it, is COOL! It makes you want to "put further stuff in there", because you can already see it. Babylon.js, in theory, has similar stuff. But if you try to actually use it, you find out that it wasn't really intended for general use, and not really intended for any real use either, it seems more like a sort of 'can't you throw _something_ like that in there?'.
_SOMETHING_.. - not something good. So - another strike - for setting up a basic sky and ground, babylon.js is worse/not as good as HTML from 25 years ago :-/.
They may have fixed some of this, but past disappointed experience makes me reluctant to take the effort to check it out again :-/
Another thing that put me off: I never found any community actively using babylon.js, at least not that I could find with google? (Discord & your ilk be damned.) I found reddit's /r/babylonjs, but it was mostly empty, apart from release announcements by MS, and random demos done by MS people. So if there is any active community using BJS, I haven't found them?
What I've mostly used instead, is - the roblox engine (I use all this to try out ideas, not to serve a commercial purpose.) - the GODOT engine, which I am willing to praise as high as I am willing to .. not? praise babylonjs? - Unity, but for what I do, roblox serves as well, plus I don't have to handle publishing.
I had high hopes for babylon.js - as a wrapper that would shield me against three.js changes - but I am still looking.
Basically, this feels like the WPF of 3d to me :-/. If they have replaced this with something wonderful, I take it all back..
<babylon aextends="minimal" extends="default" zmodel="https://assets.babylonjs.com/meshes/box.glb" canfiguration="http://example.com/viewerConfig.json" engine.antialiasing="false" zskybox="true" zground="true" scene.debug="false" scene.clearColor="Red" scene.ambientColor="Green" scene.fogColor="Blue" scene.fogDensity = "0.01" scene.fogMode = "1" camera.use-bouncing-behavior="false" camera.use-auto-rotation-behavior="false" camera.behaviors.auto-rotate="0" camera.behaviors.bouncing="0" >
<ground receive-shadows="true"></ground>
<skybox></skybox>
<camera>
<use-bouncing-behavior type="false"></use-bouncing-behavior>
<use-auto-rotation-behavior type="false"></use-auto-rotation-behavior>
<behaviors>
<auto-rotate type="0"></auto-rotate>
<bouncing type="0"></bouncing>
</behaviors>
</camera>
</babylon>An analogy is an IDE vs VSCode. Pre-built vs lightweight and extensible.
Until recently, I think Three.js has been a better fit for the "web" paradigm where everything has to be lightweight and the main focus of 3d graphics is landing pages that need to load in 3s or so.
On the other hand, Babylon.js is also an amazing tool and I think the comparison to Three.js is a little unfair to both. They solve different problems in the 3D space, and both are great at what they do. A better comparison for Babylon.js is Playcanvas.
https://babylonjs.medium.com/announcing-babylon-js-6-0-dcb5f...
However the babylonjs 6 release video has several goodies in there that are actually at a quality level, that shows there are a few gems out there after all.
https://babylonjs.medium.com/announcing-babylon-js-6-0-dcb5f...
Finally I stand corrected, even if there is some gap to cover relative to native APIs.