Back to the Shapespark home page

Can't set corrections in the shapespark-extras-json


I would like to know if there are any keys that can be used to set base color texture correction values in the shapespark extra json.

On the documentation it seems like this is not possible. I have done some trial and error with what could be the keys but none seem to work.

Is this a feature that is not implemented or is there some secret?

Thanks in advance


It is not possible to change base color correction with extras.json.


Thank you for your quick response.

Is this something you are considering to add?

We haven’t been considering adding support for it in the near future.

Are you also using the viewer API? If so, I could show you how to set the base color correction through the API.

Yes, I do. Please show me how to set the base color correction through the API.

Adding to what’s documented here:

you can adjust color correction with the following properties of Material objects:

  • baseColorTextureCorrection : boolean,
  • baseColorTextureContrast : number,
  • baseColorTextureHslOffset.h : number,
  • baseColorTextureHslOffset.s : number,
  • baseColorTextureHslOffset.l : number

After adjustment call Material.setUniforms() and Viewer.requestFrame().