Sunday, 23 August 2020

Creating and transforming an Interior

As part of the playable vertical slice, all the huts on the island have interiors. Most have nothing special in them and are just for exploring. But to keep in theme with demaking, here is the process.

To begin, I use exactly the same method I do for any 3D assets. Stages / interiors are just one large model anyway, so I find an interior I need, convert it to a readable format and put it in-game:

The stage has correct UV mapping after extracting so that's a big relief. It's missing materials though, so next I'll go through all the textures and re-assign them all.

These scene is much more vibrant now. The textures are pretty crisp too... Unity by defualt imports any texture at a resolution of 2k, originally these textures are around 128x128 or lower, which is a huge difference. So I manually go through and change them all to something similar to 32x32 or lower, because this was the maximum size for most N64 textures.

Next I make the level playable by removing any collision information for the model and then whiteboxing it myself:

The scene is now playable! Now to remove the collision boxes renderer so they dont display but still retain their bounding boxes and then I'll add some props / entities to bring it alive a bit more.

Now the scene looks ready; it has things to interact with, collisions, props, skybox etc. Now because of the collision boxed I placed before the camera also works within this environment.

But, as I discussed during some of my design research, some interiors from the N64 Zelda's are static, meaning the player has no control over the camera in the scene. To accomdate this and because I have numerous interiors, I've allowed free camera movement in most and some I've placed static cameras.

For this interior in particular, because it isn't too complex I've given it a static camera, right in front of the door against the wall. I've also replicated how these static cameras work, so instead of moving, the camera will just look at the player.

Whilst implementing this I came across a bug, so I had to add code to fix it.

When starting a conversation I disable all camera and player input, after the conversation I re-enable these. Because the new static cams are the same as the normal cameras, just with their logic disabled, when a conversation is ended it re-enables this script, making any static scenes freely-moveable!

To fix it, I added a bool check to the end conversation routine:

if (cs.moveCam) { cam.enabled = true; }

I then added an inspector element to make it quicker to toggle this for any current and future NPC's dialogue.

For this particular instance though this should be set to False!

The final result:

The only thing I wish I had time more time to do would be to remodel aspects of the interiors. But... as is after analysis most of these models are close or fall withing N64 polycounts, which means originally Windwaker could have effectively been released on the N64 if some limitations were included such as fewer effects and less open-world style gameplay!

No comments:

Post a Comment