My little 3D project has actually been continuously updated, and last month I named it Open World Zone.
Currently, there are three directions for optimization: content filling, multi-model management, and performance optimization.
This time, it's a demo for multi-model management, which I've separated out because the other two parts aren't fully developed yet:
(The latest demo can switch between different models based on the protagonist's position.)
https://ow.ccgxk.com/demo/dev001/ ow.ccgxk.com/demo/dev001/
I want to turn it into an infinitely large three-dimensional world.
- As soon as the browser opens, there is no loading time—it launches instantly. Lightning fast!
- Even low-configuration computers run it smoothly and effortlessly.
- It supports multiple users online, offers decent freedom, and the world is incredibly enticing to explore.
- You can even place your own notes, images, and more, build your own models, and upload them to this shared world.
- An extremely lightweight, high-performance shared world.
How wonderful.
Actually, building the model is incredibly simple. But with only storage capacity for 1 million model files and a smooth threshold of 50,000 models on my computer, how to make it load on demand, delete on demand, and not exceed this threshold is not as easy as imagined.
Just like a computer's mechanical hard drive, it's essentially a large disc with a single line. How can it store 3GB, delete 5GB, then add 200MB and delete 1.5GB, all in an orderly manner.
I went through several solutions before settling on one.
In the end, this ABC scheme was left (read the code for details).
I won’t go into the details of the process. However, this seemingly simple mechanism truly stumped both Gemini and me. It took a whole month, and by mid-December, it finally started to look decent.
This demo is quite simple. It contains 4,000 library buildings.(Now I can confidently say that, theoretically, I can perfectly manage an endless array of models.)
1. When you enter a building, the interior tables and chairs are loaded (at that point, there will be screen walls and other elements to block the view, making it feel as if they were always there).
2. When you move a certain distance away from the building, it turns pink (at that point, it becomes a simplified exterior wall with fewer models).
3. At a greater distance from the building, the entire structure is abstracted into an independent cube (which I refer to as the skyline).
That's how it is for now.
Don't be disappointed. I think it's better to optimize this pain point sooner rather than later.
Additionally, I have very little time. I have to work during the day and socialize on weekends, leaving me with less than three hours each evening to study this. There's no other way.
Just say it simply.
No comments:
Post a Comment