MUA Material Editor

Started by nikita488, July 23, 2018, 11:11AM

Previous topic - Next topic
July 23, 2018, 11:11AM Last Edit: September 11, 2023, 09:52AM by nikita488
How to install:
1. Install Alchemy ArtistPack. You can find it here: http://marvelmods.com/forum/index.php/topic,8626.0.html
2. Install Visual C++ Redistributable x32(x86) You can find it here: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
3. Download MUA Material Editor: Download
4. Unpack and run MUAMaterialEditor.exe.
VirusTotal Scan

How to use:
1. Run MUAMaterialEditor.exe as Administrator.
2. Click Browse button and select IGB File that you want to edit.
3. Click Load button and select Diffuse Texture from drop-down list that your geometry use.
4. Select Texture Map Type in drop-down list that you want to add to your geometry and click Browse button to select texture file.
5. Modify parameters. (MODIFY THEM ONLY IF YOU KNOW WHAY YOU'RE DOING! I set optimal parameters by default that you will need in 99% of time)
6. Click Apply button.
7. Repeat 3-6 steps to add another Texture Map to your geometry.
8. Click Save button and select location to save to.
Done!


Behind the Scenes:
MUA uses own shader to apply different texture maps on models using different UnitIDs and disable some of them when you turn off Advanced Lighting. That's why default Alchemy Shaders that IGB Exporter support don't work.
So the idea was to iterate through scene graph, find needed geometry by checking the diffuse texture name, add new igTextureBindAttr and igTextureStateAttr to attributes list of the geometry and set needed UnitID for both.

UnitIDs that MUA use with some notes:
0 - diffuse (DXT1)
1 - normal (DXT5nm). Normal Map texture has Alpha channel and Red and Blue channels are black. Texture is saved in DXT5 format. Read below on how to convert Normal Map texture to DXT5nm format. Also program will generate tangents and binormals for geometry that use Normal texture. This is necessary for the Normal Map to work.
2 - specular (DXT1). Works even when Advanced Lighting is disabled.
3 - reflection.
4 - reflection mask (DXT1). This is used to define where reflection should be applied.
5 - emissive (DXT1). This is used to define emmisive parts of texture. Also when "Fullscreen effects" is enabled, this texture will define what parts of texture should shine.
6 - unknown
7 - unknown (but this actually apply interesting effect to model)
8 - unknown
I extracted textures that Iron Man use, so this will help to understand how your textures should looks like: Download

Environment Map:
If you don't need custom cubemap textures, just use MUA ones: Download
P.S. After some research i find out that geometry that has reflection use igShaderParametersAttr, that contains igShaderConstantBool("material.transparent") and igShaderConstantVector("material.reflectance"). It's looks like this is kind of expansion to igMaterialAttr and MUA shaders use this values. The problem is that this don't exist in Alchemy 2.5 and even 3.5, looks like this was added in 4.0. I will think of something in the future.

How to convert Normal Map texture to DXT5nm format that MUA use:
To do this you need program that can modify channels. Open your Normal Map texture and modify channels like this:
1. Copy Red channel to Alpha channel.
2. Fill Red and Blue channels with black color.
3. Save your DDS in DXT5 format (NOT DXT5_NM).

Wow! This is incredible! I don't think we've had any new software developed for this game in a long time. Way to go!

This looks very nice indeed.
Thank you.
I just wish No Mans Sky's big update wasn't today, but the second I grow even slightly bored with that, I will be exploring this in full.
Again, Thank You.

Let me know if you will have any problems. This is my first app so i don't know if i do everything right :P

July 24, 2018, 04:28AM #4 Last Edit: July 24, 2018, 05:46AM by LarsAlexandersson
XD We got a new programmer this year other than Kristan!! You are the first before Kris arrived, nikita. Nice!

EDIT: Wait the minute. Will this work on XML2 & MUA1RE too?
Call me Lars. I'm Power Cosmic no more.

"Trying to solve mysteries of modding here"

My Progress:
http://marvelmods.com/forum/index.php/topic,4671.0.html

Feel free to mod my releases, as long you credit me:
http://marvelmods.com/forum/index.php/topic,4488.0.html

Nope, it using Alchemy 2.5 to load models. So it works only on models that you exported with 3ds max plugin. Also i don't think XML2 use any normal maps and etc.

It seems to work!
This is bloody amazing.
I need to do some testing to get the best results, but so far it's great to even be able to think about gloss, bump and specular after all these years.
I cannot say "thank you" enough times.

Hehe :) Right now i'm researching Environment Map, i hope we will be able to have reflections too.

Oh, I'm going to have to re-make pretty much everything I've ever done for this game... but it'll take some getting use to.
I seem to have picked up some bloom on my models I've tried so far, which may need me to rethink my export settings a bit.
This. Is. Huge/Awesome/Amaaaazing(delete as applicable).
I think I may be hyperventilating...

July 24, 2018, 08:12AM #9 Last Edit: July 24, 2018, 11:17AM by nikita488
Bloom? That's maybe bacause you use Normal Map texture in such format:

You need to convert it to this format:


Yes, converting to the green mode has helped. More Thanks.

Looks like PSP/unused Wii characters getting spec & bumb maps are now possible. Thx again.
Call me Lars. I'm Power Cosmic no more.

"Trying to solve mysteries of modding here"

My Progress:
http://marvelmods.com/forum/index.php/topic,4671.0.html

Feel free to mod my releases, as long you credit me:
http://marvelmods.com/forum/index.php/topic,4488.0.html


July 24, 2018, 10:03AM #13 Last Edit: July 24, 2018, 10:05AM by MelloMods
THANK YOU!!!

Some of my Mannequins were missing something....this will fix that.

^^view MelloMods' Mods^^

This is incredible. Can I apply a local reflection effect? For example, only the left arm of the winter soldier, the metal arm.