Git Product home page Git Product logo

TypeError: Failed to execute 'createImageBitmap' on 'Window': The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'. about three-loader-3dtiles HOT 17 CLOSED

2226174644 avatar 2226174644 commented on May 30, 2024 1
TypeError: Failed to execute 'createImageBitmap' on 'Window': The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.

from three-loader-3dtiles.

Comments (17)

2226174644 avatar 2226174644 commented on May 30, 2024

I have sent the 3DTiles to your gmail @Avnerus .Hope it can help solve the problem.

from three-loader-3dtiles.

Avnerus avatar Avnerus commented on May 30, 2024

Hey there!
Thank you for reporting this and also thank you for your email with the tiles. I will look into them shortly.
In the meantime, could you tell me what you used to create the tileset? Was it tiled on Cesium ION? It looks a bit different than the format I usually worked with. Please also specify any settings that you used to create the tileset. Thank you!
/Avner

from three-loader-3dtiles.

2226174644 avatar 2226174644 commented on May 30, 2024

Thanks for your reply.
For the tileset ,we used our own program to create it .And it wasn't tiled on Cesium ION . It can be loaded in the Cesium without Cesium ION.
image

After tracing the source,I logged the tile in the contentLoader and compared the example 3dtiles with mine in the tiles.content.gltf.image. The Detail info :
image
It looks like the function contentLoader which is in the options of Tileset3D cann't provide the correct 'tile' ?
Is the root of the problem from loaders.gl?

from three-loader-3dtiles.

Avnerus avatar Avnerus commented on May 30, 2024

Hi @2226174644, thanks again for the detailed info.
Are you able to try the current build that's in dev? I pushed a patch which should resolve the problem (has to do with resolving texture paths when they are external to the glTF). However, please use loadersGlGltf: false. In the next release, I am leaning toward removing the hybrid mode of processing glTFs in both loaders.gl and Three.js, as it is getting difficult to maintain.
Let me know if it works!
PS. Are you planning to open-source your custom tiler?
/Avner

from three-loader-3dtiles.

2226174644 avatar 2226174644 commented on May 30, 2024

yeah,I have tried your current build that's in dev and used loadersGlGltf: false. It can load these images and models with without any error. However, the final result is not very good... just like--
image
It's really confusing...Can you load the complete model there?
For open-source,I'm not sure.Because modeling is the work of other colleagues and the tiler is like an earlier versions without some functions, such as KTX2 .I'll let you know if there's any news.

from three-loader-3dtiles.

Avnerus avatar Avnerus commented on May 30, 2024

Hi, I ran this quickly with debug (debug: true in options, and scene.add(runtime.getTileBoxes()) ),
it seems there is mismatch between the tile's bounding volume and model's transform, something that I haven't yet come across in models tiled by Cesium ION or RealityCapture. If you can see this properly in CesiumJS, could you check how the bounding volumes appear there? It might be there is a difference in how to transformations apply in loaders.gl and CesiumJS.

image

from three-loader-3dtiles.

Avnerus avatar Avnerus commented on May 30, 2024

Hi, I ran this quickly with debug (debug: true in options, and scene.add(runtime.getTileBoxes()) ),
it seems there is mismatch between the tile's bounding volume and model's transform, something that I haven't yet come across in models tiled by Cesium ION or RealityCapture. If you can see this properly in CesiumJS, could you check how the bounding volumes appear there? It might be there is a difference in how to transformations apply in loaders.gl and CesiumJS.

image

from three-loader-3dtiles.

2226174644 avatar 2226174644 commented on May 30, 2024

Hi~ I used the options(debug: true) ,it likely has no Tile the you circled in my scene?
image
About the bounding volumes In CesiumJS:
image
Excuse me for giving you so much trouble, thanks.

from three-loader-3dtiles.

Avnerus avatar Avnerus commented on May 30, 2024

Got it, thank you and no worries!
I suspect there might be a problem in the way the library handles the tile transforms back to three.js, but it is specific to the way the transforms are applied in your custom tileset since the issue does not occur in tilesets from RealityCapture and Cesium ION.
It is anyway in the roadmap to re-visit the transform logic, so hopefully this could be fixed soon.
In the meantime I could ask you to run a few more tests:

  1. Have you tried loading the 3d tiles using deck.gl?
  2. Is it possible that you could reset the transforms/geo-locations in your tiler?

Thanks!

from three-loader-3dtiles.

2226174644 avatar 2226174644 commented on May 30, 2024

Because I've never used deck.gl ,It took me some time to learn it but couldn't load the 3dtiles in the end.I also tried using mapbox-3dtiles to load and log it,it could be loaded without error,but there is nothing at the same latitude and longitude as cesium (sorry...).
And because the 3dtiles are transformed from real scenes,so I can't reset the transforms At this stage.I can gmail another part of the whole data . May it can help you?
PS. According to my colleague, the 3dtiles is handled according to the cesium 3dtiles standard, and no special content is added .The coordinate system of the 3dtiles is the standard ellipsoidal coordinate system of ENU (The ellipsoidal coordinate system of cesium). It used to be mainly used Cesium for UE to Parse. Also it can be parsed by CesiumJS as we can see.

from three-loader-3dtiles.

Avnerus avatar Avnerus commented on May 30, 2024

@2226174644 Thank you again for the input. I haven't tried the new data yet, but I just pushed some updates, two of which help with the loading of your tileset. It looks now pretty good on my end:
Screenshot from 2021-12-06 16-57-45

Let me know how it works for you.

from three-loader-3dtiles.

2226174644 avatar 2226174644 commented on May 30, 2024

Fantastic! It also works very well here with me.
image
Thank you very much again for your help!

By the way,have you ever encountered this problem when running? Although it has no impact on the operation of the program, why does it report such an error?
image

from three-loader-3dtiles.

2226174644 avatar 2226174644 commented on May 30, 2024

And I found another issue. if the quantity of child node is more than 2 in the tileset.json(Combination of the first two models),for example:
image
there seems to be something wrong with its texture mapping and boundingVolume.Just like:
Snipaste_2021-12-07_15-53-08
image
I will email the new file which contains the two-part model so that you can have a try. Thanks!

from three-loader-3dtiles.

Avnerus avatar Avnerus commented on May 30, 2024

Hi @2226174644,
Yes I see there is another issue here. So far I have worked only with tilesets that have just one transformation matrix at the top (root or first child), and then everything under that is in relation to that. I will look into this further and let you know.

from three-loader-3dtiles.

Avnerus avatar Avnerus commented on May 30, 2024

@2226174644 I have been doing some work with handling tile transforms and tried also to support your case. Could you please try the recent version? Thanks.

from three-loader-3dtiles.

2226174644 avatar 2226174644 commented on May 30, 2024

Excellent! It works very well.Thank you very mush!

from three-loader-3dtiles.

Avnerus avatar Avnerus commented on May 30, 2024

Great! Regarding math.gl assertion, it occurs when the camera has some invalid data. Might be a race condition when the update occurs before the camera object has all of its properties. I opened a separate issue for that, so I am now closing this one. Thank you for the cooperation and please let us know if you get a chance to open-source some of your work, or are interested to in contributing new features to the loader!

from three-loader-3dtiles.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.