Adrian3D

BABYLON.GLTF2Export texture horizontally mirrored has no effect

Recommended Posts

Hello Babylon community,
 
When using the BABYLON.GLTF2Export feature, I noticed that textures I mirror horizontally (via diffuseTexture.vScale = -1) do not change the glTF export as desired.

Is this a known / accepted limitation or is there a misunderstanding from my side? Also any workaround is appreciated (so far I mirror the texture again manually after exporting them).

Here a playground example to illustrate the problem: http://www.babylonjs-playground.com/#1GXSPK#17
Uncomment line #11 ( = // oStandardMaterialHightlighter.diffuseTexture.vScale = -1;) and compare the export results.

Any help is appreciated (pinning @kcoley as you helped me so greatly last time)

 

Share this post


Link to post
Share on other sites

@Adrian3D fyi, I am implementing the KHR_texture_transform with fallback behavior to handle your use case of scaling the v parameter, though implementing the architecture for extensions in the exporter took a bit of time.  I should be ready for a PR within a day or two.

Share this post


Link to post
Share on other sites

@Adrian3D it took much longer than expected, but you should now be able to serialize uScale, vScale, and other texture transform properties to glTF.  The original texture will be modified on serialization.  Let me know if that works for you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.