CesiumGS / cesium-unity

Bringing the 3D geospatial ecosystem to Unity
https://cesium.com/platform/cesium-for-unity/
Apache License 2.0
319 stars 75 forks source link

Rendering in Linux Editor #475

Open ericjohnson97 opened 5 days ago

ericjohnson97 commented 5 days ago

My current setup is the following:

Ubuntu 22.04 Unity 2022.3.20f1 Cmake 3.28.6 Dotnet 8.0.300 NASM 2.15.05

I have been trying to give my image generator project linux support (https://github.com/ericjohnson97/iq_image_generator), but I have been running into some issues getting things going.

I have yet to be able to get the project to run and render tiles in the editor. I have been able to compile the game into an executable and get it to run and render on other computers sometimes. The executable errors might be seperate issues, so for this issue I want to focus on being able to get my setup to run and render in the unity editor on linux.

For context I have this PR on my project that has cesium-unity as a submodule and is supposed to be setup using the development instructions. https://github.com/ericjohnson97/iq_image_generator/pull/8

However when I run the project in my unity editor I the tiles never show up. the only error message that ever shows is this.

[2024-07-01 12:03:12.260] [error] [TilesetJsonLoader.cpp:687] Error when parsing tileset JSON, error code 3 at byte offset 0

UnityEngine.Debug:Log (object)
Reinterop.ReinteropInitializer:UnityEngine_Debug_CallLog_FA05wu8x__otZNsgdHTnU9A (intptr) (at ./Reinterop/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:3027)
Reinterop.ReinteropInitializer/ActionNativeFunction:Invoke () (at ./Reinterop/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:1972)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()

I added some extra prints in TilesetJsonLoader.cpp to see the response. it seems like sometimes the response from google maps is just

[2024-07-01 12:03:12.253] [info] [TilesetJsonLoader.cpp:680] Raw response data: glTF

UnityEngine.Debug:Log (object)
Reinterop.ReinteropInitializer:UnityEngine_Debug_CallLog_FA05wu8x__otZNsgdHTnU9A (intptr) (at ./Reinterop/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:3027)
Reinterop.ReinteropInitializer/ActionNativeFunction:Invoke () (at ./Reinterop/Reinterop.RoslynSourceGenerator/ReinteropInitializer.cs:1972)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()

and the the json parser fails to parse

other times the response is actual json and it seems like it gets past parsing, but I still don't see any tiles.

[2024-07-01 12:03:11.926] [info] [TilesetJsonLoader.cpp:680] Raw response data: {"asset":{"version":"1.0"},"geometricError":1e+100,"root":{"boundingVolume":{"box":[0,0,0,7972671.25,0,0,0,7972671.25,0,0,0,7945940.3928064629]},"geometricError":1e+100,"refine":"REPLACE","children":[{"boundingVolume":{"box":[783970.49889171741,-3926720.0304121734,4876463.4531571139,17835.049314548589,-89662.847763042155,111394.91823185503,887278.36064843787,176490.63924132282,4.28205433224812e-11,-102623.66610272753,515924.00942497858,431702.94321738795]},"geometricError":83415.982164798217,"refine":"REPLACE","content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9kZWRhdGEucGxhbmV0b2lkPWVhcnRoLG5vZGVfZGF0YV9lcG9jaD05NzEscGF0aD0yMTYwNCxjYWNoZV92ZXJzaW9uPTYsaW1hZ2VyeV9lcG9jaD05OTYsYWxpZ25tZW50X3ZlcnNpb249Uk9DS1RSRUVfOTgyX0dPT0dMRV9EQVRVTV8yMDI0MDIwNlQwNzUzWl9nZW5lcmF0ZWRfYXRfMjAyNDA2MjZUMTIwN1o.glb"},"children":[{"boundingVolume":{"box":[419386.37863032566,-4243447.4477059767,4683014.8303509215,6067.5233181417425,-61604.598079883057,68299.0784352507,451329.88007295632,44452.113265406086,2.0575992956449172e-11,-24100.129279323479,244692.71893637249,222849.63499106214]},"geometricError":44151.436654930796,"refine":"REPLACE","content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9kZWRhdGEucGxhbmV0b2lkPWVhcnRoLG5vZGVfZGF0YV9lcG9jaD05NzEscGF0aD0yMTYwNDAsY2FjaGVfdmVyc2lvbj02LGltYWdlcnlfZXBvY2g9OTk2LGFsaWdubWVudF92ZXJzaW9uPVJPQ0tUUkVFXzk4Ml9HT09HTEVfREFUVU1fMjAyNDAyMDZUMDc1M1pfZ2VuZXJhdGVkX2F0XzIwMjQwNjI2VDEyMDda.glb"},"children":[{"boundingVolume":{"box":[216549.29669588187,-4381463.6982052363,4577508.9696115628,2685.3595638433339,-54661.749663263123,57482.271017132138,226756.83003697082,11139.848723426809,1.0068190631033419e-11,-5837.8232673102611,118831.62251813165,113273.55272320006]},"geometricError":22666.815372077275,"refine":"REPLACE","content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9kZWRhdGEucGxhbmV0b2lkPWVhcnRoLG5vZGVfZGF0YV9lcG9jaD05NzAscGF0aD0yMTYwNDA0LGNhY2hlX3ZlcnNpb249NixpbWFnZXJ5X2Vwb2NoPTk5NSxhbGlnbm1lbnRfdmVyc2lvbj1ST0NLVFJFRV85ODJfR09PR0xFX0RBVFVNXzIwMjQwMjA2VDA3NTNaX2dlbmVyYXRlZF9hdF8yMDI0MDYyNlQxMjA3Wg.glb"},"children":[{"boundingVolume":{"box":[109065.051735753,-4442439.8250499442,4524505.0470991405,1298.8540534372285,-52909.448345982884,54240.578785164631,113640.99593326554,2789.72986524764,4.9819163394863766e-12,-1426.2111848375807,58097.402718136582,56705.773375168115]},"geometricError":11478.632856631515,"refine":"REPLACE","content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9kZWRhdGEucGxhbmV0b2lkPWVhcnRoLG5vZGVfZGF0YV9lcG9jaD05NzAscGF0aD0yMTYwNDA0MCxjYWNoZV92ZXJzaW9uPTYsaW1hZ2VyeV9lcG9jaD05OTUsYWxpZ25tZW50X3ZlcnNpb249Uk9DS1RSRUVfOTgyX0dPT0dMRV9EQVRVTV8yMDI0MDIwNlQwNzUzWl9nZW5lcmF0ZWRfYXRfMjAyNDA2MjZUMTIwN1o.glb"},"children":[{"boundingVolume":{"box":[0,0,0,7972671.25,0,0,0,7972671.25,0,0,0,7945940.3928064629]},"geometricError":1e+100,"content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYuYnVsa21ldGFkYXRhLnBsYW5ldG9pZD1lYXJ0aCxidWxrX21ldGFkYXRhX2Vwb2NoPTk4MixwYXRoPTIxNjA0MDQwLGNhY2hlX3ZlcnNpb249NixhbGlnbm1lbnRfdmVyc2lvbj1ST0NLVFJFRV85ODJfR09PR0xFX0RBVFVNXzIwMjQwMjA2VDA3NTNaX2dlbmVyYXRlZF9hdF8yMDI0MDYyNlQxMjA3Wg.json"}}],"extras":{"comment":"path = '21604040'"}},{"boundingVolume":{"box":[327109.63121462334,-4431581.9960094215,4524503.7682009926,3893.4331071308225,-52781.984850597073,54240.578785164631,113367.22482028665,8362.4688921461511,4.9819163394863766e-12,-4322.6998833676871,58601.412552771086,57335.837523781091]},"geometricError":11478.632856631515,"refine":"REPLACE","content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9kZWRhdGEucGxhbmV0b2lkPWVhcnRoLG5vZGVfZGF0YV9lcG9jaD05NzAscGF0aD0yMTYwNDA0MSxjYWNoZV92ZXJzaW9uPTYsaW1hZ2VyeV9lcG9jaD05OTUsYWxpZ25tZW50X3ZlcnNpb249Uk9DS1RSRUVfOTgyX0dPT0dMRV9EQVRVTV8yMDI0MDIwNlQwNzUzWl9nZW5lcmF0ZWRfYXRfMjAyNDA2MjZUMTIwN1o.glb"},"children":[{"boundingVolume":{"box":[0,0,0,7972671.25,0,0,0,7972671.25,0,0,0,7945940.3928064629]},"geometricError":1e+100,"content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYuYnVsa21ldGFkYXRhLnBsYW5ldG9pZD1lYXJ0aCxidWxrX21ldGFkYXRhX2Vwb2NoPTk4MixwYXRoPTIxNjA0MDQxLGNhY2hlX3ZlcnNpb249NixhbGlnbm1lbnRfdmVyc2lvbj1ST0NLVFJFRV85ODJfR09PR0xFX0RBVFVNXzIwMjQwMjA2VDA3NTNaX2dlbmVyYXRlZF9hdF8yMDI0MDYyNlQxMjA3Wg.json"}}],"extras":{"comment":"path = '21604041'"}},{"boundingVolume":{"box":[107118.72402808459,-4329410.0011392692,4631778.5931010619,1263.7391925495203,-51479.027496621195,55432.907672326939,110817.88222509679,2720.426313655279,4.9730246229602255e-12,-1471.1212081799272,59926.834249693638,55685.952465275564]},"geometricError":11186.475745935792,"refine":"REPLACE","content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9kZWRhdGEucGxhbmV0b2lkPWVhcnRoLG5vZGVfZGF0YV9lcG9jaD05NzAscGF0aD0yMTYwNDA0MixjYWNoZV92ZXJzaW9uPTYsaW1hZ2VyeV9lcG9jaD05OTUsYWxpZ25tZW50X3ZlcnNpb249Uk9DS1RSRUVfOTgyX0dPT0dMRV9EQVRVTV8yMDI0MDIwNlQwNzUzWl9nZW5lcmF0ZWRfYXRfMjAyNDA2MjZUMTIwN1o.glb"},"children":[{"boundingVolume":{"box":[0,0,0,7972671.25,0,0,0,7972671.25,0,0,0,7945940.3928064629]},"geometricError":1e+100,"content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYuYnVsa21ldGFkYXRhLnBsYW5ldG9pZD1lYXJ0aCxidWxrX21ldGFkYXRhX2Vwb2NoPTk4MixwYXRoPTIxNjA0MDQyLGNhY2hlX3ZlcnNpb249NixhbGlnbm1lbnRfdmVyc2lvbj1ST0NLVFJFRV85ODJfR09PR0xFX0RBVFVNXzIwMjQwMjA2VDA3NTNaX2dlbmVyYXRlZF9hdF8yMDI0MDYyNlQxMjA3Wg.json"}}],"extras":{"comment":"path = '21604042'"}},{"boundingVolume":{"box":[318883.897928701,-4318820.121550017,4631776.2676789183,3788.1731192432744,-51355.010010351558,55432.907672326939,110550.91224031642,8154.7251956951259,4.9730246229602255e-12,-4409.8195646943186,59782.46525701537,55685.952465275564]},"geometricError":11186.475745935792,"refine":"REPLACE","content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9kZWRhdGEucGxhbmV0b2lkPWVhcnRoLG5vZGVfZGF0YV9lcG9jaD05NzAscGF0aD0yMTYwNDA0MyxjYWNoZV92ZXJzaW9uPTYsaW1hZ2VyeV9lcG9jaD05OTUsYWxpZ25tZW50X3ZlcnNpb249Uk9DS1RSRUVfOTgyX0dPT0dMRV9EQVRVTV8yMDI0MDIwNlQwNzUzWl9nZW5lcmF0ZWRfYXRfMjAyNDA2MjZUMTIwN1o.glb"},"children":[{"boundingVolume":{"box":[0,0,0,7972671.25,0,0,0,7972671.25,0,0,0,7945940.3928064629]},"geometricError":1e+100,"content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYuYnVsa21ldGFkYXRhLnBsYW5ldG9pZD1lYXJ0aCxidWxrX21ldGFkYXRhX2Vwb2NoPTk4MixwYXRoPTIxNjA0MDQzLGNhY2hlX3ZlcnNpb249NixhbGlnbm1lbnRfdmVyc2lvbj1ST0NLVFJFRV85ODJfR09PR0xFX0RBVFVNXzIwMjQwMjA2VDA3NTNaX2dlbmVyYXRlZF9hdF8yMDI0MDYyNlQxMjA3Wg.json"}}],"extras":{"comment":"path = '21604043'"}}],"extras":{"comment":"path = '2160404'"}},{"boundingVolume":{"box":[644156.738871098,-4338887.8966627242,4577507.4044036129,8030.2172109633784,-54135.327132854,57482.271017132138,224573.03780582239,33312.263337413242,1.0068190631033419e-11,-17457.248372587852,117687.20903330941,113273.55272320006]},"geometricError":22666.815372077275,"refine":"REPLACE","content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9kZWRhdGEucGxhbmV0b2lkPWVhcnRoLG5vZGVfZGF0YV9lcG9jaD05NzAscGF0aD0yMTYwNDA1LGNhY2hlX3ZlcnNpb249NixpbWFnZXJ5X2Vwb2NoPTk5NSxhbGlnbm1lbnRfdmVyc2lvbj1ST0NLVFJFRV85ODJfR09PR0xFX0RBVFVNXzIwMjQwMjA2VDA3NTNaX2dlbmVyYXRlZF9hdF8yMDI0MDYyNlQxMjA3Wg.glb"},"children":[{"boundingVolume":{"box":[544249.6455332702,-4409867.473864899,4524502.2892376455,6478.6325394448513,-52527.364930550313,54240.578785164631,112820.34213291954,13915.061999017664,4.9819163394863766e-12,-7113.884863166013,57677.854702569479,56705.773375168115]},"geometricError":11478.632856631515,"refine":"REPLACE","content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9kZWRhdGEucGxhbmV0b2lkPWVhcnRoLG5vZGVfZGF0YV9lcG9jaD05NjkscGF0aD0yMTYwNDA1MCxjYWNoZV92ZXJzaW9uPTYsaW1hZ2VyeV9lcG9jaD05OTIsYWxpZ25tZW50X3ZlcnNpb249Uk9DS1RSRUVfOTgyX0dPT0dMRV9EQVRVTV8yMDI0MDIwNlQwNzUzWl9nZW5lcmF0ZWRfYXRfMjAyNDA2MjZUMTIwN1o.glb"},"children":[{"boundingVolume":{"box":[0,0,0,7972671.25,0,0,0,7972671.25,0,0,0,7945940.3928064629]},"geometricError":1e+100,"content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYuYnVsa21ldGFkYXRhLnBsYW5ldG9pZD1lYXJ0aCxidWxrX21ldGFkYXRhX2Vwb2NoPTk4MixwYXRoPTIxNjA0MDUwLGNhY2hlX3ZlcnNpb249NixhbGlnbm1lbnRfdmVyc2lvbj1ST0NLVFJFRV85ODJfR09PR0xFX0RBVFVNXzIwMjQwMjA2VDA3NTNaX2dlbmVyYXRlZF9hdF8yMDI0MDYyNlQxMjA3Wg.json"}}],"extras":{"comment":"path = '21604050'"}},{"boundingVolume":{"box":[759581.80190160661,-4378200.9244315727,4524503.0255712876,9048.22437851017,-52146.201987532091,54240.578785164631,112001.6653594594,19434.132502718057,4.9819163394863766e-12,-9935.4340677467735,57259.317414919962,56705.773375168115]},"geometricError":11478.632856631515,"refine":"REPLACE","content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9kZWRhdGEucGxhbmV0b2lkPWVhcnRoLG5vZGVfZGF0YV9lcG9jaD05NjkscGF0aD0yMTYwNDA1MSxjYWNoZV92ZXJzaW9uPTYsaW1hZ2VyeV9lcG9jaD05OTIsYWxpZ25tZW50X3ZlcnNpb249Uk9DS1RSRUVfOTgyX0dPT0dMRV9EQVRVTV8yMDI0MDIwNlQwNzUzWl9nZW5lcmF0ZWRfYXRfMjAyNDA2MjZUMTIwN1o.glb"},"children":[{"boundingVolume":{"box":[0,0,0,7972671.25,0,0,0,7972671.25,0,0,0,7945940.3928064629]},"geometricError":1e+100,"content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYuYnVsa21ldGFkYXRhLnBsYW5ldG9pZD1lYXJ0aCxidWxrX21ldGFkYXRhX2Vwb2NoPTk4MixwYXRoPTIxNjA0MDUxLGNhY2hlX3ZlcnNpb249NixhbGlnbm1lbnRfdmVyc2lvbj1ST0NLVFJFRV85ODJfR09PR0xFX0RBVFVNXzIwMjQwMjA2VDA3NTNaX2dlbmVyYXRlZF9hdF8yMDI0MDYyNlQxMjA3Wg.json"}}],"extras":{"comment":"path = '21604051'"}},{"boundingVolume":{"box":[530646.88470543211,-4298524.5353084058,4631776.2768767839,6303.4810050879714,-51107.273806799371,55432.907672326939,110017.61542483287,13569.378630468924,4.9730246229602255e-12,-7337.8942796227593,59494.075069207436,55685.952465275564]},"geometricError":11186.475745935792,"refine":"REPLACE","content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9kZWRhdGEucGxhbmV0b2lkPWVhcnRoLG5vZGVfZGF0YV9lcG9jaD05NjkscGF0aD0yMTYwNDA1MixjYWNoZV92ZXJzaW9uPTYsaW1hZ2VyeV9lcG9jaD05OTIsYWxpZ25tZW50X3ZlcnNpb249Uk9DS1RSRUVfOTgyX0dPT0dMRV9EQVRVTV8yMDI0MDIwNlQwNzUzWl9nZW5lcmF0ZWRfYXRfMjAyNDA2MjZUMTIwN1o.glb"},"children":[{"boundingVolume":{"box":[0,0,0,7972671.25,0,0,0,7972671.25,0,0,0,7945940.3928064629]},"geometricError":1e+100,"content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYuYnVsa21ldGFkYXRhLnBsYW5ldG9pZD1lYXJ0aCxidWxrX21ldGFkYXRhX2Vwb2NoPTk4MixwYXRoPTIxNjA0MDUyLGNhY2hlX3ZlcnNpb249NixhbGlnbm1lbnRfdmVyc2lvbj1ST0NLVFJFRV85ODJfR09PR0xFX0RBVFVNXzIwMjQwMjA2VDA3NTNaX2dlbmVyYXRlZF9hdF8yMDI0MDYyNlQxMjA3Wg.json"}}],"extras":{"comment":"path = '21604052'"}},{"boundingVolume":{"box":[740646.62188716664,-4267641.5804085126,4631776.4298112085,8905.9707327585638,-51326.374026319718,56077.476366191207,109219.27653738589,18951.342243584731,4.9730246229602255e-12,-10248.291364507959,59062.358443492274,55685.952465275564]},"geometricError":11186.475745935792,"refine":"REPLACE","content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9kZWRhdGEucGxhbmV0b2lkPWVhcnRoLG5vZGVfZGF0YV9lcG9jaD05NjkscGF0aD0yMTYwNDA1MyxjYWNoZV92ZXJzaW9uPTYsaW1hZ2VyeV9lcG9jaD05OTIsYWxpZ25tZW50X3ZlcnNpb249Uk9DS1RSRUVfOTgyX0dPT0dMRV9EQVRVTV8yMDI0MDIwNlQwNzUzWl9nZW5lcmF0ZWRfYXRfMjAyNDA2MjZUMTIwN1o.glb"},"children":[{"boundingVolume":{"box":[0,0,0,7972671.25,0,0,0,7972671.25,0,0,0,7945940.3928064629]},"geometricError":1e+100,"content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYuYnVsa21ldGFkYXRhLnBsYW5ldG9pZD1lYXJ0aCxidWxrX21ldGFkYXRhX2Vwb2NoPTk4MixwYXRoPTIxNjA0MDUzLGNhY2hlX3ZlcnNpb249NixhbGlnbm1lbnRfdmVyc2lvbj1ST0NLVFJFRV85ODJfR09PR0xFX0RBVFVNXzIwMjQwMjA2VDA3NTNaX2dlbmVyYXRlZF9hdF8yMDI0MDYyNlQxMjA3Wg.json"}}],"extras":{"comment":"path = '21604053'"}}],"extras":{"comment":"path = '2160405'"}},{"boundingVolume":{"box":[204673.53764716911,-4149436.3641936705,4787215.6579463091,2528.2146350445432,-51462.9911526684,59731.858327886861,215357.25293554724,10579.823411729718,9.9972253114772089e-12,-6122.3314869332326,124622.92037170981,107630.11559567356]},"geometricError":21471.323695597337,"refine":"REPLACE","content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9kZWRhdGEucGxhbmV0b2lkPWVhcnRoLG5vZGVfZGF0YV9lcG9jaD05NzAscGF0aD0yMTYwNDA2LGNhY2hlX3ZlcnNpb249NixpbWFnZXJ5X2Vwb2NoPTk5NSxhbGlnbm1lbnRfdmVyc2lvbj1ST0NLVFJFRV85ODJfR09PR0xFX0RBVFVNXzIwMjQwMjA2VDA3NTNaX2dlbmVyYXRlZF9hdF8yMDI0MDYyNlQxMjA3Wg.glb"},"children":[{"boundingVolume":{"box":[104032.38843394947,-4214537.9639356276,4735992.2975241067,1225.756191915639,-49931.771586886374,56485.636209777396,107928.01262763451,2649.4839969631062,4.9522978132643869e-12,-1496.4949558658102,60960.446139326254,53919.856706768485]},"geometricError":10887.580320539988,"refine":"REPLACE","content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9kZWRhdGEucGxhbmV0b2lkPWVhcnRoLG5vZGVfZGF0YV9lcG9jaD05NjkscGF0aD0yMTYwNDA2MCxjYWNoZV92ZXJzaW9uPTYsaW1hZ2VyeV9lcG9jaD05OTIsYWxpZ25tZW50X3ZlcnNpb249Uk9DS1RSRUVfOTgyX0dPT0dMRV9EQVRVTV8yMDI0MDIwNlQwNzUzWl9nZW5lcmF0ZWRfYXRfMjAyNDA2MjZUMTIwN1o.glb"},"children":[{"boundingVolume":{"box":[0,0,0,7972671.25,0,0,0,7972671.25,0,0,0,7945940.3928064629]},"geometricError":1e+100,"content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYuYnVsa21ldGFkYXRhLnBsYW5ldG9pZD1lYXJ0aCxidWxrX21ldGFkYXRhX2Vwb2NoPTk4MixwYXRoPTIxNjA0MDYwLGNhY2hlX3ZlcnNpb249NixhbGlnbm1lbnRfdmVyc2lvbj1ST0NLVFJFRV85ODJfR09PR0xFX0RBVFVNXzIwMjQwMjA2VDA3NTNaX2dlbmVyYXRlZF9hdF8yMDI0MDYyNlQxMjA3Wg.json"}}],"extras":{"comment":"path = '21604060'"}},{"boundingVolume":{"box":[310291.84019568923,-4204224.3712330973,4735990.9848436415,3716.0692083274948,-50377.5211389863,57127.518439433952,107668.00459183712,7942.0691518733283,4.9522978132643869e-12,-4485.8796801713161,60813.587085072155,53919.856706768485]},"geometricError":10887.580320539988,"refine":"REPLACE","content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9kZWRhdGEucGxhbmV0b2lkPWVhcnRoLG5vZGVfZGF0YV9lcG9jaD05NjkscGF0aD0yMTYwNDA2MSxjYWNoZV92ZXJzaW9uPTYsaW1hZ2VyeV9lcG9jaD05OTIsYWxpZ25tZW50X3ZlcnNpb249Uk9DS1RSRUVfOTgyX0dPT0dMRV9EQVRVTV8yMDI0MDIwNlQwNzUzWl9nZW5lcmF0ZWRfYXRfMjAyNDA2MjZUMTIwN1o.glb"},"children":[{"boundingVolume":{"box":[0,0,0,7972671.25,0,0,0,7972671.25,0,0,0,7945940.3928064629]},"geometricError":1e+100,"content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYuYnVsa21ldGFkYXRhLnBsYW5ldG9pZD1lYXJ0aCxidWxrX21ldGFkYXRhX2Vwb2NoPTk4MixwYXRoPTIxNjA0MDYxLGNhY2hlX3ZlcnNpb249NixhbGlnbm1lbnRfdmVyc2lvbj1ST0NLVFJFRV85ODJfR09PR0xFX0RBVFVNXzIwMjQwMjA2VDA3NTNaX2dlbmVyYXRlZF9hdF8yMDI0MDYyNlQxMjA3Wg.json"}}],"extras":{"comment":"path = '21604061'"}},{"boundingVolume":{"box":[100957.32550052348,-4095908.0655716439,4838497.1344639389,1198.2525843707963,-48811.398825319317,58027.813575867171,104973.13234263727,2576.9457574695962,4.919786041652658e-12,-1533.6179747003189,62472.670274342432,52581.958514703925]},"geometricError":10582.126623871942,"refine":"REPLACE","content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9kZWRhdGEucGxhbmV0b2lkPWVhcnRoLG5vZGVfZGF0YV9lcG9jaD05NjkscGF0aD0yMTYwNDA2MixjYWNoZV92ZXJzaW9uPTYsaW1hZ2VyeV9lcG9jaD05OTIsYWxpZ25tZW50X3ZlcnNpb249Uk9DS1RSRUVfOTgyX0dPT0dMRV9EQVRVTV8yMDI0MDIwNlQwNzUzWl9nZW5lcmF0ZWRfYXRfMjAyNDA2MjZUMTIwN1o.glb"},"children":[{"boundingVolume":{"box":[0,0,0,7972671.25,0,0,0,7972671.25,0,0,0,7945940.3928064629]},"geometricError":1e+100,"content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYuYnVsa21ldGFkYXRhLnBsYW5ldG9pZD1lYXJ0aCxidWxrX21ldGFkYXRhX2Vwb2NoPTk4MixwYXRoPTIxNjA0MDYyLGNhY2hlX3ZlcnNpb249NixhbGlnbm1lbnRfdmVyc2lvbj1ST0NLVFJFRV85ODJfR09PR0xFX0RBVFVNXzIwMjQwMjA2VDA3NTNaX2dlbmVyYXRlZF9hdF8yMDI0MDYyNlQxMjA3Wg.json"}}],"extras":{"comment":"path = '21604062'"}},{"boundingVolume":{"box":[301585.73496619519,-4086709.0679086363,4837661.9952752478,3591.8710576821518,-48693.807890175522,58027.813575867171,104720.24287226339,7724.6291843653344,4.919786041652658e-12,-4597.1593040708776,62322.168139691894,52581.958514703925]},"geometricError":10582.126623871942,"refine":"REPLACE","content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYubm9kZWRhdGEucGxhbmV0b2lkPWVhcnRoLG5vZGVfZGF0YV9lcG9jaD05NjkscGF0aD0yMTYwNDA2MyxjYWNoZV92ZXJzaW9uPTYsaW1hZ2VyeV9lcG9jaD05OTIsYWxpZ25tZW50X3ZlcnNpb249Uk9DS1RSRUVfOTgyX0dPT0dMRV9EQVRVTV8yMDI0MDIwNlQwNzUzWl9nZW5lcmF0ZWRfYXRfMjAyNDA2MjZUMTIwN1o.glb"},"children":[{"boundingVolume":{"box":[0,0,0,7972671.25,0,0,0,7972671.25,0,0,0,7945940.3928064629]},"geometricError":1e+100,"content":{"uri":"/v1/3dtiles/datasets/CgA/files/UlRPVEYuYnVsa21ldGFkYXRhLnBsYW5ldG9pZD1lYXJ0aCxidWxrX21ldGFkYXRhX2Vwb2NoPTk4MixwYXRoPTIxNjA0MDYzLGNhY2hlX3ZlcnNpb249NixhbGlnbm1lbnRfdmVyc2lvbj1ST0NLVF<message truncated>

I feel like this might be a red herring and not the actual issue, but do you all have any ideas on what might be happening?

kring commented 5 days ago

Both of those "raw response data" dumps look valid to me. The first is a glTF model, which is a binary file. The second is a a tileset.json which is a new tile subtree. Both types of data are extremely common tile content in Google Photorealistic 3D Tiles.

I don't know what's causing Error when parsing tileset JSON, error code 3 at byte offset 0, though. I'd suggest adding some code to print the URL and raw data only in the case where that error occurs, and see what it looks like.

ericjohnson97 commented 5 days ago

It only fails to parse when I get the following data as a response

glTF�

I think this line expects json https://github.com/CesiumGS/cesium-native/blob/main/Cesium3DTilesSelection/src/TilesetJsonLoader.cpp#L692 but the data is binary.

I am not sure where the gltf responses are supposed to be handled so I can't tell if print is just a nuisance print.

I did do some further testing later in the day and it looks like I am able to load and render the bing maps satellite and terrain data, so it seems like the issue is something specific with google maps 3d tiles. It also could be something specific with 3d tiles in general, so I tried to load a local 3d file as shown here. https://cesium.com/learn/unity/unity-datasets/#step-4-add-a-3d-tileset-from-a-local-directory However, I think when you load from a file cesium expects the path to start with C:// because on my machine it tried to change my file path from /<fullpath-to-file> to https://localhost/<fullpath-to-file>

kring commented 5 days ago

It's true that line expects JSON, but it shouldn't get to that line for a glTF.

What project is this, and how is it configured? To test the plugin, I suggest using the Cesium for Unity Samples project. That will help eliminate various scene configuration problems as the source of your troubles.

ericjohnson97 commented 4 days ago

I did a whole lot more testing of this issue using the 07_CesiumGoogleMapsTiles example. I think that somehow registerAllTileContentTypes() was never being called which was resulting in the _loadersByMagic set being empty and it failing to find a converter. As a band aid solution I added registerAllTileContentTypes() to be called in TilesetjsonLoader.cpp on each response. I know the map shouldn't need to be registered on each packet, but I am not sure where it should go. I also see that registerAllTileContentTypes() is called in PluginMain.cpp, but after adding prints to PluginMain.cpp it seems like the start() function is never being called...

here is the all the code I added to instrument. https://github.com/CesiumGS/cesium-native/compare/main...ericjohnson97:cesium-native:bug/not_loading_3d_content

The important line is here https://github.com/CesiumGS/cesium-native/compare/main...ericjohnson97:cesium-native:bug/not_loading_3d_content#diff-13806feb0ee3c48c160f3fe8b915b9c4b7170b040966526354966b1bf695f745R939

I haven't tested the samples on windows, do you know if the google maps example is currently working on the latest release? If so I wonder what is different on linux.

kring commented 3 days ago

I think that somehow registerAllTileContentTypes() was never being called

That's very strange. I can't really imagine why that wouldn't get called.

I also see that registerAllTileContentTypes() is called in PluginMain.cpp, but after adding prints to PluginMain.cpp it seems like the start() function is never being called...

I don't think using SPDLOG this early in the startup process will work. It doesn't on Windows, at least. I suggest using the debugger instead of print statements.

I haven't tested the samples on windows, do you know if the google maps example is currently working on the latest release? If so I wonder what is different on linux.

Yes it's definitely working on Windows.