Using scenes from editor while developing with raw engine


#1

Hello.

I found using raw engine locally the most convenient pipeline for myself. However, features like scene composition and UI setup in editor is also very good, and absent from raw engine.

While subscribed to organization account and use REST API to get assets, will I be able to download the assets of scenes with all the setup inside and use it in my raw engine setup? Or perhaps there is some other way to do that?

Thank you.


#2

Exporting the build (personal account and up, API access only on ORG), yes, they would be runnable with a local engine.

Not 100% sure about the exporting of the project though. Maybe @will will be able to help here.


#3

Bump.

I understand that this is exotic question, but perhaps I still can have some info beforehand.

If nothing comes up, I’ll experiment with subscription and write the results here later.


#4

I can send you something like the Model Starter Kit exported project which will give you all the files in the project form (which can be different from the built form) if you would like?


#5

@yaustar that would be most helpful of you!


#6

#7

@yaustar, appreciate your help!

Indeed, when I grabbed a scene descriptor from the exported project, I was at least able to load scene settings and hierarchy, with objects that are built in the engine. However, I see that I luck understanding on how to load assets from the scene. Specifically what I did:

  1. Edited scenes.json beforehand to be one single scene descriptor, instead of container

  2. Tried loading scene with:

app.loadSceneHierarchy('./scene/scenes.json', (err, entity) => {
      console.log(err)
      console.log(entity)
    })

And what I got on loading (including visually blank scene, however background color was blue, as a clearcolor parameter of main camera specified):

script 'orbitCamera' is not found, awaiting it to be added to registry
...
script 'touchInput' is not found, awaiting it to be added to registry
...
script 'mouseInput' is not found, awaiting it to be added to registry
...
script 'keyboardInput' is not found, awaiting it to be added to registry

index.js:55 null                       // no error, so seems like scene loaded
index.js:56 qs {name: "Root", ...}     // scene root with correct children

It seems like there should be asset-handling code somewhere to account to everything that scene uses, and there is also a json descriptor with alot of asset enumeration, including missing scripts and what I expect to be meshes and textures.

On the self-hosting page there is not much of explanation of how exactly this format of project works.


So my questions are as follows:

  • can I do the asset handling with raw engine in a case like that?
  • if I use rest API for getting a scene descriptor, will it be the same thing as project export?

Thanks.


#8

The editor does add some boilerplate code on top of the engine to do certain things such as preload assets etc. This export of the model viewer project would give you a better idea on what is done and if there is anything to mimic in your engine only project: https://www.dropbox.com/s/j7z5whtwvt5ck7q/Model%20Viewer%20Export.zip?dl=0


#9

Yes, that is exactly what I wanted! Both of these project archives are very helpful, thank you @yaustar. It seems that a desired pipeline is possible, I’m very happy :slight_smile: