Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapy.cz import seems to be broken #330

Open
jiri-psenicka opened this issue Aug 15, 2024 · 2 comments
Open

Mapy.cz import seems to be broken #330

jiri-psenicka opened this issue Aug 15, 2024 · 2 comments

Comments

@jiri-psenicka
Copy link

jiri-psenicka commented Aug 15, 2024

It seems like support for Mapy.cz is broken, model is weirdly tilted after import and textures are broken / do not project properly.
Google Maps works fine tho.

This problem is also present using older plugin versions 6.1 and 6.2 with according Blender and RenderDoc versions.

@lagneada
Copy link

In the google_maps.py file (from MapsModelImporter), there’s a commented line that works properly for texture mapping.
The current block of code calculates the uvOffsetScale dynamically based on _uParams, but this can cause issues with texture projection. Instead of using the current block, you should comment out the block and use the simple, uvOffsetScale.

current code:

        #uvOffsetScale = [0, -1, 1, -1]
        
        uvOffsetScale = [
            _uParams[2][2] / _uParams[0][2],
            (_uParams[3][2] - 1) / _uParams[1][2],
            _uParams[0][2],
            -_uParams[1][2],
        ]

replace with:

        uvOffsetScale = [0, -1, 1, -1]
        ```        
        uvOffsetScale = [
            _uParams[2][2] / _uParams[0][2],
            (_uParams[3][2] - 1) / _uParams[1][2],
            _uParams[0][2],
            -_uParams[1][2],
        ]
        ```

@T0biasCZe
Copy link

thank you, this fix worked, now the textures are imported correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants