-
Notifications
You must be signed in to change notification settings - Fork 189
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
Gaps from tiles when downloading from Google #430
Comments
This a well known problem. I'll try to carry out some experiments later this week. I'll report the results in this issue. |
Thank you for letting me know aside from this I really love the add-ons I really hope that I can figure out how to fix this problem |
May I know the coordinates of your area of interest? That's needed for testing. |
-73.57432,45.52248,-73.56306,45.53030 Thnk_u-) |
The problem is seemingly caused by floating point errors. Internally Blender uses single precision 32 bits format for floating point variables, while Python use double precision 64 bits one. As a test I tried to replace Blender floating point structures with Python ones. It seems it helped to decrease the width of gaps by two. The gap in your area of interest used for comparison is marked with the red color: Gap in the current release of the Blosm addon; Gap after replacing Blender floating point structures with Python ones: |
I also made changes in Blender's built-in glTF importer, on which the Blosm addon relies to import Google 3D Tiles. So it will be required to change the glTF add-on as well. |
Great to see that you're managing this improvement vvoovv! Can you drop a note when there's a release out that has these changes included (including an updated glTF importer, I guess)? |
wow...thank you for figuring this out. I'm amazed actually. So I guess I will just need to wait for everything to get an update for it to work properly? Or is there something I can do in the mean time to make it work? Thank you either way for your help. |
Making changes in a Blender's built-in addon and having them a future Blender release will take time. I'll figure out how to override glTF stuff from the Blosm addon. |
Hi @vvoovv, thanks for your great work! |
Hi @cyberlecs I hope to release it by the end of January. |
Thanks! Just tested here, the result is much better! |
Some technical details. Internally Blender uses single precision 32 bits format for floating point variables, while Python uses double precision 64 bits one. The more the magnitude of a variable is, the more the precision loss is, when converting from a Python structure to a Blender one. That can be seen in the example below. Enter the first two lines below in Blender's Python console to reproduce the example.
Each Google 3D Tile is positioned on the Earth surface in the system of reference with the center in the Earth's center. A typical coordinate has millions of meters. The precision is lost significantly after the conversion to Blender's structure. To decrease the precision loss an offset can be applied to the coordinates of each Google 3D Tile. The addon temporarily replaces a function in Blender's built-in glTF addon with a patched one, which does that. After the import the addon restores the original function of the glTF addon. |
amazing job! I will test this out asap
…On Wed, Feb 7, 2024 at 5:50 PM vvoovv ***@***.***> wrote:
Some technical details.
Internally Blender uses single precision 32 bits format for floating point
variables, while Python uses double precision 64 bits one. The more the
magnitude of a variable is, the more the precision loss is, when converting
from a Python structure to a Blender one. That can be seen in the example
below. Enter the first two lines below in Blender's Python console to
reproduce the example.
from mathutils import Vector
Vector((1266116.7, -4293231.2, 4528524.9))
Output: Vector((1266116.75, -4293231.0, 4528525.0))
Each Google 3D Tile is positioned on the Earth surface in the system of
reference with the center in the Earth's center. A typical coordinate has
millions of meters. The precision is lost significantly after the
conversion to Blender's structure.
To decrease the precision loss an offset can be applied to the coordinates
of each Google 3D Tile. The addon temporarily replaces a function in
Blender's built-in glTF addon with a patched one, which does that. After
the import the addon restores the original function of the glTF addon.
—
Reply to this email directly, view it on GitHub
<#430 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3463GHZAVPCEKXMXF2X7X3YSQAMZAVCNFSM6AAAAABAOFE77CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZTGA3DIOJQGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
How do I get the latest version?
On Thu, Feb 8, 2024 at 5:42 PM Matthew Lipscomb ***@***.***>
wrote:
… amazing job! I will test this out asap
On Wed, Feb 7, 2024 at 5:50 PM vvoovv ***@***.***> wrote:
> Some technical details.
>
> Internally Blender uses single precision 32 bits format for floating
> point variables, while Python uses double precision 64 bits one. The more
> the magnitude of a variable is, the more the precision loss is, when
> converting from a Python structure to a Blender one. That can be seen in
> the example below. Enter the first two lines below in Blender's Python
> console to reproduce the example.
>
> from mathutils import Vector
> Vector((1266116.7, -4293231.2, 4528524.9))
>
> Output: Vector((1266116.75, -4293231.0, 4528525.0))
>
> Each Google 3D Tile is positioned on the Earth surface in the system of
> reference with the center in the Earth's center. A typical coordinate has
> millions of meters. The precision is lost significantly after the
> conversion to Blender's structure.
>
> To decrease the precision loss an offset can be applied to the
> coordinates of each Google 3D Tile. The addon temporarily replaces a
> function in Blender's built-in glTF addon with a patched one, which does
> that. After the import the addon restores the original function of the glTF
> addon.
>
> —
> Reply to this email directly, view it on GitHub
> <#430 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/A3463GHZAVPCEKXMXF2X7X3YSQAMZAVCNFSM6AAAAABAOFE77CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZTGA3DIOJQGU>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
Through the download link in your purchase confirmation email. |
I love your add-on but when I try and download anything from Google there are basically gaps and some kind of grit that you can see through. I really don't know what to do about this because anyone have any advice? https://youtu.be/mGXrTx0BXog
The text was updated successfully, but these errors were encountered: