Comments (8)
I noticed that changing the Maximum Cached Bytes
property from 268435456 (256MiB) to 26843545600 (25600MiB) makes the problem go away. So the problem does seem to be that tiles are being unloaded when you look away due to the cache size being exceeded, but I'm not sure why.
from cesium-unreal.
Turns out I was wrong about how the tile data size is measured for cache purposes. It's actually formed by adding up the number of bytes in all of the glTF buffers (cesium.data.size()
) and images (cesium.pixelData.size()
). That is after things like Draco and JPG decompression, so it can be a lot larger than the size of the data downloaded over the network (even after it is gunzipped). A single 256x256 JPG ends up being 341KiB.
from cesium-unreal.
Interesting. So given my previous example of a 40MB SQLite cache... If I imagine it was filled solely with JPGs, and we have a typical JPEG compression ratio of 10:1, they would expand to ~400MB in memory. This is clearly over my cached bytes setting of 256MB, so maybe everything is working as designed?
If so, maybe it's just a matter of usability with Maximum Cached Bytes
? Or maybe my expectations were just wrong?
from cesium-unreal.
Right, for that Googleplex scene, the actual size of the traversed tiles is about 300 MiB. I'm still trying to be 100% certain it's correct, but I think it is. In which case the default 256MiB max cache for Google Photorealistic 3D Tiles is simply too small.
from cesium-unreal.
Ok, if that's true, then my expectations were just wrong.
But this problem could lead to more work with this feature. For example, a new "auto" setting that determines a reasonable size based on your system memory or some other metrics. We could still have a fixed memory size for users that know exactly their device constraints.
from cesium-unreal.
For comparison, the default in CesiumJS is 512MiB. It's not clear why ours is half that. Part of the reason may be that we're assuming there are extra copies kicking around in memory. cesium-native maintains a copy of all the tile data in the glTF data structure that isn't used at all for rendering. The game engines maintain the copy for rendering, of course, but may also maintain their own CPU-side copy as well.
from cesium-unreal.
The Unreal "Memory" stat doesn't seem to work at all for showing our texture memory usage. If I set the cache size huge and fly around, the static mesh memory goes up steadily, as you'd expect. But the texture memory usage doesn't change at all.
Perhaps our custom texture upload code is somehow evading UE's texture memory performance counter? 😬
from cesium-unreal.
Perhaps our custom texture upload code is somehow evading UE's texture memory performance counter?
Yes, this. If I force it to use the legacy texture upload path, the texture memory usage is much more realistic:
from cesium-unreal.
Related Issues (20)
- Add support for multiple contents in 3D Tiles 1.1 HOT 4
- CesiumFlyToComponent "jumps" at the end due to spherical math that doesn't quite work on an ellipsoid HOT 1
- Sometimes the operation crashes. HOT 4
- Can you give me an option to prevent 3Dtiles from retrieving Sequence? HOT 2
- does cesium-unreal support gltf extension : EXT_mesh_gpu_instancing HOT 1
- `CesiumSunSky` lights volumetric clouds at night HOT 2
- New metadata unit test failures caused by texture wrapping modes
- Cesium causes virtual editors and runtime to lag and become unresponsive HOT 4
- Cesium V2 doesn't support file:/// URLs HOT 7
- Read access violation when loading scene after authorizing ion token
- Set initial points of CesiumCartographicPolygon based on world-coords of screen corners
- Duplicating `CesiumGeoreference` causes crash
- WMTS Custom Request Fields
- Let the user configure whether raster overlay textures are sRGB
- Visual noise in Cesium3DTiles (Material) HOT 2
- about vector tile HOT 1
- Need memory leak tests
- Crash on exit HOT 2
- "Blank 3D Tiles Tileset" add button should account for selected georeference
- Cesium-native assertions no longer work with latest NDEBUG changes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cesium-unreal.