Exporting GLB

Hello fellow Keyshooters!

Does anyone know how to operate with GLBs?
How to export them, what it needs to have a small file + good quality of texture?
How does the texture stays the same as in Keyshot?

Keyshot:

Exported GLB:
image

Higher dpi settings in the export (up to 350dpi) does not help.

Whole model:
~88k triangles
12 different materials (all of them are needed)

Also, when I upload the file to a GLB viewer like model-viewer it gives me a validation report such as “Image has non-power-of-two dimensions”, but the textures I am using are by the power of two: 2048x2048px…or am I misunderstanding that?

One error says:"Image has non-power-of-two-dimensions: 232x49324px…I have no idea where this is coming from. Do I have insight in Keyshot of how many pixels are covered/used by one specific material for one specific part of the whole model?

Hope someone can help me.

The weird resolutions are caused by the fact KS build textures based on DPI which makes very little sense in my opinion. It should ask you for a pixel resolution so you are in control of the output size of the textures. Especially since mostly they are for on screen usage.

So the error is not about your textures but about those baked in the GLB. 232 is for example not a power of 2 same for 449324.

I did a bit of Google and if I understand correctly textures doesn’t have to be power of two in the GLB format but a client application should scale them like that since older GPUs can’t handle textures with sizes which are not the power of two.

Client implementations SHOULD resize non-power-of-two textures (so that their horizontal and vertical sizes are powers of two) when running on platforms that have limited support for such texture dimensions.

If you want/can you may send me the file with a PM and I can try something. Maybe the baking can fixed with changing the UV a bit or check ‘keep original uv’ in the generate popup.

Hi Oscar,
thanks for replying and explaining this to me.
I totally agree with you, that some things are making no sense at all. Unfortunately there is not a lot of information out there how to operate with GLBs or how to set the settings, especially not from Keyshot.
Thanks for the offer, but in the end my client decided to hire an agency who are specialist with GLBs, using other software for that and because I told him I was limited with the options given in Keyshot.

Yeah if GLB is really the target format I think it’s easier not to use KS at all but just a simple modeler and for example Substance Painter if you want nice textures.

Renderers like KeyShot/V-Ray/Octane/etc. all use different kind of materials so the renderer can give different materials a different ‘treatment’. With GLB you create things for real time viewers which are mainly PBR materials.

And if you use for example labels in KS they need to be baked and that’s out of your controle. While if you’ve a 3D Model with a nice UV map and create the textures using Blender/Substance Painter etc it will translate more 1:1.

Depending on complexity, 3D Painter for Windows (free) is actual quite funny and does GLB.

1 Like