I’ve decided to start learning WebGL for an app I have in mind and I’m kinda torn between threejs and babylonjs. I’ll need to be able to have fine orbiting camera controls with dynamic reference/center points, since the app will be used to inspect architecture scans taken via 3d photogrammetry, and it’s not alway viable to rotate the entire scene around the model’s center point.
Sketchfab seems to do this wonderfully: Valdebárzana Church, 12th century - Asturias - 3D model by Raiz (@RaizVR) [d63e000] - Sketchfab I don’t completely understand what’s being done here but it feels like at the same time I can orbit around the center, move around like in a game and doubleclick to focus and orbit around a specific point in the mesh.
Since I want to start with one framework and not dabble with both simultaneously, I went over all the demos and examples to see which would be a better fit. A heads up: I’ve got zero 3D experience except for a few hours in Blender.
The thing I noticed that I liked far more in threejs projects and examples is the camera control for fine navigation. It feels snappy and proportional, much like Blender. On the other hand, bablyon’s feels off, no matter which demo I’ve tried. I’ve tried playing with the camera code in the playground but I’m missing a lot of basics to understand what I’m doing. So, sorry if all of this sounds a bit misguided and that I’m missing basics, because I actually am
Some of the things I’ve noticed about babylonjs’ camera:
- There is a lot of interpolation going on when orbiting and when zooming, with a weird acceleration curve. I couldn’t find any option to tweak the tween duration or the curve.
- Disabling the acceleration makes the camera become either too responsive, or unresponsive when panning and orbiting.
- Zooming in seems to accelerate the closer you are to the center of the scene in some examples, making it impossible to make fine adjustments, or in some examples it deccelerates getting you “stuck” in the max zoom level. In threejs and in Blender the zoom feels proportional to the current zoom level.
- Panning the camera feels unresponsive in most examples
- I haven’t seen an option where it’s possible to zoom in on the cursor’s position, or orbit around the current selection, but I guess this is possible to do programatically.
So the question here is — am I likely to hit a wall with babylonjs (or threejs for that matter) when it comes to implementing camera controls?