How is it built?
Now, one of the main reasons I wanted to start this dissertation in the first place is how captivating the construction of this level was for me.
The feeling of an endless city is really well created from both a technical and an artistic point of view and I wanted to delve into how the developers achieved this.To explore this, I set out to extract and analyze the level by data-mining the assets placed in the entire level.
I used a program called Ninja Ripper you can learn more about it here. Ninja Ripper is a program that allows the user to take a "snapshot" of what a game camera can see at a given instant. This snapshot is then generates a folder with all the data of the models from what the player camera could see.
Then, using a custom importer that the creator of the software made, we can import this data into blender to re-create the an entire scene.
The main issue with this method is the fact that the player camera will never be able to see the whole level at once, not only because of the camera angle, FOV and orientation, but because things like occlusion and frustrum culling are a thing.To get around this, I went to 3 high vantage points in the level.
1. The first one covers a big part of the area, all the way from behind Firefly's base.
2. The second capture I took from above the tutorial puzzle area, and it covers most of the lower sections.
3. Finally I took a capture of the rooftop gardens.
These 3 captures don't cover every single part of the level, but they get most of it with very good results.
After this process was complete. I had to arrange the captures to re-compose the level. To do this, I rotated and aligned all captures together to the same axis, as well as rotating them accordingly as Ninja Ripper gets them in really weird rotations.
Finally, I used some important building positions to align the captures together and I exported each capture into a FBX file.
I then moved to Unreal Engine, which I will be using for this dissertation. Honkai: Star Rail uses the Unity Engine, but Unreal can easily read and translate materials and textures from Blender into In-engine shaders. As much as I would have loved to use Unity, the time I would have needed to re-create all the textures was simply too much.
Once I created an empty level in Unreal, I imported each of the three FBX scenes and then I proceded to delete any and all duplicate objects that got caught in multiple captures.
After a long and arduous process of many, many hours, I managed to get a more or less coherent level that was almost 1 to 1 with ingame. I lit it up using some basic lighting setup and, just like that, we are ready to pry and explore to see how Hoyoverse built this wonderful 3D space.
First thing I wanted to check was the level bounds, that being the sky, the "ground" and the "end" of the level, way past the playable area.
For the sky, we quickly discover that actually the buildings loose more and more detail the farther away we move from the playable area (more on this later) until eventually, the buildings become fully painted in the skybox.
This surprised me as I really didn't notice it while playing on ultra settings. It is not unheard of to "paint" geometry in the skybox, but it's been a while since I've seen this technique in games. Really cool stuff.
If you play on PS5 this is more noticeable as the texture of the skybox is lower resolution and stands out more against the rest of the buildings.
Moving on, I wanted to look at the bottom of the level. Open city environments that take place on rooftops are always interesting to me, as I'm always curious about how the developers tackle a specific challenge: the city streets.
When a level takes place on rooftops, it means that at the level bottom, out of reach for the player there has to be a city to create the illusion of this being a real space. Usually this city is low-poly at the street level like in the case of Mirror's . Other older games like Max Payne opted to put 2D images of cars moving along a plane. The list goes on.
When I looked bellow Dream's Edge, I discovered a couple of interesting things.First, the bottom of the level seems to be covered by a thick, moving layer of volumetric fog. In the game this effect is pretty easy to spot, and in our asset extraction.... we encounter this curious blue cube.
However, looking at the position of the buildings inside the fog in game and comparing them to the position in the extraction, we can see that buildings inside the fog appear inside this blue cube in our extraction.
This leads me to believe this blue cube is actually the fog volume that spawns and controls this layer of fog.If we remove the fog we see the final layer before we see the bottom of the skybox: this really curious 2D plane.
The plane seems to be a 2D picture of a city plan, possibly even from real life judging by its looks. Giving the fact that Dreams' Edge is supposed to be a city expansion project, I'm thinking the developers intended for the players to catch a glimpse of this picture from up above and inferred it was part of the city down there.
It could also have been a placeholder asset used to prototype or look at city layouts during the construction of the level.What drives me to say this, is the fact that I found this exact same plane in the Golden Hour, the Penacony map that preceeds this one. So that might be an indication that this was part of the level setup for multiple maps in Penacony, since there is no way for the player to look down and see this texture intentionally in the Golden Hour, or at least I couldn't find one in my testing.
Ground aside, the final piece of the mistery to solve for me was how the sea of buildings we see gives and keeps that illusion of being a fully fledged city. We know at this point that a lot of the background buildings in the distance are painted in the skybox, but what about the ones a bit closer?
If we look at the playable map, you can see that the playable area is only a few rooftops, while the actual map contains dozens and dozens of buildings we can´t reach so, how is this handled?
On my extraction, I noticed that some of the buildings seemed to have really simple geometry.
Upon further inspection, I notice that, becuase my extraction uses the camera at certain points, it was capturing the meshes at a long distance at their LOD they had enabled at that point in the game.Thanks to this, we can actually come closer and inspect this LOD meshes. We can see, that the buildings we traverse in the playable area are all modular, and turn into a simple mesh that converts all of the geometry detail into texture.
This doesn't apply just to the playable area, it happens on most of the buildings the player can get somewhat close to.
The approach changes once we star moving away from the playable area.I noticed that there are a lot of this "cube" style buildings. Their design is pretty simple and with colors that blend very well with the background and with the fog.
When I went to inspect them, it turns out they are pretty much cubes, their geometry reveals only 2 triangles per face. They all have the exact same shape AND texture, and they are used to populate the outer areas of the level.
Their shapes and groups are actually just multiple of these cubes stretched, scaled and clipping into one another. Really smart way to design a background that is extremely performant and using only a single mesh.
I loved this approach so much that I decided to try it out by duplicating and replacing some of this meshes and expanding the city in different directions myself!Here are the results:
Since I mentioned and looked at the buildings and the environment from up close, I thought I might as well try to reverse engineer how it was made.
After many hours of splitting meshes, I actually managed to reverse-engineering the modular kit that I believe this level, and many other Penacony scenes left.
With this I managed to recreate how some of the buildings were made, as well as some of the catwalks! A full demonstration is available in my youtube video.
To end this dissertation, I wanted to finish by looking at battle maps!
Battle maps in most turn based combat games are separate levels that vaguely resemble the area we are in, while being more empty and having more open space.
This happens for 2 reasons:
1. It allows the game camera to fly, turn and do all kinds of movements to showcase the character's skills and ultimates without objects or characters getting in the way.
2. It makes it possible to use a battle map in multiple locations at once, hence making production much more do-able while still keeping the illusion intact for the player.
Finally and as a goodbye to this whole exercise, I wanted to create something of my own.
I decided to ask myself, how would this level, that takes place in a planet we only get to see at nightime during the break of dawn, with the metaphorical end of the dream happening?
So, I decided to spend a few minutes working on a simple daytime lighting to see how it would look like, here are the results!: