camera problem in gltf with 3ds max babylon exporter

hi everybody, my first post in here , don’t know this is the right place to ask … i’m exporting an interior scene to GLTF format using babylon exporter for 3ds max … i’m trying to figure out a way to put the camera in the center of my interior … i create a camera in my needed position … it says that it is exporting the camera, but when it is opened in the browser, it doesn’t seem to have read my camera and it shows the view from the default camera outside of the interior box . how can i define my camera as the main one so it automatically reads it on runtime ? thanks in advance for the help

Pinging @Guillaume_Pelletier

Hey guy’s,
As far i know and according to Khronos specification, there is no “default” camera for a glTF asset. Instead, the client application has to keep track of the currently active camera.
So there is no way for the exporter to force the camera to be the “default” one.
Action has to be taken at Viewer side.
Hope this help.

1 Like

thank you for the reply, there is no way to do it ? take a look at this link … FRAME
client sent me that, he wants to start the scene in the middle of the interior …

I think this thread may help - Define camera position in a GLTF file (Blender) - #3 by PirateJC
Also, if you want to start the scene in the middle of the interior, you can do it with Babylon camera, it may be even simpler.


thanks a lot for the help, i’m new to babylon sorry where is the babylon camera ? i will link into the thread now …

thank you for the reference , so i should use the babylon editor if i want to define my main camera as default? if i don’t want to use babylon sand box … another gltf viewer for example …

You may use any DCC tool to export your camera with GLTF file.
The same with viewers - you can use any GLTF viewers to view your file.
If you need to build some webpage with your scene - use babylon cameras in your js code.

1 Like

i’m really grateful for the time you put on this as i was really stuck finding some way, the only main thing i need is to have my specific camera load in the runtime, to start the interior scene from inside the walls …

and by the way, i’m not familiar with the babylon editor for coding , i was wondering if this could be solved using the 3ds max interface and the babylon exporter …

You don’t need Babylon editor. Notepad++ is enough for the simple code :slight_smile:
The question is what the final product is: a) GLTF file (for any GLTF viewers, online and offline) or b) Webpage with GLTF file (for browsers).

If a) then it is not possible. You can export your camera with GLTF file but you cannot tell to any GLTF viewer to start with this camera; I presume it could be done for some viewers in their settings but anyway, it is at client side so you’ll never be sure…

if b) You import your GLTF model to webpage with the help of Babylon.js, then find your camera and make it active (or build a new camera programatically). In this way you always will have full control over the model view and camera settings.


thank you very much, i’ve installed the babylon editor, have previous experience in unity3d… but have no clue about how i should deal with this one. … struggling with UI … thanks anyway for your help … i’m grateful…

If you have some experience in Unity you can prepare 3D file in Unity and export to GLTF.

1 Like

i was exactly looking for this … have not tested if unity does have this feature or not … or i should install plugin for that …

Unity doesn’t have it by default but there are different libraries/plugins to export from Unity to GLTF.

1 Like

as far as i have searched, there is no way to export an enitre unity scene to gltf … it just exports a gameobject directly from unity to gltf using plugins …

I still wonder what is your final aim - to have the file or to have the webpage :slight_smile:

1 Like

thank you for helping me with this, sorry i forgot to tell you, the client seems to just need GLTF … but maybe he is not aware like i wasn’t, about the fact that as you said, GLTF file alone doesn’t allow to have a certain camera as the main camera to start on run time … i should tell him about this …