stSpecular Tutorial

stSpecular Tutorial 0.1

Login or Register an account to download this content
Donate
Buy me a coffee via Paypal

Please support this modder with a small donation.

stspecbelair_demo.jpg


Intended Audience:
This tutorial assumes the reader has experience making skins for Assetto Corsa. You should know how to find the txDiffuse, txMaps, txDetail texture names for the mod, and produce replacements in a skin folder. You should be familiar with your 2D image editor, managing the alpha channel of txDiffuse to mask off detail textures, etc.

Installation & Launch:
Extract the contents of the 7z file as a car:
assettocorsa/content/cars/oneweek_stspecular/
With a recent recommended version of CSP, launch the game with the car selected. (posted when 0.2.2 was current; tested there)
Open the "stSpecular Tutorial" app from the app sidebar.
It's likely in the 'Settings' category.
Then use the sliders and buttons to adjust material properties.

Tutorial:
Custom Shader Patch (CSP) makes it possible to replace the shader used by any car, on a single-skin basis. This really allows you to do almost anything, as long as there's a shader that fits your usage. This tutorial focuses on one specific shader - stPerPixelMultiMap_specular - because its txMaps texture is designed to control the shader properties in ways that are useful for making skins.

Getting results you want is basically a 3 step process:
1. Make a copy of the shader replacement in your skin folder.
2. Use the tutorial app to find material settings you want.
3. Paint the colours it provides into the skin.

Copying the shader replacement:
Open the folders
assettocorsa\content\cars\oneweek_stspecular\extension (source),
assettocorsa\content\cars\<target car>\skins\<your skin> (target)
Create ext_config.ini in the target folder.
Open both ext_config.ini files.
Copy the [SHADER_REPLACEMENT_...] section from source to target.
Replace "MATERIALS = Material" with the name of the material you want to edit. Typical names EXT_Body, Body_Paint. You can get this from Content Manager's showroom by clicking on the object.
For extra fine tuning, other shader values may be modified using PROP_ lines.
Make a note of the specular texture name; you can copy body_specular.dds from the source folder if you want, or do your own from scratch if your material requires it.

Using the tutorial app:
Select the car, named "Chevrolet Bel Air PAINT TEST", and run Assetto Corsa at whatever track/weather settings you want.
Open the "stSpecular Tutorial" app from the app sidebar. It should be in the 'Settings' folder.
There are some preset material options available from a dropdown at the top of the app. Pick one similar to what you have in mind, then play with the sliders and paint chips until you have what you need.
The shader result is controlled by 4 textures:
- txDiffuse + txDetail: same as always, AC combines them based on the diffuse alpha channel. Thus the app only provides a single control. Typically you'll want to use a white txDetail for a complicated livery and apply all colour via txDiffuse, but you can manage this however you normally would.
- txSpecular: controls the colour of specular or reflections.
- txMaps: controls various material properties, to allow a variety of outcomes.
Diffuse and specular have simple colour swatches you can click to open a colour picker and set the result you want.
Maps has a slider for each channel, with further explanations.
In short, red sets whether txSpecular is used - this way if the livery only uses one specular colour aside from white, you can mask it here, and leave txSpecular as a simple colour swatch.
Green implements the original reflection/specular sharpness control.
Blue controls reflection strength, but has an expanded range - 0 is none, 50% is regular reflections, and 100% is chrome.
txSpecular's alpha channel takes over control of specular size.
Once you've used the app for a bit, you should be able to memorize the most common txMaps values you'll use, and just pick those directly without having to open the app and check every time.
I've still found it useful for fine tuning diffuse colours, since AC has a pretty weird hue/value skew.

Paint the colours it provides:
Once you've picked the 3 colours, copy their RGB or hex values into your image editor, and paint on diffuse/specular/maps as needed.
The method I generally use is a solid colour layer with a mask that controls which parts of the skin it applies to - then if one of the masks needs to be adjusted, it's easy to copy it from diffuse to the maps texture. And if you want to adjust a material, just reopen the tutorial, pick a new colour and paste that into the layer.

One thing to keep in mind when using coloured chrome or other extreme values is you most likely want to "shrink" the mask in the txMaps by about a pixel on the brighter maps colour, so that the chrome effect is turned off before the diffuse channel goes back to being a paint colour. Otherwise you may get a bright ring where it's half-chrome half-paint, due to blending math.

Unlike original txMaps, this one moves AO to the alpha channel - so instead of multiplying red and blue channels by AO, you can have a constant rgb value over the entire texture, and put AO into alpha. This should allow better results after dds compression, since the alpha values are compressed separately from rgb so there is less opportunity for gradients to get skewed green/purple, or unwanted noise to be introduced.


Feedback Welcome


Credits:
Car model, tutorial, app - Stereo
sound bank - Kunos Mercedes SLS AMG (smallest I could find, to reduce download size)

Latest reviews

Premium
Great stuff, I've made a lot of skins, but never messed around, or really understood this side of things, so this will be really useful. Thanks.
Great idea and resource! Thanks mate!

Latest News

Author
Stereo
Downloads
123
File size
9.4 MB
Views
1,623
First release
Last update
User rating
5.00 star(s) 2 ratings

More mods from Stereo

Are you buying car setups?

  • Yes

  • No


Results are only viewable after voting.
Back
Top