Implementing the Farcry2 weapons rusting

I wanted to know if, from a technical standpoint it could be possible to implement the effect they use in farcry2 to simulate the degradation of weapons (the material of the weapon gets progressively more and more rusted)

I am by no mean an expert in modeling/texturing, hence why i’m asking.

Why would you want to? To get the kind of shit you see on FC2, you’d need to bury the things in damp, highly acidic soil for about a year. After scratching off the finish.

Even after extensive combat and minimal care, you won’t see anything like that. I’ve seen Long Lees over 100 years old that were in pretty smart condition, and rifles which went through the roughest parts of WWII but look little different to any other. Believe me, you would have to set out with the intent to destroy a rifle to do that much damage to it in anything less than a century. Even if you neglected the shit out of it through ignorance it’d look better than the trashed FC2 weapons.

I’m not talking abour realism but i’m very into visual cues to replace the all too precise numbers. So maybe not plain rust, but basically being able to transit slowly from one texture set to another, does gmod/source even offer something like this?

Probably. Not sure how you’d do it though.

You’d need Lua I would imagine.

Yeah i bet lua would be needed, i was thinking using like 10 or so texture sets for a given model but that’s a significant amount of data, i was more hoping for a way to “blend” a “clean” texture and an “dammaged” texture and adjust the amount of blending.

I suppose you could have a model with like 20+ skins, each skin with a little more rust.

Damn, ninja’d.

you could have a double-mesh with a slow proxy in the vmt

Why didn’t I think of this?

care to explain a little more what it is about?

I have no idea what a slow proxy is (goes and looks it up) but if the model itself changes you could use bodygroups as they work pretty well for alterations of the model of minor details.

Make a lua script that changes the skin groups after awhile.


More efficient to use skin families/groups, unless you want modeled details. Skins are better for rust, though.

I’m sure there was something like that in the news a while ago, though I’m not sure if it also changed the textures.

Was just a SWEP, didn’t change textures though.

What did it do?

You can make an animated texture with an extraordinarily slow transition speed. Or better yet, a speed of zero and just control its frame with lua.

I agree.

Just write a custom texture shader. You would need code to reference it and change an alpha value for a dirt texture sheet.