BabylonJS / Exporters

Exporters for Babylon.js and gltf file formats
Other
597 stars 307 forks source link

3ds Max Exporter: texture offset with "use real-world scale" #1106

Closed outofinsight closed 3 months ago

outofinsight commented 9 months ago

I've stumbled upon a little issue today. I'm using the option for real-world scale for texture coordinates in 3ds Max. It seems that this switch affects the coordinate system (it's not just a simple tiling conversion based on real world units).

Basically, if the mapping of an object has been done with the "use real-world scale" option for its corresponding texture map, the offset adjustment (I'm guessing conversion from 3ds Max coordinate system to gltf) that happens on export from 3ds Max is not necessary.

rws_example

You can see in the attached example how real-world scale option, when used, offsets the texture (both models have the exact same mapping applied) by 0.5. Texture scale remains the same.

So, if I'm setting up my mapping using real-world scale on, I will be seeing the left texture mapping preview in 3ds Max but will be actually getting the right in glTF after conversion applies the offset compensation.

Think it might be nice for the converter to check if the texture is set with "use real-world scale" option on and if so not apply offset adjustments?

SergioRZMasson commented 3 months ago

We are currently not adding new features to the exporters. Feel free to make a contribution to the repo.