How to export a complete scene to a PBR renderer?

I am working on a project using using babylonjs, where a player can create a room and fill it with (pre-exisiting, loaded) objects and then export that scene to be able to create a realistic render of it.

I am pretty new to this 3d stuff, I have been a front end web developer for 5 years now.

Is it possible to do what I want to do ? I was thinking of using cycles engine (Blender) to do the server side rendering.

I noticed I can export scenes from babylon in GLTF and OBJ. Can cycles read that and render the scene ? (the exported data should contain lights info, HDRI map, camera position, objects positions and transforms).

Can I use a standard format for this ? and in the worst case, can I create a data format manually and read it / convert it on the server side so that the renderer understands the scene ?

Something like

data = {
   objects: [{ fileName, position: {x, y, z}, scale, rotate, otherAttributes ... }],
   hdri: "filename",
   camera: { position: {x , y , z}, direction: {x, y, z}, otherAttributes, ...},
   lights ...

Hello and welcome!!

Blender can import glTF so it should be your way to go :wink:

Make sure it is Blender 2.80+.


With Draco compression :slight_smile:

Using glTF, you should get all of these except for lights info and HDRI map. For punctual lights, you can use the KHR_lights_punctual extension but Iā€™m not sure if Blender can import these (it can export them). HDRI map is not currently supported by glTF so that will have to be done separately.