Questions regarding paint jobs

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
heifi
Posts: 82
Joined: Fri, 10. Feb 06, 12:45
x3ap

Questions regarding paint jobs

Post by heifi » Mon, 8. Feb 21, 19:54

Hello everyone,

as I really miss the ship material of argon ships in x3, I tried to apply various paint jobs. The only one which comes close is "J.B.C." as long as you are in Argon Prime, but it does have totally different colors in other sectors:
https://steamcommunity.com/sharedfiles/ ... 2388846693

So I thought about making an own paint job, but I do simply not understand how they work. I unpacked a few paint job mods which do replace the default paint jobs to learn from them. It seems as paint jobs do have a texture and a pattern. Additional there are different values defined in the paintmods.xml file:

Code: Select all

<replace sel="/paintmods/paint[@ware='paintmod_0006']"><paint ware="paintmod_0006" quality="1" hue="0" brightness="-1" saturation="1" metal="-1" smooth="-1" dirt="-1" extradirt="-1" pattern="extensions\aeongm\assets\textures\patterns\aeongt" strength="1" scale="1" sharpness="100" invert="0" red="024" green="036" blue="048" alpha="255"/></replace>
<replace sel="/paintmods/paint[@ware='paintmod_0048']"><paint ware="paintmod_0048" quality="1" hue="0" brightness="1" saturation="1" metal="-1" smooth="-1" dirt="-1" extradirt="-1" pattern="extensions\aeongm\assets\textures\patterns\aeongt" strength="1" scale="1" sharpness="100" invert="0" red="032" green="032" blue="032" alpha="255"/></replace>
As far as I have tested them, the first entry is a plain and simple blue color paint job, the second one is blue too, but a really metalic one, similar to "metalic grey", "metalic black" oder "J.B.C" - almost as I want it. Apparently "metalic" is not only controlled by the "metal" attribute. The pattern is of course selected by the "pattern" attribute, but how does the paint job know which texture to use? Is there a "texture" attribute, which is just not there because those entries are replacements or is this a namespace thing? And how does color work on this? (especially J.B.C. does confuse me a lot) I know that textures can have different colors and they might influence the color of the paint job. But why are there RGB attributes in the xml file too?

I would appreciate any help, thank you in advance!

User avatar
Axeface
Posts: 2943
Joined: Fri, 18. Nov 05, 00:41
x4

Re: Questions regarding paint jobs

Post by Axeface » Mon, 8. Feb 21, 21:21

You cant change the underlying texture with a paintmod, that would be done by changing the materials themselves (materials.xml) and would change all ships. Paintmods can just apply an overlay pattern and use other adjustments to change pattern colour or underlying hull diffuse texture appearance. The alpha channel of the pattern is used to apply masks too. If the pattern is at strength=1 then many of the adjustments you can make wont work for the pattern itself (where the pattern is fully opaque), most apply to the underlying hull of the ship rather than ontop of the pattern. The vanilla paintmod patterns are all greyscale and then use the xml values to change their colour and appearance. I assume it has been done that way to allow the devs to quickly make lots of variety but the whole system really does limit what you can do. For example in my pimp my paintjobs mod I wanted to keep the metal hull appearance and change the entire ship to 1 colour, but this is not possible so I had to settle with an overlay pattern that covers the entire ship, losing the metal look unfortnuately. All ships (except Split) are setup to have a base colour and a highlight colour and there is nothing we can do about this (with paintmods).
In my paintmod mods I decided to use the overlay pattern as a 'texture' in itself, making the pattern the colour I wanted intstead of greyscale and and putting them at strength=1 completely occluding the underlying hull diffuse textures, because I could get much better results like that. I usually set the paintmods saturation values to 0 so that the pattern I make appears at the colour I painted it and so the underlying hull appears grey (the 2 colour thing is very hard to control, and we modders have to do all this manually in the xmls, the devs probably make paintmods visually in 3dsmax).

That was a bit longwinded, Ive spent hundreds of hours making paintjobs and still dont quite understand how it works tbh. Hope it helps though.

Edit: Hue in the xml applies to the overall hue of the hull (you will get 2 colours not just the one you pick because of the 2 colour setup of ships), the RBG values later in the xml is explicitly a colour overaly for the pattern texture.
Also, JBC doesnt use a pattern im pretty sure, just adjustments to make the paintmod dark, reflective and add a hue value. If you want to make a grey shiny material like x3 argon, maybe take jbc as a base, set its saturation to 0 and increase its brightness a bit.

heifi
Posts: 82
Joined: Fri, 10. Feb 06, 12:45
x3ap

Re: Questions regarding paint jobs

Post by heifi » Tue, 9. Feb 21, 22:43

Wow, thanks a lot, that did really help!

I did test around for a while and have a result I really like. If anybody is interested in it too:

Code: Select all

<paint ware="paintmod_0099" quality="1" hue="256.2" brightness="5" saturation="-1" metal="1" smooth="0.6"/>
It's a nice blue metalic color in Argon Prime. In other sectors it does of course reflect the sector color, but its still a smooth and plain texture. Love it, especially on your cylcops. Thanks again!

Post Reply

Return to “X4: Foundations - Scripts and Modding”