Collected skinning info (skin formats etc.)

Mazay

Member
I created new thread to this so information is easier to find. I will be collecting skin related stuff in this first post. All corrections and suggestions are welcome.


Figuring out skin used:

Acquire old openable version of .pckd files, for example through steam beta preencrypt build. (backup savegame before!)
Vehicle paint reference files (.vepa) is packed inside data\vehicle\xx_european\settings.pckd
After unpacking with Pckd Unpacker vepa files can be found at settings.pckd-unpacked\part\paint
Open .vepa file in BagEdit to view skin texture and paint used.

Skin image textures (.bmap) can be found in data\vehicle\xx_european\art and paint color files (.vhcp) in data\vehicle\shared\paint



Breckfest or build_asset.bat for making skins?

Both does work, but Breckfest does not generate mipmaps so textures will appear too crisp and gpu heavy.
Also texture quality settings don't affect Breckfest made textures.

Generally it's better idea to use build_asset.bat
Make your textures into .png or .tga files and drag and drop them over wreckfest\tools\build_asset.bat



Official car skin formats:

c5.bmap:
Texture. On transparent areas color is taken from paint files.

n.bmap:
R - Normal map detail
G - Normal map detail
B - Alters reflections, All white

s.bmap: (Most of the info copied from dev post: Link.)

R - Metalness:
White color means it's 100% clean metal and black means it's not clean metal.
Rust, for example is no longer metal which means it's a black value in metalness.


G - Roughness:
White is super rough, black is super smooth. Most of the detail should go in this channel.

B - Specular (Reflectivity):
This is an additional adjustment for reflectivity which in most cases should be left as 128,128,128 grey. However, if you have details such as holes marked into your textures I recommend marking them into this channel as black.

A - Car paint clear coat (Not used anymore)
White means a clean showroom quality clear coat, black means no clear coat at all.


Example channels from 05_american/skin01_s.bmap: (AM2 Skin3)

ns.bmap: (Combined format used only with blend materials)
R - Normal map detail
G - Normal map detail
B - Ambient Occlusion
A - Roughness


Car skin formats with Breckfest:

During convert to and from bmap Breckfest will swap some channels. Following is the swapped order.

n.bmap: (Red & Alpha swapped)(old format before BC5U)
R - Not used anymore, All black
G - Normal map detail
B - Alters reflections, All white
A - Normal map detail

s.bmap: (Green & Alpha swapped)
R - Metalness:
G - Car paint clear coat (Not used anymore, All Black)
B - Specular
A - Roughness




Photoshop's unique TGA transparency:
Tga files in Photoshop must have Alpha 1 channel for transparency to work.
You can double check your file have transparency with Paint.net or Gimp.

Pink texture problem with special textures:
Some rare textures like driver_c.bmap and register plates require that png/tga file must be in correct folder during conversion or they will turn pink. These textures also can't be converted with Breckfest as Breckfest does not store directory path in .bmap

Other threads to check

TOOL Breckfest - BMaps made tasty
Custom Skins Thread
 
Last edited:

Mazay

Member
Mazay's ImageMagick scripts v1.2

I wrote couple of scripts to help working with channels of images.
Scripts are initially written for my own use, but I thought others might find them helpful too.

Partial copy of ImageMagick http://www.imagemagick.org is included for ease of use.

Drag & Drop images over batch files to convert.

channels_separate.bat:
Saves channels in separate files.

channels_combine.bat: (not Drag & Drop)
Combines channels separated before.

n-map_breckfest_to_official.bat
Converts Breckfest normal map to official tga format.
Alpha will be moved to red channel

s-map_breckfest_to_official.bat
Converts Breckfest specular map to official tga format.
Red and alpha channel will be swapped

Download here


Post your comments!
 
Last edited:

Axarator

I test games, I make games, I mod games and play
Weeked Smasher
Mazay said:
Mazay's ImageMagick scripts v1.0

I wrote couple of scripts to help working with channels of images.
Scripts are initially written for my own use, but I thought others might find them helpful too.

Partial copy of ImageMagick http://www.imagemagick.org is included for ease of use.

Drag & Drop images over batch files to convert.

channels_separate.bat:
Saves channels in separate files.

channels_combine.bat: (not Drag & Drop)
Combines channels separated before.

nmap_alpha_to_red.bat
Converts Breckfest normal map to usual format.
Red channel will be overwritten with alpha/transparency channel. Alpha will be removed.

nmap_red_to_alpha.bat
Convert usual normal map to Breckfest format.
Red channel will be moved to alpha channel.

Download here


Post your comments!
Can you make a re-converter script where you can convert non-bmap files back like vsks or things like that??
 

Mazay

Member
I tried to do something like that. I downloaded LZ4 compressor and did play with parameters hoping to find something which works with wreckfest.
Aswell I tried understand compression to fake it, but no luck yet. It would need more work than these scripts as here ImageMagick does the hard work :p
 

orbotnive

Member
First thank you for sharing. I've made a few basic skins without the editing of ns/s before and I've looked over the seperated channels.

I thought I followed the explanation but there's extra shine on rust parts whereas I thought I'd toned it down even more. I admit I'm not the fastest to pick up new things.

It would be a great help to see an example both in game and the file for doing it if someone who already gets it would be willing, I could run with that
 

Mazay

Member
It's possible channels may have been swapped in _s.bmap files also as they were in _n.bmap. I haven't yet tried dev's info by myself.

Edit: Green and alpha channels seems to be swapped together.
 

Errol

Member
Weeked Smasher
Is there anything I could add to breckfest to make editing the _n and _s maps easier?
 

Mazay

Member
Errol said:
Is there anything I could add to breckfest to make editing the _n and _s maps easier?
I think biggest annoyance is tha _n.bmap normal maps seem to have only two used channels and one of them is at alpha instead of red and green where they usually are making editing harded. I think moving current alpha to red automatically would help many. But then there is the problem what to do with rest of channels. If image ends up 100% transparent it isn't gonna be that helpful.

Also I wonder what is the reason for dev's conflicting information about channel order. Perhaps bugbears tools just automatically swap channels, or is there bug in wreckfest?
 

lobsterfran

Member
Errol said:
Is there anything I could add to breckfest to make editing the _n and _s maps easier?
After creating any bmap file, I always then feed that back into wreckfest to check the image created is correct. Automating this would be nice. Not essential by any means, but nice.
 

Matrix404

Member
lobsterfran said:
Errol said:
Is there anything I could add to breckfest to make editing the _n and _s maps easier?
After creating any bmap file, I always then feed that back into wreckfest to check the image created is correct. Automating this would be nice. Not essential by any means, but nice.
One thing i'm working on is adding an argument that prevents the rename process (currently in testing), and changes the destination of the files, so you could send them to the wreckfest folder. In the event the files exist it would prompt you, or we could have a backup folder or something. I've also thought of having a gui, so you can do things over and over with one click.
 

lobsterfran

Member
Matrix404 said:
lobsterfran said:
Errol said:
Is there anything I could add to breckfest to make editing the _n and _s maps easier?
After creating any bmap file, I always then feed that back into wreckfest to check the image created is correct. Automating this would be nice. Not essential by any means, but nice.
One thing i'm working on is adding an argument that prevents the rename process (currently in testing), and changes the destination of the files, so you could send them to the wreckfest folder. In the event the files exist it would prompt you, or we could have a backup folder or something. I've also thought of having a gui, so you can do things over and over with one click.
I like the sound of that. I seem to spend ages renaming files, copying them, browsing to wreckfest vehicle folder, finding & deleting original skin files, pasting the new ones in...only to find the gfx aren't quite right. Rinse, repeat. Anything to cut this faff down would be nice.
 

Errol

Member
Weeked Smasher
lobsterfran said:
I like the sound of that. I seem to spend ages renaming files, copying them, browsing to wreckfest vehicle folder, finding & deleting original skin files, pasting the new ones in...only to find the gfx aren't quite right. Rinse, repeat. Anything to cut this faff down would be nice.
I just write a quick .bat file if I'm doing anything repetitive.
 

Mazay

Member
orbotnive said:
First thank you for sharing. I've made a few basic skins without the editing of ns/s before and I've looked over the seperated channels.

I thought I followed the explanation but there's extra shine on rust parts whereas I thought I'd toned it down even more. I admit I'm not the fastest to pick up new things.

It would be a great help to see an example both in game and the file for doing it if someone who already gets it would be willing, I could run with that
I rewrote s.bmap portion and added there example pictures. It should be now a bit easier to understand.
 

lobsterfran

Member
Mazay said:
orbotnive said:
First thank you for sharing. I've made a few basic skins without the editing of ns/s before and I've looked over the seperated channels.

I thought I followed the explanation but there's extra shine on rust parts whereas I thought I'd toned it down even more. I admit I'm not the fastest to pick up new things.

It would be a great help to see an example both in game and the file for doing it if someone who already gets it would be willing, I could run with that
I rewrote s.bmap portion and added there example pictures. It should be now a bit easier to understand.
Thanks for your efforts to explain. Still can't get _s files working as I'd like though. I end up with shiny rust, and non-metallic metal.

So, I have a 4- layer image, nominally called R, G, B and alpha. Each layer - I follow the instructions as documented here to get the effects I'd like.... each layer is greyscale & for each layer, any value between white and black is valid?

Right, now I have to convince paint.net what each layer is before I combine them into a png file.
For R layer, I use colour curves, select blue and green, and drop the values right down, leaving behind only red.
Repeat process for B and G layer.
For alpha layer, I convert the layer to "black and alpha".
For blend mode, I choose "multiply" for each of the layers.

My resultant png looks nothing like the ones in wreckfest.
If I change the Opacity of R,G and B layers to about 10, it starts to look similar to a wreckfest _s file.

But, once converted, saved as 32 bit png, Breckfested and applied in-game - I always tend to have shiny rust and non-shiny metal.

Any idea what I'm doing wrong?
 

Olli Teittinen

Vehicle artist
Mazay said:
conflicting information about channel order
That difference comes down to the compression method used. There's more data reserved for compressing the alpha channel so it's better to use that. Our file converter (creates the alpha channel if it isn't specified and) switches the channels automatically when building the files into the game but all textures are built with the channel order I mentioned earlier somewhere. _n and _s files use a slightly different compression method so that might explain why there are different channels switched. Sorry for the late reply on that subject.
 

sam223

Active Member
Weeked Smasher
Can you shed any more info on the paint layer olli (not the textures but the RGB swatch) and whether it is possible to remove it all together?
You may remember me attempting to create a transparent base swatch earlier this year , only to find out that its not possible....

Since then ive been digging around with the car model. And found that the whole car model + wheels? + windows is packed inside the body.vhcl.
Found that i can remove association with individual shared textures i.e windows, from the model.Resulting in pink missing texture (will possibly rename the driver/seat texture so each chassis uses a different driver/seat texture in the future) .And found that removing the base swatch association from the skins.vsks results in a red (missing?) swatch.

So my question is, is there anyway to get the car body to behave the same as the windows on the model ? No base swatch.
Would i need to do this on the model itself or is there another file in the hierarchy dictating which group gets the base swatch and which doesnt.
 

Olli Teittinen

Vehicle artist
Car skin uses a completely different shader than the rest of the car. The detail about which polygon uses which shader is assigned within the model. It's not possible to make the car skin use the window shader as the system isn't designed to allow that kind of flexibility (as making body parts invisible has no real use. Better to hide them from the model instead).
 

sam223

Active Member
Weeked Smasher
Olli Teittinen said:
Car skin uses a completely different shader than the rest of the car. The detail about which polygon uses which shader is assigned within the model. It's not possible to make the car skin use the window shader as the system isn't designed to allow that kind of flexibility (as making body parts invisible has no real use. Better to hide them from the model instead).
Cheers Olli. So no feasible way to do this without changing the actual model?

I.e rotten sills+floors with visible holes


 

Olli Teittinen

Vehicle artist
You can put small holes into the texture as black with alright results as long as you remember to also add the holes into the specular map (the simple grey channel in _s). Any bigger rust, cracks etc. will look silly if it's done into the texture and always better to do those into the model.
 

sam223

Active Member
Weeked Smasher
Olli Teittinen said:
You can put small holes into the texture as black with alright results as long as you remember to also add the holes into the specular map (the simple grey channel in _s). Any bigger rust, cracks etc. will look silly if it's done into the texture and always better to do those into the model.
Thanks olli for the info. Will have a try tomorrow and post results.
 
Top