Scale Factor; Which Units to Consider?

Hi All,

I have an object in Max 2021 and am exporting to glTF using the Babylon.js exporter tool.

I am using cm as my global units because my USDZ file comes from this same file, and USDZ uses cm. I use Substance Painter to work on the models and export USDZ. Ideally, I’d have one file from which I can generate my USDZ for iOS and my glTF as well (from Max).

From Substance Painter, glTF scale is always wrong unless I manually change the Max global units to meters and then re-scale the object.

So, what would be the scale factor for an object to be exported as glTF, in a Max scene with global cm? Is the scale factor in meters? Leaving at 1 gives me a huge mesh.

I tried .2286 and the mesh is tiny. I tried 22.86 and the mesh is still tiny. Do I have to ‘save options’ for the options to take effect? I’ve been doing that but just checking.

I’ve also tried setting scale factor to 100 as there are 100 cm in a m, but I’m grasping at straws here.

I’m still testing but am hoping someone can shed light on how scale factor is working and which units I should be considering.

Thanks!

Adding @Guillaume_Pelletier for the exporter side of things.

1 Like

as far I know substance painter is working better with meter. To convert the cm to meter you have to scale 1/100 which is 0,01.
if you keep 1, one cm become one meter, and your cube is becoming huge.

Thanks Guillaume!

Does the Babylon.js exporter use your global units then for world units? I’m using cm only because USDZ uses cm, and I prefer to have one source model than two scaled differently.

This exporter is fantastic by the way. I love all of the control I have over various settings for glTF export, including blend and opaque. Substance gives me no control over how the glTF is exported.

Another question, what is the best setup for PBR materials in Max from Substance Painter for glTF? Can I use an Arnold rendering setup, or should I just stick to basic Physical Material? I can ask this in another thread too if needed.

Thanks!

By default, the exporter NOT taking care of units, while this is related to the runtime usage. It takes the unit as it (has babylon do). Regarding the material, i’m 100% sure we are exporting Physical Material with a pretty good result. I do not know much more about Arnold but you can find informations here
Enjoy.
PS- could you tell me more about the usage? company ?

1 Like

As said, BJS does not have a units. You just need to be consistent for all the exports of a given scene, or you will be doing scaling fix-ups post load for ones that do not match.

If you ever think that your work will be used on an XR device, (Oculus, Hololens, MagicLeap, etc), you need to export as meters though. This is because as you walk 1 meter, the device will indicate a movement of 1. If you have a 2 unit wide mesh, it will appear to be the size of a closet.

2 Likes

Thanks JC!

Hi Guillaume,

I work for a company producing renders, stills, and AR/VR for some high-profile clients. That’s probably as much as I can say about that.

Can you tell me why my metal material isn’t showing up properly in glTF export? I’m using an AR app to preview my work. I have a metalness map in the Max Physical Material metalness slot but it’s showing up white (should be bright aluminum, so the color map is white in Substance).

I’m also trying to get opacity to work with physical materials. Where would you normally put this map? Cutout? Transparency? Cutout works but it seems like the wrong slot as I believe this would be 1-bit alpha normally.

I must be missing some setting somewhere. The same maps for USDZ work fine.

Do you have an ideal material setup somewhere for Max Physical Materials that I could use as a template? Anyone feel free to answer this one if you would. Even just a Windows snippet of your material setup would be helpful.

Thanks!

I tried Arnold and was not happy with results. Still looking for the best Physical Material setup since I’d normally use VRAY. :smiley: