how to use multimat material?

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

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

aurumgallente
Posts: 124
Joined: Sun, 14. Jun 20, 14:45
x4

how to use multimat material?

Post by aurumgallente »

Many X4 models have multimat material and it is a big mystery for all modmakers how to use it.
Any information how to work with this tool?
linolafett
EGOSOFT
EGOSOFT
Posts: 3558
Joined: Mon, 26. Mar 12, 14:57
x4

Re: how to use multimat material?

Post by linolafett »

The multimaterial is a feature, which enables us to package a large amount of tileable textures into a single material, thus saving drawcalls.
It uses vertex colour (vertex illum channel in Max) to get the needed data on which texture in the array should be used and how it should be modified (metalness/smoothness/dirt).

Dump from our internal docu:

This shader enables artists to create a broad range of surfaces in a single material.

The shader uses the Vertex illum channel to control its properties.
Vertex illum red channel = smoothness
Vertex illum green channel = metalness
Vertex illum blue channel = Texture ID for the texture array

Vertex Alpha for the dirt layer.
01001100 01101001 01101110 01100101 01110011 00100000 01101111 01100110 00100000 01110100 01101001 01101101 01100101 01110011 00101110 00101110 00101110

My art stuff
BrummBear02
Posts: 310
Joined: Fri, 3. Oct 08, 20:43
x3ap

Re: how to use multimat material?

Post by BrummBear02 »

its not a mystery. its just a pain to use without a proper tool for it.
you need to extract the material with gimp or some other image program thats able to open it so you can see what each layer looks like.
and then the blue channel has an offset of one. blue 0 is layer 1 if im not mistaken. could be the other way around.
if you dont intend to use a wide range of the multimat material in one ship its simplet to extract the layer you want and create a seperate material for it.
or avoid it completely.
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht
aurumgallente
Posts: 124
Joined: Sun, 14. Jun 20, 14:45
x4

Re: how to use multimat material?

Post by aurumgallente »

I was thinking to make a mod for S solar poweplant. If you to open .dae file of solar powerplant, you will see it uses extensively multimal material.

Return to “X4: Foundations - Scripts and Modding”