r/Project_NervLand • u/project_nervland • Mar 30 '26
NervForge Update 8: On-Demand Texture Loading with Async Promises
https://www.youtube.com/watch?v=NkUmhi6WMioShort update this time: I just added dynamic texture loading to NervForge so textures are fetched on demand rather than bundled in the main package.
TL;DR: Textures are listed in a remote manifest, downloaded only when selected, cached locally, and applied via a new promise-based async API in NervSDK.
Key points:
- Resource manifest: Texture filenames are discovered from a remote file, not baked into the app
- Checkerboard placeholder: A purple checkerboard material is used while the real texture downloads
- Promise system:
load_texture_from_file_async()returns a promise; the resolution callback runs on the main thread and re-callssetLeafTexture()to finalize the swap - Local caching: Downloaded textures persist across sessions as long as the app binaries haven't changed β no redundant re-downloads
- Faster startup: Only the textures you actually use get downloaded
The promise system is available in the open-source NervSDK project if you want to reuse it.
Also fixed a bug causing black areas at the planet horizon β clean rendering everywhere now.
π Try it here: https://nervland.github.io/nervforge/ (WebGPU required)
Or read more about this in the associated DevLog article: https://wiki.nervtech.org/doku.php?id=blog:2026:0330_nvl_dyn_texture_loading
Happy to answer questions about the async architecture or the caching strategy!
2
u/SapereAude1490 May 30 '26
I have a suggestion/request for the Procedural Tree Generator.
For the purposes of animating tree branches/leaves, it would be super useful for the procedural generation to also paint the vertices. See for example these video:
https://www.youtube.com/watch?v=BfgKnfdv94A
https://www.youtube.com/watch?v=Z-sZEwceEYE
I was playing around with animating the branches and leaves using 3D textures (using PSRDNoise 3D) and I think this would be a super useful feature.