Full setup of lights, environment and background


(Klaasnienhuis) #1

Hi,
I'm working on a project which involves uploading many models to sketchfab. My estimate is about 100 and more might be added over time. They all should be loaded into the same looking scene: background, lights and environment. Setting this up by hand will be a chore and very error prone. Is there a way to do this through the API?

I can think of three approaches. Either set these properties through the API for each uploaded scene. Or manually setup a sketchfab scene like I want it and then copy it through the API and replace the model in the copy with a newly uploaded model (also through API). Finally I could upload all 100 models into a single scene and use the viewer API to only turn on one model at a time. I assume this will be a pretty heavy scene, or do hidden models not influence the loading time? There are no textures by the way, just models.

I was looking at the google sheets experiment you've posted to manage the uploads.

Would either approach be possible?

Klaas


#2

Hi Klaas,

I think the Google Sheets experiment will be the best solution for now. With it, you can upload the 100 models and patch them all with the same settings.

I have some more robust working versions of the sheet script that will just need the proper model settings added. Could you show me an example model with all the settings you need?

James


(Klaasnienhuis) #3

Thanks James, I've sent you a link with a message.
Is there documentation on the API to change the lighting and environment settings? I couldn't find it.


#4

Thanks, I'll take a look and get back to you.

Not yet, we don't really want it in the wild until it's more stable.


(Richardkarlgregg) #5

Hey @james & @klaasnienhuis

How far did you get with this?

We are in a similar position in that we need to add about 800 models to sketchfab over the next few months, all with the same settings, so are currently looking at automating this.

Have any updates to the API been made that'll make this easier?

We got a bulk uploader working using the google sheets code, but haven't been able to patch the lighting settings, guessing this hasn't been implemented or if it has it's not doucmented :slight_smile:

Thanks in advanced for your help.


#6

Our presets feature in the editor is getting close, but I'm not sure of an exact ETA yet ( @mauricesvay ? ). While this will make copying settings between models much, much faster, it will still be done via the editor UI.

It's not yet on the short-term roadmap to allow patching light settings. I suppose once a preset has been defined on your account manually, there should be a way to use it via the API :thinking:


(Richardkarlgregg) #8

Thanks for the speedy response @james :slight_smile:

The preset feature sounds really promising so I'm excited about that!

And yeah it'd be great if light settings could be set via patch or better yet allow a custom preset to applied via patch after an automated upload.

We love Sketch Fab, especially after trying every solution under the sun :slight_smile:

At the moment we have the junior developer manually setting up settings.


(Mauricesvay) #9

We are currently testing the Presets feature with a limit number of people. It currently supports shading, orientation, lighting, camera, postprocessing and background settings.

@richardkarlgregg I don't think that preset would help for 800 models (automation would be better), but I can share the prototype if you want to help test the feature.


(Klaasnienhuis) #10

@james, @richardkarlgregg,
with most of my projects I first setup a single scene with the perfect lighting manually. Then I record that in code and apply it to every iteration of the project by code. Actually all settings I need can be patched to other scenes. Just drop me a line if you need help with this.


(Richardkarlgregg) #11

Thanks @mauricesvay would love to help test out the preset prototype if possible :slight_smile:

Hi @klaasnienhuis big fan of your work with SketchFab, it was some stuff you did for a configurator that inspired some of our own solutions.

Are you using the API or some other magical method to apply settings to every iteration of a project?

Thanks for your responds guys!


(Klaasnienhuis) #12

Hi @richardkarlgregg, that's nice to hear! I'm actually using the data API to patch the lighting (and all other scene settings and materials). However, I'm using the V2 API. I haven't tested if it works in the V3 API.


(Richardkarlgregg) #13

Thanks @klaasnienhuis, Ahhh think you might have provided us with enough of a clue there :slight_smile:

Will let you know how we get on.


#14

These features have not been implemented in V3 yet.

Although they do work in V2, they are undocumented and subject to change.