XaiJu
CrystalFrostViewer
CrystalFrostViewer

patreon


Reimplemented textured prims and sculpts

So, I've had a massive memory leak for a long time that's stifled development. Literally can't develop more if it sucks up 1gb of memory every second.

I decided to take a break from it in September and just started development up again this last Tuesday (Feb 7). First day I was able to get textured prims and sculpts working again. Above image, left is Crystal Frost, right is Firestorm. Sun in Crystal Frost doesn't match sun in SL, so the lighting was a bit different.

While implementing meshes, I discovered the cause of the memory leak. It's the way I'm doing textures. I have an idea about how to do it differently. The problem is likely caused by a very brute force method of shoving data from the decoding thread to the main thread.

See, Crystal Frost is multithreaded AF. The LL based viewers like Firestorm, Black Dragon, et al.... They're all single threaded.

I was using this brute force method for every bit of asset data that came through to get it to the main thread for processing. I've stopped doing that. Right now I've had to disable texture loading to prevent the memory leak, but I've fully migrated mesh processing over to a much more streamlined method, and it's resulted in performance in populating the world with objects that VASTLY EXCEEDS the performance of Linden Lab based viewers. What's more, there's still a lot more room for improvement, and I'm hoping to implement the streamlined method for transporting all data within the week.

If that all goes well, I'll get to work on being able to walk around and explore the world as well as chat. Avatars won't be rendered properly for some time to come, however, as rigged meshes will take learning about parts of Unity that I've never actually learned about in the past despite using it for game development well over a decade at this point.

So avatars will (at first) be represented as boxes of the rough size of the physics hit box for the avatar... and hopefully with name tags, but I've yet to figure out how to grab the names of in-world objects. There hasn't been much of a point in figuring it out with that memory leak looming over everything, you know?

Reimplemented textured prims and sculpts Reimplemented textured prims and sculpts

More Creators