Saturday, 29 February 2020

Text to TextMeshPro

I've worked on the subtitle system quite extensively over the last few weeks, from functionality to aestheics. I pretty much nailed down the whole system bar conversations (still to come). I've also been very busy with personal life these last couple of weeks so development time has been very limited.
So in the little time I've had I've managed to upgrade the quality of the text to what I would consider a final standard.

Original

Unity Text

TextMeshPro (TMP)

The Unity Text looks fine but has issues using rich text formatting when using the animated typewriter effect, also it is impossible to get the text gradient to be even accros each letter uniformly. 
TMP on the otherhand allows for a much wider variety of text effects and customisation. I was easily able to recreate the uniform gradient across each letter, rich tags also work properly and I can colour specific sections of text.

So overall I think visually it is finished, I may make it a bit brighter but that is all. Next I will add multi-line conversations and then it is done!

Tuesday, 25 February 2020

New-Old Animations

So next on the list of things to-do is animations. Getting the characters rigged and ready for in-game is straightforward, animations on the otherhand are not. Animating is one of the skills I admire the most because I find it very difficult to do.

I wanted a specific set of animations which were in the original game, online these can be found everywhere, from paid assets to free mocap data etc. I've decided to try and keep some original animations for better sense of authenticity.

Having found all the models with animations online I've managed to setup a scene that allows me to mirror these animations frame for frame, or atleast as close as possible.

I did this by having my rigged character centre of the scene for best results, I then had the original character by the side and on top of my rig. This way when i cycle through frames I can see what bones need moving and how it should look.

This works quite well using this method, but more complex movements are harder to mimic. Not only that but extra tweaking is required such as hand rotation to make it look a bit more realisitc. 

While I'm not great at this I think the result is good and in game it looks fine!

The animation looks fast, but it is exactly the same. The only reason why it looks out of place is because in game the animation is frozen halfway while he's "picking up" whatever item it is and is then resumed after a button press.
This is easy to replicate and will be next on the list, alongside a stading variation of this.

I think new animations would have probably been better, but due to my lack of skill and my desire to keep the game as authentic as I can this result is satisfactory and honestly I dont think anyone will even notice.

Monday, 24 February 2020

Adding Character Models

A while a go I implemented the main protagonist Harry. He was a quick test to see if I could rig it and get it working in-game.
Having re-done this I have now made a much nicer rig for the animations and even fixed of texture issues. Originally because of the way I created the rig, his shoulders would hunch up way more than they should whenever he moved.
Adding this new model to the animator system I have worked straight away, nice and quick!

I have even started working on the next character required:

Luckily here involvement is very limited at this stage of the game, all she does is walk and sit. Which is going to be easy to animate.

However that is another discussion for a different post.

Sunday, 23 February 2020

HDRP v URP

(Click for a larger view)

The image above shows the difference in my project from URP to HDRP. Visually it looks great conidering it's exactly the same scene / assets. This isnt without its drawbacks though, as the new renderer does impact performance.
In HDRP the game now rounds around 35fps whereas in URP its usually 55fps+, my graphics card is somewhat old though so this is to be expected.

At anyrate, HDRP looks much closer to the originals aesthetics:

HDRP Café 5to2

It took a while, but here is the result of migrating this scene to HDRP:


While the scene is still unfinished, i think the atmosphere looks exactly how I wanted it to! Now its a case of re-implementing all my gameplay, tuning up some of the assets like pickups and then starting the next area!

Friday, 21 February 2020

HDRP

Unity has recently stepped into the realm of photorealism via its HDRP renderer. While this is still fairly new, its officially out of beta and ready to use for commercial projects.

Personally I've always been happy with their Universal renderer, but this has its limits visually. With this project I'm trying to get as close to AAA quality as possible with my skill set. This means I'm having to adopt new work flows and practises to really realize the full potential of this project.

I've begun the process of migrating to HDRP, with the help of Dan, I've learnt new ways to create 3d assets. With this and Unity's new renderer I believe I can achieve close to even better results of some of the other rendered 3D scenes of the Cafe. With the added benefit of being fully playable.

But this is also potentially a double edged sword, because I may need to reel in the scope of my project. I originally wanted the first playable 5-10 minutes of the game. But depending on how extensive creating content for HDRP is, I may have to cut an area.
But... Having the visual fidelity of a AAA project and gameplay to match will easily make up for this!

For now though, I'll recreate the Cafe again, since this is purely visual-related work and post updates soon.

Sunday, 16 February 2020

Subtitle Extension > Item Pickups

Following on from my previous posts about recreating the whole subtitle mechanic, I've now expanded upon it's functionality even more to add the next most important aspect of it. Item Pickups!

I've coded in a dynamic way to allow any obect to be a pickup! All through the same code base as the object interactions. So now, if I give an object an interactable property, I can now set it as a static object for interaction, an area transition or an item pickup. Because they're all derivitives of the base subtitle system they all share the same functions which allows me to expenad on the whole system.

Not only that but I've also rewrote my code a bit to make it much more responsive. In the previous iteration I was using checks in the OnTriggerStay function to then do any actions, this was an issue, as I found out that this isn't ran until after or during fixed frames. Meaning that it is run at the end of every single computed frame, so any down or up button checks were delayed, resulting in un-responsive interactions.

I then decided to migrate the bulk of my code into the Update function as this is ran every frame in realtime and the results are great. The whole system works as it should now.
In the video below you can see the optimisations and workflow I've managed to create, allowing me quickly create more complex interactions with ease.
(Watch in full screen to see inspector)


On a more techy side; this is achieved using triggers, just like the static object interactions I've done previously. Because it uses the same code to pull a message from the donor object to display in the susbtitle system, it now also copies the model attached and instantiates it. This is then rendered to a texture and displayed on the same canvas as the text.

The only issue to this that I've noticed, is that if an object has a model with multiple meshes or elements it will not render on the canvas. I don't know why, but it does work for single meshes, so long as I make sure I combine all my assets on export it should work absolutely fine.


The onscreen prompts also work as they should. If you select no, then the object is placed back onto the ground. Pressing yes will remove the original and instantiated object from the game (and eventually add this to the inventory).