Rust Marque Logo

Devblog 128

See (and hear) inside the new caves, plus details on the component system, grass displacement returns, building notification is nerfed, there's a new Hazmat suit, and more.

22 September 2016
This week so far has been packed with good stuff for this part of the game. I progressed on the visuals, and Andre and Diogo helped me by implementing new features that will help us achieve the vision I have for these caves. We now have an ambient light volume that let us control ambient light levels underground and fully closed interiors, having the daytime lighting influencing caves and tunnels is over. Now it can be pitch black at any time of the day where we want it to be the case. On the caves side I made progress by painting the layers of rock/sand/gravel on the rooms meshes thanks to Diogo’s 4-way blending material. We also enabled biome tinting on the caves, so that the colour palette always look a bit different based on your location. Rest of the week I have made some dressing tests in a couple of rooms to get an idea where it’s headed once detail is laid out:
I’m pretty much ready to begin development on replacing the XP system with this. In short, here is a brief list of some of the changes you can expect to happen*. First, here's a list of some of the loot only components that will be required in most crafting recipes (and shared between them). Here are some examples of ‘loot only’ components
  • Metal Pipe
  • Rope
  • Gears
  • Glue
  • Duct Tape
  • Disinfectant
  • Tech Parts (circuit boards etc)
  • Battery
  • Tarp
  • Nails
  • Screws
And here are a list of changes to the game we will be making to facilitate this system:
  • Everything craftable by default
  • Loot-only components required for crafting
  • New players spawn only in the south of the map
  • Radiation:
    • Stronger fields the farther north you move
    • Radiation slowing movement when unprotected
    • Clothing protects against radiation
    • Radsuit required for very high radiation levels
  • Loot-only components with higher tech tiers spawn further North.
  • Rebalance all resource gathering to be more in line with Legacy.
The idea here is that the farther inland you move the more advanced components you will find allowing you to access items at higher tech levels. When you do a Radtown run and find a bunch of components, you’ll have to make a choice on what items you would like to craft as these components will be shared in many recipes. By using radiation we will prevent people from zerging all the way to the top of the map to get the best stuff, you’ll instead need to establish yourself and ‘climb the rungs’ so to speak so you are eligible to loot these more advanced areas. I’m hoping by adding loot-only components in this fashion we will split up the player base in a gradient based on tech tiers. When you start out on the beach it should be far less likely that you will encounter geared players with AK47s as they will have no reason to be in this part of the map. It’s still possible, (griefers) but at least you won’t be competing for the exact same parts of the map when you’re ungeared. There are a few problems we’re aware of, such as being raided or killed will suck as you will be unable to shrug it off and take comfort in the fact that you had at least gained some XP or blueprint unlocks, but this is a pure psychological/perception issue. We may have to figure something out for this though. Let me know what you think on reddit so we can iron out the obvious kinks before launch and avoid another XP system. *subject to change, maybe it’ll all suck.
I did some profiling and identified some performance regressions and issues costing upwards of 5ms/frame. I notified the correct people and will let them explain the fixes.
Helk flagged and reported one problematic case that wasn’t properly handled by the water system where maps without rivers or lakes - e.g. Barren, Savas - were causing an unusual performance impact. I’ve fixed in for this update and you should be able to experience a slight frame rate boost on those maps.
Since our caves and tunnels need to carve out pieces of the terrain collider, which is not supported natively by Unity, we have some hacky systems in place to handle terrain carving. Most of this has been implemented all the way back when we had, like, five caves in the entire world. Now with huge tunnel systems and even more on the way, we’re starting to push it to its limit. This is resulting in small frame rate spikes whenever projectiles hit the terrain and player visibility culling increased the strain on this even further. To counteract I added a quick and simple optimization that should improve performance a bit this week. A bigger and better rewrite is on my list for next week.
Made some changes to our ambient occlusion solution in order to create contact shadowing for our view models. The ability was already there, we just needed to have separate control for surfaces closer to the camera while fading them out to global values based on distance:
This one has been around for a while. We found out it was being triggered by “terrain.basetexcomp”, an optimization aimed at saving GPU bandwidth on terrain rendering, which was was enabled by default. Took me some time to track and fix this crash but switching servers doesn’t seem to be a problem anymore.
Having separate shader level-of-detail controls for objects and terrain can create some problems. For example: shiny wet high detail objects on the shore contrasting against a dry flat terrain using a lower level. Unfortunately the only workaround to prevent this type of mismatch is to centralize shader lod control, which allows us to define quality levels much more effectively and consistently. Starting this patch, the Performance/Terrain Quality control won’t affect shader quality anymore, only mesh quality and detail, similar to Performance/Object Quality. Shader detail is now controlled only by Graphics/Shader Level.
Built a shader to help Vince with cave material setup. This particular shader blends several textures, in the same pass, as if they were separate materials. Using it we’re able to blend 4 different materials using only one actual material where blend masks are controlled by vertex color information. It should end up useful in a bunch of other areas as well. Feel free to check his blog section for the results.
Interior lighting in Rust still kind of sucks. A lot. This is hurting us especially hard in the new tunnel and sewer systems and the artists were in desperate need of a solution. To solve this I implemented an environment query system that allows artists to assign certain environment types (for example underground) to areas around the world. This can then be used to disable things like outdoor ambient lighting or do whatever crazy things they come up with. While the back-end for this is done, the existing dungeons have to be updated for it to have any effect, so don’t expect it to hit before the next wiping update.
Rust Legacy had it, Rust Experimental had it... and then we had to disable it because performance sucked. I’m speaking of grass being pushed down when you walk over it. I came up with a different approach that should allow us to do much more with this without the harsh performance penalty we experienced before. The first iteration of this is now in the game and you can enable it in the graphics options. When enabled players will leave behind trails of pushed down grass for 60 seconds. Walking over the same piece of grass twice will push it down even more. All of this is experimental and may or may not fuck everything up, but feel free to give it a try.
Revive has been somewhat of a pain in the ass when the person you tried to revive was rolling across the floor. This was due to the fact that you could momentarily lose focus of the wounded player. I fixed this by making the test if the revive should be canceled a bit more forgiving. You still have to look at the player and can’t look too far away from him, but you should no longer accidentally cancel the revive as long as you keep looking in the general direction of the player you’re trying to revive.
The building blocked notification sucks. It gives away the position of hidden bases and generally feels out of place in the middle of a gunfight. This is why I changed it to only show up while in building mode or when holding a hammer. Reddit loves it.
How do I put this... respawning in a sleeping bag on a slope could corrupt the server side player rotation because it set it to the rotation of the sleeping bag. This could lead to building privilege bugs, line-of-sight bugs and object interaction bugs and is now fixed. A big thanks to Alistair for tracking this one down.
Building privilege has always worked by determining whether or not the player is inside the cupboard radius and then either allowing or blocking the the placement of objects in the player construction range. This created a meta game where people tried to build inside the cupboard radius of other players while standing outside of it. This is now no longer possible. Reddit hates it.
I've made a start on the scientist NPC hazmat suit Paul drew up a while back. It'll function just like a regular piece of clothing, so you'll be able to wear it once you get your hands on it. It's a complicated piece and not much more than a blockout at the moment, but it's a lot of fun to work on and I can't wait to get started on some of the details.
This week I have brought lighthouse to a finish. It now has proper collisions, LOD’s, loot spawning and fully usable doors. Unfortunately, due to the amount of changes since the last update it will have to wait until the next wipe before we’ll be able to add it to the game. Since finishing the Lighthouse, I have began looking at some untextured props that can be found in the game. I am currently looking into some workflow improvements that should help us create those type of assets quicker.
I went a bit deeper (heh) on cave ambience this week. Here’s a little preview of a bunch of the different elements thrown together: This stuff is all split up nicely so it’ll be easy to play lighter dirt falling sounds alongside little dust falling particle effects, or to place dripping water sounds where there’s actually water drips, or play the bigger spooky rock shifting sounds right as you approach a cliff. The metallic sounds at the end would go in something man-made like the military tunnels.
I’ve been working on music more this week too. I’m taking some of the straight ambient pieces that I’ve done recently and building layers with more tension on top of them now. I’m also changing notes in some melodic parts to make them feel a bit more tense, but keeping everything pretty closely related to the calm layer (same key, notes that would work as chords with the calm layer, etc) so crossfades between them will still sound nice and musical. Here’s a preview of one of the tension layers (which goes with this ambient layer):


  • Added new grass displacement option (experimental, disabled by default)
  • Added contact shadows to view model when ambient occlusion is enabled


  • Made revive line of sight check more forgiving (easier to hold)
  • Building blocked message is only shown when in building mode or holding a hammer
  • Building privilege is also checked at the construction placement position
  • Optimized terrain carving tests slightly
  • Terrain Quality no longer affects shader lod; use Shader Level instead


  • Fixed server side player rotation getting corrupted from sleeping bags on slopes
  • Fixed a situation where building privilege would randomly be incorrect
  • Fixed surface dimensions mismatch error when resizing window
  • Fixed crash when switching servers
  • Fixed DX9 white player preview
  • Fixed water system performance on riverless maps


Recieve monthly updates straight to your inbox