top of page

FMP - weeks 8 - 10 - day loop development

  • Foto van schrijver: Anouk Dutrée
    Anouk Dutrée
  • 28 nov 2022
  • 6 minuten om te lezen

With the proposal handed in we could now really get started with our production phase! Time to actually get our hands dirty in Unity. Since Rob and I are working together it is super important that we have a clear planning that we are adhering to for this production phase. We worked on a GANTT chart for our proposal which outlines our general goals and planning (Figure 1). As you can see from the planning we didn't actually plan anything for week 8. The reason for that being that it was both the week after proposal deadline week and that week being an incredibly busy period for both Rob and myself. So we already knew nothing would get done that week.


Weeks 9 and 10 were dedicated to the first real sprint in which we would be tackling the resource gathering part of the day loop. With Rob working on the mechanics my sprint was mainly filled with creating all the necessary art assets for the day loop



Figure 1: Gantt chart for Draak & Draig

So, what did I work on?

  • Creating the tools necessary for resource gathering (pick axe, axe and fishing rod)

  • Creating custom trees and trees with chopping damage for the wood chopping minigame

  • Creating the day loop terrain

  • Creating a custom water shader for the rivers that run through the map

  • Preparing two NPCs for the village section (base models from mixamo.com, gave them new clothes)

  • Created a dragon cave for the spawning area

  • Created the spawning area

  • Created a placeholder village section to pretty up later

  • Created the first person view hands

  • Animated the first person view hands to be able to work with the resource gathering tools

  • Put trees onto the terrain

  • Created a first version of a customization shader for the dragon

In short: a mix of level design and asset creation! Going through everything in detail is a bit too much but I'll highlight the main progress in the next sections


Tools for resource gathering

For the day loop we have three mini games planned:

  1. Tree chopping

  2. Ore mining

  3. Fishing

That meant that we needed an axe, a pick axe and a fishing rod. Since all these minigames are tied to a minigame in the night loop where you play as the dragon I wanted a player to still be reminded of that dragon alter ego as that's what our target audience is looking for. To be able to do this I decided to work dragon motifs into the tools (Figure 2).



I put the motifs in through normal maps so that it wouldn't affect the poly count. I used Blender's multires modifier for the first time for baking the normals and this technique was super fast and easy to work with. It was a lot better than baking from a different high poly object which I used to do so I'll definitely be using the multires workflow more!


Level design

To be able to start putting mechanics together and checking if it really works we also spent quite some time on level design. Rob worked out the general map layout to be able to make it work functionally and to create natural borders that aren't all mountains. I took his map and translated it into a 3D terrain using Unity's terrain tools, and assets from asset packs (Figure 3).



Figure 3: day loop level design for Draak and Draig.

The map has 4 main areas:

  • Spawning area (top right in screenshot, top of the hill)

  • Resource gathering areas (middle section and bottom right, the lower part of the map)

  • The village (on the left, below the plateau)

  • The castle (to be created still, area is reserved on the plateau in the top left)

Spawning area

The spawning area is a small area where you transition from dragon to human and back so it has both a big dragon cave for the dragon and a small hut for the human form. The cave entrance is modelled to look like a dragon's mouth to bring that dragon persona into the scene even if you do not play as teh dragon at that moment.


Both the cave and the hut are for art direction purposes only and have no actual functionality for now. I included some other items that are for the visual narrative as well, like piles of skulls of humans that you have killed, and scattered wood to reference your resource gathering activities. I also decided to put one of the axes in front of the hut to reference the resource gathering some more. I chose torches as the main sources of light in the area to further reinforce an idea of eeriness from the cave while simultaneously linking back to a dragon's firy breath.


Figure 4: Spawning area

The resource gathering area is consisting of forest sections with a river crossing through them. The river provides fishing areas and the forest will be usabe for tree chopping and ore mining. The mining sites and the choppable trees are currently still missing as they will be generated via code.


Resource gathering area

Putting the trees in was quite an issue, as the terrain tools from Unity have quite some odd requirements for trees. This was the first time making custom trees as opposed to asset ones. I needed to use custom trees because I needed to modify the base mesh for showing chopping damage, and most good tree assets out there do not have an fbx that you can use to modify them.


When I tried to add my custom trees to the terrain with tree painting I continuously got an error about it needing to use a Nature/soft occlusion shader. But when I switched to that shader I got the dreadful pink color indicating a broken shader. The Nature/Soft occlusion shader apparently doesn't work with URP, and there is no URP equivalent as of yet. I opted to use a SpeedTree shader instead but even though this resulted in proper trees, the terrain tool didn't allow me to paint them on the terrain. It needed an LOD group still which I found out after some trial and error and then it worked.


I did see a massive drop in performance so I will still need to look into performance optimization of the trees. But I have decided to leave that to our polish sprint in a few weeks as it does work for now.


For the river I also created a custom water shader to give the water some motion and make it feel a bit more realistic. I achieved this through the use of two water normal maps that slowly move in opposing directions at different speeds. This creates a sense of buoyancy. I also used a depth gradient to make the water change color in the less deep areas (i.e. at the shores) and become increasingly transparent. I created the shader in shadergraph which I personally really like. ShaderGraph has so much power while still remaining fairly easy to use once you understand the available nodes.


Figure 5: Water in level

The village

The village is currently unfinished and it's more of a placeholder at the moment that is built up of assets from the viking village asset pack from Unity. It's the next thing on my to do list to pretty it up and bring in the story telling elements.



Figure 6: Village area

The castle still needs to be created and is currently just reserved space.


First version of the customization shader

I needed to wait on Rob before I could continue on the level so I also made a first version of a customization shader for the dragon. My ideal end state is a shader where I can tweak properties through code which can change the dragon's color, horns, tail, patterns, any adornments. So as a first step I decided to tackle the color changing feature.


I wanted to avoid making different base textures with the color baked in as much as possible as it will increase the size of the build with every texture added. Therefore I decided to use hue manipulation of my base textures to achieve a color range. I set up a shader that works like a detailed PBR shader but with additional control of a hue parameter. It uses textures for the albedo, the normals and the detail normals. This way the shader can easily be used for different parts of the dragon model. Below you can see a couple of examples of customized dragons created with the use of the shader.




This is essentially my customization MVP and next steps for expansion would be to create different base textures for different patterns in combination with the color and to set up a control script that would allow easy manipulation in game.


List of References

WIP

Commentaires


bottom of page