simblocks / oneworldsdkforunity Goto Github PK
View Code? Open in Web Editor NEWA whole-earth visualization in Unity with support for WGS-84 coordinates and multiple levels of detail.
License: Other
A whole-earth visualization in Unity with support for WGS-84 coordinates and multiple levels of detail.
License: Other
as the title
Upon camera movement, I have a very strong jittering. I can see it especially in the Scene view? Does somebody know what the problem could be? Thanks in advance
Error assigning 2DArray texture to 2D texture property '_MainTex': Dimensions must match
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.Material:SetTexture (string,UnityEngine.Texture)
UnityEngine.Material:set_mainTexture (UnityEngine.Texture)
sbio.owsdk.Unity.TerrainTileChunker/TileAtlasInfo:.ctor (int,byte,UnityEngine.Shader,UnityEngine.Shader,bool) (at D:/we/OneWorldSDKforUnity-main/src/OneWorldSDK_UnityDemo/Assets/Scripts/TerrainTileChunker.cs:1564)
sbio.owsdk.Unity.TerrainTileChunker:.ctor (sbio.owsdk.Unity.TerrainTileChunker/Settings,UnityEngine.Shader,UnityEngine.Shader,sbio.owsdk.IWorldContext,sbio.owsdk.Unity.TileLoadContext,sbio.owsdk.Services.ITileMeshProvider) (at D:/we/OneWorldSDKforUnity-main/src/OneWorldSDK_UnityDemo/Assets/Scripts/TerrainTileChunker.cs:720)
sbio.OneWorldSDKViewer.WorldChunker:Start () (at D:/we/OneWorldSDKforUnity-main/src/OneWorldSDK_UnityDemo/Assets/UnityDemo/Scripts/WorldChunker.cs:31)
[D:/we/OneWorldSDKforUnity-main/src/OneWorldSDK_UnityDemo/Assets/Scripts/TerrainTileChunker.cs line 1564]
Error assigning 2DArray texture to 2D texture property '_MainTex': Dimensions must match
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.Material:SetTexture (string,UnityEngine.Texture)
UnityEngine.Material:set_mainTexture (UnityEngine.Texture)
sbio.owsdk.Unity.TerrainTileChunker/TileAtlasInfo:.ctor (int,byte,UnityEngine.Shader,UnityEngine.Shader,bool) (at D:/we/OneWorldSDKforUnity-main/src/OneWorldSDK_UnityDemo/Assets/Scripts/TerrainTileChunker.cs:1564)
sbio.owsdk.Unity.TerrainTileChunker:.ctor (sbio.owsdk.Unity.TerrainTileChunker/Settings,UnityEngine.Shader,UnityEngine.Shader,sbio.owsdk.IWorldContext,sbio.owsdk.Unity.TileLoadContext,sbio.owsdk.Services.ITileMeshProvider) (at D:/we/OneWorldSDKforUnity-main/src/OneWorldSDK_UnityDemo/Assets/Scripts/TerrainTileChunker.cs:720)
sbio.OneWorldSDKViewer.WorldChunker:Start () (at D:/we/OneWorldSDKforUnity-main/src/OneWorldSDK_UnityDemo/Assets/UnityDemo/Scripts/WorldChunker.cs:31)
[D:/we/OneWorldSDKforUnity-main/src/OneWorldSDK_UnityDemo/Assets/Scripts/TerrainTileChunker.cs line 1564]
As I understand it, Bing's Basic Key is causing elevation to randomly display in Unity. Issue #7 identifies the problem. However, the developer solution is that one should purchase an Enterprise Bing Maps Key. That financial impact to production starts at around $500/annually.
I notice in OneWorldSDK_Viewer.config.json we're able to specify Bing as the provider of this data. Is it possible to source the data from Google instead? Trying to find a way around the elevation problem; it's an unfortunate dealbreaker when random tiles fail to populate with data. Thank you all for your time and ideas!
太酷啦 大佬 收下我的膝盖
因为我是**的,加载地球会非常满,有没有离线版本的sdk呢 比如只想要局部地区的也行
So, I followed you instructions but I'm having errors on building the solution. Lots of NuGet packages are missing.
What if you could provide the functional Unity project instead?
Hello, I'm using the Demo and I've noticed that the CameraBase, which is the main camera, doesn't move regularly, its position keeps bouncing back and forth from 2000~-2000. I would like to try to modify its movement logic, may I know where should I modify? (I tried to read WorldObjectMovement but didn't figure out the logic)
I have attempted to replace the image sources by modifying the BirdseyeImageryMetadata.RefreshImageryMetadata() and TileToURL() methods in BirdseyeTerrainTileProvider.cs, and the WMSTileProvider.TileToURL() in WMSTileProvider.cs. However, at runtime the application still displays the original Bing images. Please advise if any other modifications are needed?
Additionally, during build, even after adding a OneWorldSDK_Viewer.config.json file in a new folder, the application only displays "Loading" and does not show the globe. Please advise how this should be handled?
Thank you very much, looking forward to your reply.
Hello, can we use generated terrain tiles in FBX format instead of Bing data?
I have a heightmap. However, I didn't understand how to translate the tileids of this heightmap. Can you tell me in more detail? Should I use the 3 functions written in the description? How should I do?
I want to use local imagery and elevation file. I have only .mbtiles files which are not the same format as your plugin required. So how to get the data in your format or can I convert .mbtiles to your DB format?
i built a webgl version with the demo scene and run it in browser,repeated errors:
Tile (1)[0][0]{0} Failed to load:
System.MethodAccessException: Attempt to access method 'sbio.owsdk.Services.ITerrainTileProvider.LoadTerrainTileAsyncInto' on type '' failed.
at sbio.owsdk.Unity.TerrainTileChunker+TileLoadOp+d__8.MoveNext () [0x00000] in <00000000000000000000000000000000>:0
I set the whole earth's max imagery LOD to 5, except for some small areas with higher max LOD for example 19. All the images are stored in SQLite in local PC. Before zooming to 6, it works fine, but once zoom level exceed 5 there will be the tile NULL error. My question is since some specific areas has higher images in SQLite, why theses areas can't display images with LOD larger than 5?
I followed the document in https://github.com/SimBlocks/OneWorldSDKforUnity/blob/main/docs/ExternalData.md to create offline imagery map. I could see the big picture, but still had 2 small problems.
The correct bat should be like this :
pathFrom variable looks into a wrong directory..
set currentDir=%cd%
set "pathFrom=%~dp0src\Bin\"
set "pathTo=%~dp0src\OneWorldSDK_UnityDemo\Assets\Plugins\"
REM COPY DEPENDENCIES
copy /y "%pathFrom%Newtonsoft.Json.dll" "%pathTo%"
copy /y "%pathFrom%Pngcs.dll" "%pathTo%"
copy /y "%pathFrom%gdal_csharp.dll" "%pathTo%"
copy /y "%pathFrom%BitMiracle.LibJpeg.NET.dll" "%pathTo%"
copy /y "%pathFrom%ogr_csharp.dll" "%pathTo%"
copy /y "%pathFrom%x86\SQLite.Interop.dll" "%pathTo%windows-x86\"
copy /y "%pathFrom%x64\SQLite.Interop.dll" "%pathTo%windows-x64\"
copy /y "%pathFrom%DotSpatial.Projections.dll" "%pathTo%"
copy /y "%pathFrom%osr_csharp.dll" "%pathTo%"
copy /y "%pathFrom%OsmSharp.dll" "%pathTo%"
copy /y "%pathFrom%OsmSharp.dll" "%pathTo%"
copy /y "%pathFrom%Npgsql.dll" "%pathTo%"
copy /y "%pathFrom%..\src\Libraries\packages\protobuf-net.2.3.7\lib\net40\protobuf-net.dll" "%pathTo%"
copy /y "%pathFrom%NetTopologySuite.dll" "%pathTo%"
copy /y "%pathFrom%BruTile.dll" "%pathTo%"
copy /y "%pathFrom%Microsoft.Bcl.AsyncInterfaces.dll" "%pathTo%"
copy /y "%pathFrom%Npgsql.dll" "%pathTo%"
copy /y "%pathFrom%System.*.dll" "%pathTo%"
del "%pathTo%System.Net.Http.dll"
copy /y "%pathFrom%sbioMath.dll" "%pathTo%"
copy /y "%pathFrom%sbioMath.pdb" "%pathTo%"
copy /y "%pathFrom%sbioOneWorldSDK.dll" "%pathTo%"
REM CONVERT PDBs TO MDBs
cd %pathFrom%
pdb2mdb.exe sbioOneWorldSDK.dll
pdb2mdb.exe sbioMath.dll
cd %currentDir%
copy /y "%pathFrom%sbioOneWorldSDK.dll.mdb" "%pathTo%"
copy /y "%pathFrom%sbioMath.dll.mdb" "%pathTo%"
pause
I'm using the demo scene with a Bing basic/dev API key. Since the default configuration limits the maximum tile LOD to 10 I adjusted it as follows, adding the API key and increasing maxTileLOD to 16:
{
//Settings for each elevation provider
"elevationProviderSettings": {
"bing": {
//The bing API key to use
"apiKey": "{MY_BING_API_KEY}"
},
// ... omit unchanged parts ...
"tileChunkerSettings": {
//The number of tiles that will be kept loaded in-cache at a time
//Cached tiles don't have to be re-queried and are simply reactivated
"numTiles": 4095,
//The number of tiles to preload (load at startup)
"preloadPercent": 0,
"disablePhysics": false,
//The number max number of tiles that will be loaded concurrently
//Defaults to processor count
"maxConcurrentLoad": null,
//The LOD that features will be queried at
"featureLoadLOD": 15,
//The maximum LOD to create tiles at
"maxTileLOD": 16,
//The maximum lod to use for physics
"maxPhysicsLOD": 10,
//The maximum amount of time in milliseconds spend loading tiles each frame
//Increasing this number lowers frame-rate in high-load scenarious but
//decreases latency for loading tiles
"loadFrameBudget": 3,
//The size of each texture atlas, in tiles
//The actual pixel size will be (size*size*256)
"atlasTileSize": 1,
//Set to true to compress textures during runtime
//Compressing textures significantly reduces RAM usage but can cause regular frame drops
"compressTextures": false
},
// ... omit unchanged parts ...
}
With these settings much higher resolution image tiles are loaded, but only a fraction of the tiles appear to have elevation data associated with them, making them stand out among lots of "flat" tiles:
This image is from latitude 38.9819 longitude -119.8195 elevation 9802.8. Is this expected or am I missing a relevant setting in the configuration? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.