1. Mortal Rite
  2. News
  3. Dev Log 2 - NEW BLOOD

Dev Log 2 - NEW BLOOD

Greetings Everyone,

‘’We need some more blood, my friend.’’ - Abraham Lincoln

So, to kick things off, we did have enemies spilling their contents on the floor, but boy, oh boy, wouldn’t it be neat if we also hit their meshes? We think so.

We had dabbled a little with a plugin that would let us do this in the last project, but we couldn’t get it working last time, but with a fresh set of eyes, we implemented it again, and voilà, blooooood.



Yay, it works! So basically, what’s happening here is we find where your weapon hit, and we tell the system, “Please spawn a decal at this location on this mesh.”

But it would be a lot cooler if it also splashed onto you. So we added one for the player’s mesh as well and said hey, let’s do a trace to figure out kinda where the blood would end up if it splashed from the hit location. Back to you!



So that’s pretty cool, BUT we didn’t want it to look like you were heavily bleeding from dealing damage to someone. So we figured we could differentiate a splatter, from a wound (for lack of better terminology).

The way we’d do this is by having the blood from wounds stick around for longer, whereas the blood from splatter would stick around for a shorter amount of time. That way if you were covered in blood for a long time, that would likely mean that you took damage and be an extra little indicator that you should heal. However the only problem was the plugin didn’t differentiate.

So we took a peek under the hood to figure out how it worked. It turns out you can specify one image per mesh, which then gets drawn to a RenderTextureTarget. This just means you can draw something to a texture in real-time and do something with it. (In this case, it is projected to the mesh).

Since there wasn’t support for multiple textures, there also wasn’t support for different timings, which is what I wanted for the splatter vs the wound.



So I took a look at the guts of that node and found out it's…

[h2]HLSL (High-Level Shader Language)[/h2]

A manual way of specifying how shaders are rendered.🤔 We’ve never worked with this before! After pulling in Anthony, we took a deeper look into this code and found that if you want to fade out the blood, it fades right away, and you can only specify the total fade time.

So, doing some quick math, we figured out how to add not only an initial delay (so it wouldn’t start fading right away) but also a switch for whether it was a wound or a splatter, so we’d have different timings for when the fade started.


(We’re reading texture data. How Fancy!.... 😉)

And so, with that done, here’s a sped-up version of the blood drying quickly


(Focus on his arm. It dries up like a desert)

And so, with that, we move onto

[h2]Defense[/h2]

We were talking about it and figured we could give more options depending on what character you choose. So what does that look like?
  • Block
  • Deflect
  • Parry
  • Perfect Block
  • Evade
So “Block” is what enemies typically have and for the most part it’ll stay that way, so not much is new there.
“Deflect”, the main goal for this is to avoid attacks if timed perfectly. This works well for smaller weapons where it wouldn’t make much sense to block.


(Deflect in action)

Next up is “Parry”. This is similar to what Dawksin had before. If he successfully parries, he will ignore damage and perform a counter-attack.

(Parry in action)

“Perfect Block”, this is what Shold had in the demo. Arguably one of the strongest defense types, since successfully timed blocks cause enemies to stagger. Useful for protecting your teammates


(Perfect Block in action)

And finally “Evade”, where successful timing will result in you repositioning behind your attacker. None of the current cast of characters use evade, but we will likely implement it in a future character soon!
(Thanks to Jensen for helping me work through this)


(Evade in action)

Okay. catch yall later!✌️
~ Round Toast Studios