Addition of Camera type that matches 3D applications

TL;DR


this is a feature request to introduce a new Camera type/preset to BabylonJS: EditorCamera, to match typical 3D editor cameras.

Description


The new EditorCamera camera type should provide an out-of-the-box camera that matches a camera one would know from the typical 3D editor OpenGL viewport (Maya, 3D Studio Max, Blender, Houdini, Nuke 3d viewport, etc…). They more or less all control the same:

  • rotate with alt+lmb
  • strafe with alt+mmb
  • zoom with alt+rmb
  • ability to frame selected objects (FramingBehavior compatible)

Blender has a settings which it calls Industry compatible control, which makes the camera behave like that. So it should be a rather known/usefull control scheme, which may be familiar to many artists.

Use case


The use cases for this would be scenarios where Babylon is used to just present information in a 3D scene and that have no direct relation to gaming, physics, player movement etc. A user is not part of a “world/level/game”, he just aseptically and with least interference wants to browse information rendered in 3D. He wants to do it in the same way he knows from other applications, so nothing needs to be relearned.

Misc.


  • Can it already be done? I think one could possibly build it using CameraInputs. However it might be hard to do and easy to get kinda wrong for new Babylon devs. A preset from the core devs. that gets it right in all ways seems preferable over many attempts that may vary in quality. Also I feel like the use case is broad enough…!?
  • Why doesn’t it exist already? I’m knew to Babylon and coming from a 3D/VFX background, not a gaming background. So I’m used to using 3D as described above and was kind of surprised not to find the basic camera type i’m used to. But maybe there are good reasons for that!? Maybe I overestimate what it takes to build it myself with CameraInputs? The fact that it doesn’t exist may hint at the fact that typical Babylon users so far didn’t needed it or built it themselves easily.
2 Likes

Alternatively: If it’s really easy to turn a UniversalCamera into the requested EditorCamera by modifying CameraInputs, an offical How To would be appreciated and fullfil the feature request as well.

This is an excellent idea! I do like it

Would you be ok to create it or write the how to?

https://doc.babylonjs.com/how_to/how_to_start
https://doc.babylonjs.com/how_to/contribute_to_documentation

Well, after a few days of using Babylon, I do not necessarily see myself as the most qualified person for the job. But i may end up giving it a try. Should I succeed in creating the camera behavior according to my request using only CameraInput and FramingBehavior, i’d surely make a PR containing a HowTo writeup.

1 Like

This is what I look for actually. I created Babylon.js as a community project and I think the more we are to contribute the better it becomes :wink:

3 Likes

Can this work for your needs?


Or are you looking for a simpler camera type?