That's awesome, thank you. A scene is just another file type that you can import in webiverse. The interesting thing about it is that it's a file type that can import other file types. It's a scene and the scene contains other URLs. So in addition to URLs, like for example, the street base, which I think is this object right here. The blue stuff, you also have the lights defined for the scene. Basically this is inline content, which is gonna be translated into a data URL. It's the same as if you loaded a data URL. But it's basically just all these different assets in the scene.
And so with scenes being a first class concept, you can actually have two scenes at the same time. So I have a system here where if you get close to the edge of where the next scene should be, it's actually gonna add it and then it's gonna preview the scene by basically taking a 3D volumetric snapshot of it and then basically rendering it in front of you. And this is just one draw call. There's zero performance hit because that entire scene is paused. But it's still there. And now we basically have two scenes in the world at the same time. And when we cross the threshold, we can magically switch one to the other or switch but there's actually a glitch here. This should have actually rendered the full preview of the entire scene before. But basically we can walk backwards and forwards and these are just different scenes that have entirely different data and they could have entirely different multiplayer rooms, for example. So if I'm over here, I can walk over to my friend's place and then say hi.
The most expensive operation that it's happening right now is just the skeleton mesh, right? It's just the character itself. Everything else is kind of like dynamically loaded. Correct? That's right. Actually, everything is dynamically loaded but there's plenty of opportunities to actually optimize a lot more. Like for example, we will probably rewrite our avatar system. At least the kinematics part in a WebAssembly. We're already using a lot of WebAssembly, by the way. Like for example, this procedural generation is a WebAssembly algorithm. The physics are WebAssembly. And we're probably also gonna take the bones code which is the real only computationally heavy part of this app. The rest is just matrix multiplication. And we're probably just gonna write that in WebAssembly as well as probably making the default of the characters just the single draw call version which means we do an offline pass to once again generate the clean texture for the character and then swap that out directly for the 55 material versions. And once we actually fix the lighting you almost can't even notice a difference but it's 55 times faster. Actually, it's more than that. It's like 110 times faster because there's also a secondary depth pass that we do for some effects, like SSAO. But yeah, this is mostly the only expensive part of anything that we're rendering here. Everything else is just basic shaders, it's 3JS shaders. It can be as fast as any shader you can write.
So eventually, are you gonna rely on, later in the project, I guess, you're gonna rely on something like real time, like in a real engine or something more powerful or are you gonna just kind of do more like geometry tricks so to speak? Can you explain what you mean by geometry tricks? Like, kind of like how, for example, you can have some blockers in the light to kind of cheat the behavior with the environment rather than actually do it properly and see where the light by itself and kind of just use something like Lumen, for example, and being able to tackle that problem just with the open real, for example.
No, we're experimenting with, essentially, the best shader techniques that we can implement. There's actually most of this research has already been done, and most of it is it open source in some form, whether that's GLSL or some other language. Like, it's just open source Unity code. We've actually already implemented a lot of that kind of stuff. Like for example, for SSAO. And then there's a whole bunch of different ways that you can do shadows, you could do voxel-based lighting. That's all stuff that we're experimenting with. It's actually one of my favorite things to do is to just kind of see all the algorithms that are possible and see how awesome that looks. I'm always surprised with the results, and then everybody says, like, oh, wow, is this Unreal or whatever? Well, I'm like, no, it's not Unreal. It's not Unreal, but it's using the same technology as Unreal, so is there a difference?
And my last question, sorry, I don't mean to take time from the other participants, but I also was curious. Are you using like a store to be able to keep the state in the general application itself? Or is it just like a one page, so you're just, okay. So you are using something like Redux or I don't know like- It's not Redux.
Comments