Jump to content

Recommended Posts

Hvatu1S.jpg
Same units, same time of day, same camera angle. Click to enlarge.

Features

  • Units, vehicles, objects, buildings, terrain, vegetation, etc should now react better and, to some extent, more realistically to lighting.
  • Contrast in general should be enhanced, providing more depth and more vibrant colors to OFP/CWA while reducing the cartoony look (but, remember, this still is OFP).
  • The differences between the interior and exterior of buildings and vehicles should be more noticeable.
  • Dust and smoke particles won't be visible during night time any more. No more seeing the shining trail of dust of a tank that you can't actually see.
  • Lighting effects similar to vanilla sunset and sunrise should be present for longer hours.
  • Vehicles should provide more realistic shining effects.

Description
This addon modifies the lighting and glossiness properties of the terrain, vegetation, buildings, infantry, vehicles and virtually anything available in vanilla OFP/CWA. All those vanilla textures have been distributed in several categories (classes) which use new custom material properties.

Each material definition has its own distinctive properties, and include:

  • Buildings
  • Terrain
  • Vegetation
  • Water
  • Glass
  • Generic metal
  • Metal of vehicles
  • Interior of vehicles
  • Metal of weapons
  • Human skin
  • Clothing
  • Gear made of plastic and similar materials
  • Particles
  • Shining particles

The default OFP materials are also overridden using values similar to the new material definitions, so you should be able to see the effects of these new material properties on any island that doesn't use custom textures.

Also included is a pbo which adds material properties to a lot of user made units and objects. While it doesn't cover them all (that's an almost impossible task) it should cover some of the more popular ones, including AGS buildings, BAS vehicles and some islands. This pbo also incorporates the texture listings for user made addons found in Locke's Original OBJ Material Def addon, although the textures themselves have been reorganized so they use the new material properties.
 

5T8A7Zw.jpg
Same units, same time of day, same camera angle. Click to enlarge.

Download

 

OFP Materials v1.1 (contains materials for Addons 1):

 

Installer

Mirrors:

 

Manual installation:

 


Contents
The zip file includes:

  • A readme
  • The addons folder proper, containing: ofp_matdef_core.pbo and ofp_matdef_addons1.pbo
  • _pbo: You can find uncompiled versions of the pbos here
  • high contrast: inside there’s a version of the ofp_matdef_core.pbo file using high contrast material definitions
  • low contrast: inside there’s a version of the ofp_matdef_core.pbo file using low contrast material definitions
  • _config_template: an empty config file you can use to add support for other addons

Manual Installation
Shortcut method

  • Decompress the zip file and place the OFPmaterials folder inside your ARMA Cold War Assault one.
  • Create a shortcut of the ColdWarAssault.exe file.
  • Right click on the new shortcut and click on Properties.
  • In the Properties window add the following line in the Target text field, just after the path to ColdWarAssault.exe : -mod=OFPmaterials;
  • To see the new material definitions you must now launch the game by using the new shortcut.

Steam method
If you don't want to use shortcuts and use the Steam version:

  • Decompress the zip file and place the OFPmaterials folder inside your ARMA Cold War Assault one.
  • In your games list right click on Arma: Cold War Assault and select Properties.
  • In the Properties window click on the SET LAUNCH OPTIONS... button.
  • Write this in the text field: -mod=OFPmaterials;
  • Click OK. Click Close. Click Play.

If you want to skip the OFP intro you can add -nosplash before the -mod line, like this:
-nosplash -mod=OFPmaterials;

You can also add or remove this addon whenever you want. It won't break any current mission or campaign. You can also place the pbos in any other addon folder. Load order doesn’t matter.

High contrast or low contrast?
There's two versions of the ofp_matdef_core.pbo file you can use: high and low contrast. Each one has its own benefits and drawbacks, so it's up to you which one to use. Note that the default one is the high contrast version, but only because it showcases better what this addon is all about.

Use high contrast if...

  • You want more dramatic lighting (and more realistic and better IMO) applied to everything
  • You are not planning on creating or playing missions that use dynamic spawning
  • You are not using user made addons which don't have the new custom material definitions
  • You want to create good looking videos or screenshots

Use low contrast if...

  • You are planning on creating or playing missions that use dynamic spawning
  • You are using user made addons which don't have the new custom material definitions
  • You don't mind losing enhanced lighting for units, buildings and other structures (terrain, vegetation, water and glass will still have the enhanced lighting).

Basically, the low contrast version is the most compatible all around, but it loses some lighting effects. The high contrast is the one that provides more eye-candy, but it makes dynamically spawned and unsupported addon units, structures and weapons look flat and ugly.

Changing contrast settings
OFP materials uses by default the high contrast version. If you want to use the low contrast version instead, simply copy the ofp_matdef_core.pbo file found in the low contrast folder and paste it inside the addons one, overwriting the existing version.

To change it back to high contrast then follow the same steps, but copy the pbo found in the high contrast folder instead.

You can also edit the provided Config.cpp (found in _pbo\ofp_matdef_core) and comment and uncomment the #include line of the contrast file you want, and then compile the pbo.

More comparison media
Videos





Album
https://imgur.com/a/q8my7

Adding support for your own or preferred addon(s)
You can find the template of a configuration file in the _config_template folder. It’s already commented, so refer to it for further instructions.

Feel free to share it publicly once you’re done, be it in the release thread of this addon, another thread, or bundled in the addons folder of your own addon or mod.

Known issues
OFP is unable to apply materials to dynamically spawned units, objects and weapons. Anything that wasn't present at the start of a mission won't use any material at all, and will look flat and way too bright compared to the rest.
 

Note that all this only affects the High Contrast version.
The Low Contrast is exempt from all this, as its goal is to allow spawned and unsupported units to blend better.

 

Solutions
Let me advance that there’s no real long term, no-hassle solution that I’m aware of. If you know of any, please, let me know. With that said, there’s ways to work around this, none of them optimal or practical.

  • Place in the editor objects, units, etc of the same class you are planning to spawn dynamically
    This might work when you want to spawn one or two classes, but it’s a very bad solution for most cases, as it would require manually placing dozens of units and structures. You should also not remove them during the mission. For materials to be applied there must always be an unit of the same class already present in the editor. If you remove the units you manually placed, further spawned units will be material-less.
  • Alt+Tab
    Yes, really. Alt+tabbing resets the rendering, so it reapplies materials to all present units, structures and weapons. If you are using Windowed Mode then you can minimize and maximize the OFP/CWA window for the same effect.


IzOgn1C.jpg
Spawned unit while using High Contrast version. It looks flat and out of place.

wN3eUl1.jpg
The same unit after Alt+Tabbing.

Material limitations
Just remind you that, as with anything related to materials, you can only see their effects if you have Hardware T&L (Hardware Transformation and Lighting) enabled in the Video Options menu. It should be enabled by default. If it’s disabled then you most likely are using a very old or weak graphics card that doesn’t support this feature.

Also, roads and any other object with vertices placed On Surface won’t receive any material lighting effect. The same applies to non-binarized models.


Changelog

v1.1
CHANGE: Vegetation now less reactive to lighting
CHANGE: Updated template config with more and more extended comments
CHANGE: Added some missing classes to template config
CHANGE: Moved WW4 and Mi2 textures from ww4ext_matdef to ofp_matdef_addons1
NEW: More addons supported by ofp_matdef_addons1, including MAP, BAS, AEF and OFPL objects and a bunch of Vietnam era addons

- v1.0
* Initial release

Credits

  • Locke@Germany for inspiration and for the glass and metal texture lists of user made addons
  • krzychuzokecia and Apocalypse83 for testing

Permissions
All my released work falls under the Attribution-NonCommercial-ShareAlike 4.0 International license, unless specified otherwise.

You don't need to contact me if you want to distribute or modify any of my projects, but it'd be appreciated.

Some of my work might include content by other authors. My permission doesn't extend to their work, so you should contact them if that's the case.

Edited by kenoxite
updated to v1.1
  • Like 3

Share this post


Link to post
Share on other sites

Hey kenosite,

Really nice improvement in appearance. Anything that improves OFP visuals without an impact on performace is a big ++.

Thanks

Share this post


Link to post
Share on other sites

After playing with it for a few minutes now I must say that the world looks more vivid, but it isn't overdone so that the islands lose their bleak and depressing looks that made OFP appeal to me. Well done :)

Haven't yet tested it with the DXDLL effects enabled though ...

Share this post


Link to post
Share on other sites

Yup, i'm trying it with DxDll and my own (unsupported) FPW addons and it really looks better. Great job !

Share this post


Link to post
Share on other sites

Thanks guys.

BTW, if anyone wants to create more comparison screenshots or just pictures showcasing the new materials feel free to post them.

Share this post


Link to post
Share on other sites

Great. But trees look worse. Too highlighted the fact that they consist of large polygons (foliage). From 2:00 minute video clearly visible...

Share this post


Link to post
Share on other sites

Is it possible to get some further explanations about what Material does what ; i read the config Template, but all materials aren't explained, such as : MetalVeh (and how it's different from "metal" or "riflemetal"), vehinterior, Gear compared to Clothing. Thanks !

BTW, is there a tool to quickly extract textures and textures path from a p3d model (to copy them and paste into the material config ?)

Edited by ProfTournesol

Share this post


Link to post
Share on other sites

@ =SappeR= : Ah, yes, vegetation... It's been by far the trickiest to get to a decent state. Even then, it's no perfect, as you've noticed already. The thing with vegetation is that if you increase contrast and glossiness/shininess (specular and specularPower) they turn yellow, if you lower it too much then you could as well setting those values to zero, as they're barely noticeable. The same happens when going too high or too low with the ambient lighting values. Setting it too low they become almost black, setting it too high removes any contrast whatsoever... So, well, that's the closest I've been able to come up with to give vegetation enough contrast and lighting reaction while being noticeable and not being overdone. It also doesn't help that all vegetation is built by crossing planes, so lighting is going to be quite bad for them one way or the other.

If it really bothers you you can change the lighting settings yourself by reducing the values of specular and specularPower to 0, which is what I feel you find more offending. But also note that they only look this way when the sun is really low. The rest of the time the glossy effect isn't noticeable.

@ ProfTournesol: I'll try to give you a quick breakdown:

  • OFPbuildings: exterior and interior of buildings (houses, forts and other structures made of matte materials)
  • OFPmetal: anything metallic that isn't a vehicle or a weapon (a metal door, metal pole, etc). This doesn't provide hard shinings compared to the other metal definitions, but it's still brighter than say, the buildings material
  • OFPmetalVeh: any vehicle made of metal should have this applied. It provides some nice hard glossiness (metal shining) when the faced directly against sunlight, without making the vehicle feel like it's wrapped in cellophane (like the default OFP metal material does)
  • OFPriflemetal: same as with vehicles but for infantry and vehicle weapons. It has a more subtle glossy effect, though
  • OFPterrain: the material applied to the ground of any island, independent of the terrain type. It reacts to lighting quite noticeably, particularly in or close to sunrise and sunset.
  • OFProads: I could as well deleted this, as the majority of roads have vertices set to OnSuface and can't use materials. But, well, IF they'd work they'd be the same as the terrain material
  • OFPvegetation: the one applied to trees, bushes, etc. Has lighter ambient light and reduced glossiness compared to the terrain one
  • OFPWater: used by the sea and some objects like fountains (Montignac, Morton...) and water particles. More glossy than vanilla and reacts to lighting better (starts darker and gets lighter as sun goes up)
  • OFPparticles: used for almost all the particles like dust, smoke, etc
  • OFPshining: same as particles but for shining ones. It just makes sure that the textures defined here will always be shining, even if the author forgot to set the vertices to "shining" in Oxygen.
  • OFPglass: windows, vehicle windshields, etc, anything made of glass. Has a similar effect as vehicle metals (so hard shining areas but smaller compared to vanilla)
  • OFPvehinterior: it's basically a glossy-less material, to make the interior of vehicles (such as the cargo area of an M113) particularly dark, and without any "shining" effect
  • OFPskin: used for faces, arms, etc of infantry units
  • OFPclothing: usef for clothing of infantry units, and similar textures
  • OFPgear: a slightly glossier version of the clothing material. Used for things like vests and boots, but also useful for vehicle wheels and basically anything close to plastic

About a tool to deal with all this, there's none that does exactly that. Actually, half of the work done for this addon was made by manually browsing, selecting and copying the OFP and Res textures one by one. It was extremely crazy and time consuming. That's until I remembered about that PaNTool thing, which is what I ended up using.

So, PaNTool is the closest you'll get that I know of. Browse to the addon folder you want to include, right click on every listed texture and paste it to the corresponding class. The do a Replace with Notepad++ or similar to change all the unneded pathing to leave it as <name of addon>\<path to texture>

Share this post


Link to post
Share on other sites

Thanks a lot for those explanations. I'll give a try ASAP to include my own textures into the config.

Share this post


Link to post
Share on other sites

No problem. I you want to use this in your projects I think it'd be better if you create a new exclusive addon just for it. Alternatively, the pbo holding the user made addons is numbered as 1, as you can see. The intention is collecting any texture listings provided by others to eventually release a new #2 version which would complement the already released material pbos.

For reference, I'll provide for EXT its own material definitions as a separate addon, placed in the same folder as the rest EXT ones. I'll also provide a version of the OFP materials one set to Low Contrast, as EXT has a lot of built-in spawning (support calls, rucksacks, etc).

Anyway, I think I'll update the zip file to include a more commented version of the template. Probably tomorrow or so.

Share this post


Link to post
Share on other sites

This looks like a great visual improvement that gives some more 'life' to the game. I am curious how it works with DXDLL postprocessing :D Good job kenoxite :)

Share this post


Link to post
Share on other sites

@ Rożek: Thanks, man.

@ ProfTournesol: Gear material should work good enough. It's the material I resort to when no other material fits. I actually use it for the wooden boards found inside the cockpit of the BIS Camel and it looks fine.

Share this post


Link to post
Share on other sites

Hey Kenoxite.I haven't tried it out yet.But I just wanted to say thanks for putting the time in on this.

I'm sure it was very tedious.But from what I've seen,the results are worth it.Even taking the limitations into account.

Cheers. :)

Share this post


Link to post
Share on other sites

Great work! Thanks a lot, the game looks nice and much more realistic! :icon14:

Share this post


Link to post
Share on other sites

Pretty cool. I was also trying to improve OFP lighting but I was using 3rd party post-process programs and after failing to properly enable ReShade with SweetFX 2.0 in OFP, I kind of gave up on it. A simple way to better the look of the game is fiddling with the brightness and gamma sliders in the game, for me the best value is 1.2 for both settings. And by the way, it's also possible to fake HDR/rays by changing the flare texture, making the Sun much more bright and realistic, although this will also alter all other flares in the game meaning that night street lamps will be way too bright.

Share this post


Link to post
Share on other sites

@ Maczer: Thanks, man. It's probably the most insane task I've done in my time around here, that's for sure. The amount of textures needed to be tracked, copied and categorized has been considerable. Then there's the creation of the custom materials themselves and endless sessions of testing. But, well, it's for the best. OFP looks better than ever, and all the grunt work I've done will surely help others. If someone doesn't like one material or another he just needs to tweak some values, not create kilometric lists of textures. Easy work.

@Shadow: Glad you like it!

@noob1: Playing with gamma and brightness only artificially brightens or darkens the whole scene. By using materials you can define exactly which models or parts of a model will react to lighting, its specularity and even its emitted light. There's no other way to achieve results like this other than by using them.

For anyone curious, it turns out there's a BIKI page dealing with all this materials thing. It's for Arma, but things like specularity and lighting are already present in OFP. I wish I had known about that page earlier TBH :P https://community.bistudio.com/wiki/ArmA:_RVMAT

Share this post


Link to post
Share on other sites

Overall it looks pretty good, except I have to agree with Sapper about the trees and shrubs. Also we were playing a misison on winter_nogojev and the ground rather than the normal snow covered look really looked more like sand with a yellowish tint to it. Hope a few tweaks can straighten this out.

Share this post


Link to post
Share on other sites

I noticed the same with regard to snow.But it's likely just because of the time of day and height of the sun.

When it's low,surfaces really start taking on a red/yellow hue.Adjusting material values or contrast should help.

The vegetation is not something that can be sorted out though.As most of them are composed of planes

the forms are too simple.You get an even distribution of light across the whole surface,with no regard for

the texture underneath.T&L materials rely on the geometry to give decent results.It's not very forgiving.

@Kenoxite

Limits aside,it's much more pleasing to the eye.Although like you said it can really show up an unbinarized

model without it's own material.Great stuff. :)

Edited by Maczer

Share this post


Link to post
Share on other sites

Yes, models must be binarized to benefit from this, together with textures definitions in the cfgtexturetomaterial. Before trying this mod, I thought model had to be binarized together with the given material definitions config, but nope.

Share this post


Link to post
Share on other sites

Snow: It only happens when the sun is low. Check this album for a time lapse: https://imgur.com/a/NhSgM

Yellow tint: It's due to another limitation OFP's material system, from what I could gather. Hotspots (the "shining" of materials) default to the environment light of OFP, which is a quite hard yellow. I was the first one trying to get rid of the yellowish highlights, but there's no way around it. If anyone knows a work around for this let me know.

Vegetation: OK, this seems to bother way too many people now. I think we can all agree that what's more bothering is all those yellow highlights/hotspots, correct?

I've lowered specularPower (glossiness) from 1 to 0.55. That's about the limit for vegetation to react somewhat to lighting. With values equal or below 0.5 you could as well set it to 0. Time lapse album: https://imgur.com/a/lNsGM

I was planning on releasing a small update today to include a more commented config template. I could also include these tweaks there if you agree on this. In general, as has been mentioned by Maczer and myself, there's no way, or no simple way, to make vegetation look good due to their simplicity.

Other than that, if someone comes up with some killer material values we can all agree on being significantly better than the current ones, then I'll be happy to include them.

Share this post


Link to post
Share on other sites

If you made the original videos available, could someone edit them together to show the effect in split-screen? Pleeeaase...

Share this post


Link to post
Share on other sites

Yellow tint: It's due to another limitation OFP's material system, from what I could gather. Hotspots (the "shining" of materials) default to the environment light of OFP, which is a quite hard yellow. I was the first one trying to get rid of the yellowish highlights, but there's no way around it. If anyone knows a work around for this let me know.

I've noticed when close to a bright white light source at night time, the specular reflections will turn bright white instead of yellowish. I think prof Tournesol also had some different specular values in his Veni Vidi mod, simulating gold, silver and copper materials. But you need to ask him on the matter.

Share this post


Link to post
Share on other sites
I've noticed when close to a bright white light source at night time, the specular reflections will turn bright white instead of yellowish.

That's probably because You don't use DxDLL (dXdll?). During night OFP uses special shader that turns everything black and white. DxDLL turns it off so You can see colors during nighttime (and what an experience it is for the first time!).

Share this post


Link to post
Share on other sites

I'm using dxdll, what I mean is that specular maps turn white instead of yellow when close to a light source during the night. Here is an example:

http://postimg.org/image/8z612bybn/

http://postimg.org/image/8v6b48f8f/

First example is day time reflection, second is night time (close to street lamp). I think it's possible to change that color value during day time too but I'm not certain.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×