I worked with Spencer testing the new Custom Masked Colour Overlay Shader this last week, and man is it coming up sweet! Spence built in material overrides based on the alpha of the mask (RGB) texture. We can now specifically change the properties of the mask without affecting the base texture. This lets us change the surface properties of the graphic mask area. We can make the graphics look like glossy paint, matte paint, metallic paint, rubber, metallic foil and probably some other substances too. The level of override can be turned up or down too, so we can simply inherit the original surface information and only override the colour information.
Really happy with the control level I have with this. Spence was kind enough to make the shader suit my art brain by changing the layout of it so that it makes sense to artist types. I also got the high poly modeling, UV mapping and baking done on one of the Red Dot sights, so that will be finished Monday. I’ll move onto a Silencer and that will make one complete set of components. After that I’ll be making a full set of designs/skins/masks for the completed set, after which I’ll be out of R&D land and ready to steam ahead making all the other guns/skins. I expect this process to speed up now that the development of PBR materials and the Custom Colour Overlay Shader are mostly done.
This week has been spent trying to get the character to look good in game and dealing with some design challenges. Once the process for the first character is worked out then all the others can be added in game almost stress free. The female model is very much still in the works but it makes more sense to finalize the workflow for one character and then transfer that workflow to all the others as mentioned previously.
Hey folks, this week I’ve been working on sights, specifically a sniper scope and a holographic laser sight. The sniper scope came out pretty well, and allows for easy customisation of how it appears on screen by mods. You can set when the scope engages, what the sight looks like, and more! There’s a random sighted sway that players will be forced to correct a bit for, but it’s stat driven, meaning that you will be able to craft better snipers that sway less when sighted. There’s also an initial rotation when sighting, which is always the same for a given gun, so you’ll be able to get a feel for a gun’s randomness and learn to correct for it.
I also implemented a holographic red dot sight, which was an interesting little exercise in shaders. A holographic sight, for those not in the know, is a sight that shows a cross hair that is projected in the distance and displays parallax. The advantage of this is that you are able to determine the angle of the barrel, as long as you’re roughly looking down the sight. I started off trying to mutate the UVs based on the camera view angle. While this worked pretty well for a simple mesh with the origin at the center, the math got a little complicated when we were dealing with meshes with offsets. After a while I decided to take a different approach, which was to take advantage of Stencil Shaders. Stencil shaders are pretty cool! They are pretty much a buffer that you can read and write with arbitrary values. With this tool, holographic sights become a way simpler problem. All the current shader does is do a first pass that writes a number to the stencil buffer, which acts as a “viewport” for the holographic sight, and then a second pass moves the vertexes some amount in some direction, and render it again testing against the stencil we just created. This works great for all meshes, and is a million times simpler. Check out a clip below:
Bit of a short one for me this week unfortunately as I’ve had to take a few days off whilst sick. Good news is I’m all better now and ready to get stuck in again.
What I did manage to do was some work on the new spawn system. Previously as soon as you joined a server and loaded the map and game state you would be instantly spawned into the world. In ItemV2 you’ll be able to customize your character (picking different skins, hairstyles, facial hair, faces etc.) and logically at least the first time you join the server you’ll want to pick your options before you spawn in.
A lot of our initialization code was tied to the player spawn so I’ve had to decouple that and create a new game state that represents the client being fully loaded but their player entity hasn’t spawned yet.
Now we can have the client load everything and be presented with a ‘spawn window’ where they’ll pick their options then request a spawn from the server. I want to make this window customisable so other game modes (like deathmatch) and mods could implement things like picking loadouts or spawn locations but for right now I’m finishing up getting the technical side of things working on the back end, squashing a few bugs and making sure the camera starts in the correct location rather than transitioning in from under the world like it does currently.
Have been all over the place this week. I’ve been working on content implementation for the AR, sniper and pickaxe including a workflow to create items in an already fleshed out state for nested items. For example, the AR15 blueprint will spawn with some stock parts attached (so you don’t end up with just a receiver), then allow you to replace / add more later once crafted. This required getting doubly nested items working (blueprint->ar15 root->barrel etc) and allowing nested hierarchies of items to be cloned. This came out really well.
I also spent a bit of time on some painter shader experiments with Mils to allow paint masks to override more than just albedo color on the weapons. This will give us an insane amount of variation on the weapon customization.
Lastly I’ve been tracking down bugs in the item serialization system that was causing items to disappear / get bogus stack sizes, and fixing our shadows in ItemV2 which had regressed horribly.
As always we are getting dangerously close to building some actual gameplay, these tasks suck but its better to sort them now than hand you a broken mess later. Hopefully I have more time this week to get stuck into content uninterrupted.