Jump to content

Electrocutor's Thread


Electrocutor

Recommended Posts

10 minutes ago, Electrocutor said:

Do you remember where you got all the models from originally that they may have updated versions? The optimal solution is a computer model/texture setup with diffuse+specular and normal textures with meshes separating things that need to be different, such as glass.

 

Some of them I do, others I don't. Some of them I have the original models,  other I know the original artist, and for others not at all or they went awol.  You have to be very specific. because I'm not an artist myself, I have to be creative when it comes to model and art and accept any help I can get.

Edited by FreeThinker
Link to comment
Share on other sites

3 minutes ago, FreeThinker said:

Some of them I do, others I don't. Some of them I have the original models,  other I know the original artist, and for others not at all or they went awol.  You have to be very specific

Okay. I'll work on a first pass then get back to you if there are specific things that really need addressed to look right. I do remember that the enormous dishes looked pretty sweet when metallic.

Link to comment
Share on other sites

On 12/4/2018 at 2:42 PM, Manwith Noname said:

As far as MK2 and 3 Expansion goes, you might want to save your fingers as I have previously covered them as part of the stock recolour pack...

  Reveal hidden contents

A6F38F6C628809EF8C11DB6DE479D15AD62AD511

DE6BAE371F9287A430E4F374F12FC043E5AEEB6D

I've partially updated it just not checked it out and it doesn't use part variants still but thought it might be worth mentioning.

Where can I get that?

Link to comment
Share on other sites

20 hours ago, bcink said:

What are the current choices for stock TU configs? Cannot find any other than your Porkjet Stock Config, which I can't get to work on 1.4.

I just re-added the link to the old Stock TU cfg for now. I'm working on something more involved, but it'll be awhile. Consequently, @Manwith Noname should eventually release his own stock TU mod, but I've no idea how far along he is.

Link to comment
Share on other sites

On 4/13/2018 at 8:38 PM, Abpilot said:

plz do do this it would make BDB the best mod eva

The problem is that with mods not built to use TU from the ground up, it works very well for some parts (like the BDB Apollo capsule) but for others it just makes them look sort of...shrink-wrapped.

So to properly integrate it you'd have to completely retexture everything which would be a colossal undertaking.

Link to comment
Share on other sites

2 hours ago, Kablob said:

The problem is that with mods not built to use TU from the ground up, it works very well for some parts (like the BDB Apollo capsule) but for others it just makes them look sort of...shrink-wrapped.

So to properly integrate it you'd have to completely retexture everything which would be a colossal undertaking.

This is a misconception. If the original texture does not contain a specular, then making it look right does become more difficult as it requires a cfg specific to that part instead of just a mass generic cfg, but does not require any redoing of textures, especially if the model has been broken into some sub meshes. Setting proper specular within the main texture does indeed make it look better, but is not required.

After the new version of TU and MM are released that address a number of bugs, I will make a few examples for CobaltWolf and see if he wishes to include a TU patch.

Edited by Electrocutor
Link to comment
Share on other sites

2 hours ago, Electrocutor said:

This is a misconception. If the original texture does not contain a specular, then making it look right does become more difficult as it requires a cfg specific to that part instead of just a mass generic cfg, but does not require any redoing of textures, especially if the model has been broken into some sub meshes. Setting proper specular within the main texture does indeed make it look better, but is not required.

After the new version of TU and MM are released that address a number of bugs, I will make a few examples for CobaltWolf and see if he wishes to include a TU patch.

The issue is that a proper PBR workflow requires two separate specular components, while the blinnphongs that are currently used in KSP only have a texture map for one. More info here.

Now, with that in mind, I have a love/hate relationship with TU, which more has to do with my own personal frustrations with my art. One the one hand, if I were to see my parts PBR'd, I'd want them to be perfect! :) But, I do not have time to create the new/improved maps to extract the most benefit from TU. Which leaves poor @Electrocutor struggling with the maps currently in the textures - and, as he noted before, the quality of the BDB parts varies widely, because it represents 2 1/2 years of shifting art styles and improving skills. As I said, this is more to do with me being an artist that looks on their projects and only sees the problems that I wish I had time to solve - if users desire to have TU configs for BDB, I absolutely want them to have access.

@Electrocutor I thought you had made at least a boilerplate config set for BDB? I know that @HooHungLow has also been experimenting with TU configs. If you feel that it is best to have them be kept with BDB, then I am certainly interested in hosting them on my Github as I do with many other compatibility patches. That has the added benefit of other contributors being able to build on the work without your input. :) Does TU accept proper PBR maps? I know that some parts - thinking in particular of the Apollo since that is the 'flagship' of the mod, and also would benefit most substantially from TU due to its material - could stand to have true PBR maps made for them. Again, particularly the Apollo because it has reflective metal and windows in a single mesh, so controlling the different materials needs to be done through texture (the hatch window is only textured so I can't just separate the mesh)

Link to comment
Share on other sites

3 hours ago, CobaltWolf said:

The issue is that a proper PBR workflow requires two separate specular components, while the blinnphongs that are currently used in KSP only have a texture map for one. More info here.

Now, with that in mind, I have a love/hate relationship with TU, which more has to do with my own personal frustrations with my art. One the one hand, if I were to see my parts PBR'd, I'd want them to be perfect! :) But, I do not have time to create the new/improved maps to extract the most benefit from TU. Which leaves poor @Electrocutor struggling with the maps currently in the textures - and, as he noted before, the quality of the BDB parts varies widely, because it represents 2 1/2 years of shifting art styles and improving skills. As I said, this is more to do with me being an artist that looks on their projects and only sees the problems that I wish I had time to solve - if users desire to have TU configs for BDB, I absolutely want them to have access.

@Electrocutor I thought you had made at least a boilerplate config set for BDB? I know that @HooHungLow has also been experimenting with TU configs. If you feel that it is best to have them be kept with BDB, then I am certainly interested in hosting them on my Github as I do with many other compatibility patches. That has the added benefit of other contributors being able to build on the work without your input. :) Does TU accept proper PBR maps? I know that some parts - thinking in particular of the Apollo since that is the 'flagship' of the mod, and also would benefit most substantially from TU due to its material - could stand to have true PBR maps made for them. Again, particularly the Apollo because it has reflective metal and windows in a single mesh, so controlling the different materials needs to be done through texture (the hatch window is only textured so I can't just separate the mesh)

There are different shaders that TU has. One shader allows diffuse, normal, metallic/gloss, occlusion, and emissive. That said, the cfg options allow for static values across an entire mesh, so if there is a particular mesh that just has a bunch of metal parts, it's easier to just them to static values. There is also a stock shader that uses the alpha channel of the diffuse as specular which can then be used with a static metallic value. In addition, there is a Masked PBR shader that allows you to use a uvmap to specify pbr areas (3 per map), then colors and normals can be assigned to those sections individually. Honestly, just talking is hard to show, so once I'm able I'll make some examples.

I had once made a generic cfg, yes; but during the 1.4 update, TU gained a bug dealing with the stock MODEL{ texture= } replacement, so it won't work right until the next version is released. Also, I now incorporate the stock variants alongside TU to keep the GUI clean. I usually do a Dark, Orange, and Green variant that are non-metallic and preserve everything as originally made by the artist except to tint meshes with the 3 new  KSP color schemes so people have an option to make colors match. I then have a Metallic and a Shiny Metallic variant that use TU metallic. In this way, the default look is exactly as it was originally made, but people can choose between KSP colors and metallic variants.

Link to comment
Share on other sites

I'm trying to make a quick and dirty cfg for some of @RoverDude MKS parts (mostly, the containers and the Tundra and Duna modules) so I can use the recoloring gui on them. The metallic shaders are a welcome bonus. The premise is to use the recoloring gui to identify base sections by function (let's say, agriculture modules in green, manufacturing in orange, hab modules in blue) which I think would be practical and provide a more varied look.

However, I don't really know what I'm doing, so I'm just copying and pasting parts of @Electrocutor configs. So far, I've copied this code from the Parts Overhauls config
 

Spoiler

 

@REFLECTION_CONFIG[default]
{
    %enabled = true
}

KSP_COLOR_PRESET
{
    name = rgb_gray
    title = RGB Gray
    color = 127,127,127
    specular = 0
    metallic = 0
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_Mk1Pod_Custom
    title = Custom
    recolorable = true

    MATERIAL
    {
        shader = SSTU/PBR/Masked

        texture = _MaskTex,PartOverhauls/Parts/Command/Size1Pod/Size1Pod

        PROPERTY
        {
            name = _Color
            color = 1.0,1.0,1.0
        }
        PROPERTY
        {
            name = TINTING_MODE
            keyword = TINTING_MODE
        }
        PROPERTY
        {
            name = _Metal
            float = 0.0
        }
        PROPERTY
        {
            name = _Smoothness
            float = 0.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_FuelTank_Custom
    title = Custom
    recolorable = true

    MATERIAL
    {
        shader = SSTU/PBR/Masked

        texture = _MaskTex,PartOverhauls/Parts/FuelTank/Size1/Size1Tanks

        PROPERTY
        {
            name = _Color
            color = 1.0,1.0,1.0
        }
        PROPERTY
        {
            name = TINTING_MODE
            keyword = TINTING_MODE
        }
        PROPERTY
        {
            name = _Metal
            float = 0.0
        }
        PROPERTY
        {
            name = _Smoothness
            float = 0.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_Engine_Default
    title = Default
    recolorable = false

    MATERIAL
    {
        shader = SSTU/PBR/StockMetallicBumped

        excludeMesh = fairing
        excludeMesh = Frame

        PROPERTY
        {
            name = _Color
            color = 1.0,1.0,1.0
        }
        PROPERTY
        {
            name = _Metal
            float = 0.0
        }
        PROPERTY
        {
            name = _Smoothness
            float = 1.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_Engine_DefaultMetal
    title = Default Metal
    recolorable = false

    MATERIAL
    {
        shader = SSTU/PBR/StockMetallicBumped

        excludeMesh = fairing
        excludeMesh = Frame

        PROPERTY
        {
            name = _Color
            color = 1.75,1.75,1.75
        }
        PROPERTY
        {
            name = _Metal
            float = 0.75
        }
        PROPERTY
        {
            name = _Smoothness
            float = 1.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_Engine_Metal
    title = Metal
    recolorable = false

    MATERIAL
    {
        shader = SSTU/PBR/Metallic

        excludeMesh = fairing
        excludeMesh = Frame

        //texture = _MetallicGlossMap,PartOverhauls/Parts/Engine/JebsJunkyard/JebsJunkyard

        PROPERTY
        {
            name = _Color
            color = 1.75,1.75,1.75
        }
        PROPERTY
        {
            name = _Metal
            float = 0.75
        }
        PROPERTY
        {
            name = _Smoothness
            float = 0.75
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_Engine_Custom
    title = Custom
    recolorable = true

    MATERIAL
    {
        shader = SSTU/PBR/Masked

        excludeMesh = Frame
        excludeMesh = fairing

        texture = _MaskTex,PartOverhauls/Parts/Engine/JebsJunkyard/JebsJunkyard

        PROPERTY
        {
            name = _Color
            color = 1.0,1.0,1.0
        }
        PROPERTY
        {
            name = TINTING_MODE
            keyword = TINTING_MODE
        }
        PROPERTY
        {
            name = _Metal
            float = 0.0
        }
        PROPERTY
        {
            name = _Smoothness
            float = 0.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_EngineFrame_Default
    title = Default
    recolorable = false

    MATERIAL
    {
        shader = SSTU/PBR/StockMetallicBumped

        mesh = Frame

        PROPERTY
        {
            name = _Color
            color = 1.0,1.0,1.0
        }
        PROPERTY
        {
            name = _Metal
            float = 0.0
        }
        PROPERTY
        {
            name = _Smoothness
            float = 1.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_EngineFrame_DefaultMetal
    title = Default Metal
    recolorable = false

    MATERIAL
    {
        shader = SSTU/PBR/StockMetallicBumped

        mesh = Frame

        PROPERTY
        {
            name = _Color
            color = 1.75,1.75,1.75
        }
        PROPERTY
        {
            name = _Metal
            float = 0.75
        }
        PROPERTY
        {
            name = _Smoothness
            float = 1.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_EngineFrame_Metal
    title = Metal
    recolorable = false

    MATERIAL
    {
        shader = SSTU/PBR/Metallic

        mesh = Frame

        //texture = _MetallicGlossMap,PartOverhauls/Parts/Engine/JebsJunkyard/JebsJunkyard

        PROPERTY
        {
            name = _Color
            color = 1.75,1.75,1.75
        }
        PROPERTY
        {
            name = _Metal
            float = 0.75
        }
        PROPERTY
        {
            name = _Smoothness
            float = 0.75
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_EngineFrame_Custom
    title = Custom
    recolorable = true

    MATERIAL
    {
        shader = SSTU/PBR/Masked

        mesh = Frame

        texture = _MaskTex,PartOverhauls/Parts/Engine/JebsJunkyard/JebsJunkyard

        PROPERTY
        {
            name = _Color
            color = 1.0,1.0,1.0
        }
        PROPERTY
        {
            name = TINTING_MODE
            keyword = TINTING_MODE
        }
        PROPERTY
        {
            name = _Metal
            float = 0.0
        }
        PROPERTY
        {
            name = _Smoothness
            float = 0.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_EngineFairing_Default
    title = Default
    recolorable = false

    MATERIAL
    {
        shader = SSTU/PBR/StockMetallicBumped

        mesh = fairing

        PROPERTY
        {
            name = _Color
            color = 1.0,1.0,1.0
        }
        PROPERTY
        {
            name = _Metal
            float = 0.0
        }
        PROPERTY
        {
            name = _Smoothness
            float = 0.5
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_EngineFairing_DefaultMetal
    title = Default Metal
    recolorable = false

    MATERIAL
    {
        shader = SSTU/PBR/StockMetallicBumped

        mesh = fairing

        PROPERTY
        {
            name = _Color
            color = 1.75,1.75,1.75
        }
        PROPERTY
        {
            name = _Metal
            float = 0.75
        }
        PROPERTY
        {
            name = _Smoothness
            float = 1.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_EngineFairing_Metal
    title = Metal
    recolorable = false

    MATERIAL
    {
        shader = SSTU/PBR/Metallic

        mesh = fairing

        //texture = _MetallicGlossMap,PartOverhauls/Parts/Engine/JebsJunkyard/JebsJunkyard

        PROPERTY
        {
            name = _Color
            color = 1.75,1.75,1.75
        }
        PROPERTY
        {
            name = _Metal
            float = 0.75
        }
        PROPERTY
        {
            name = _Smoothness
            float = 0.75
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_EngineFairing_Custom
    title = Custom
    recolorable = true

    MATERIAL
    {
        shader = SSTU/PBR/Masked

        mesh = fairing

        texture = _MaskTex,PartOverhauls/Parts/Engine/JebsJunkyard/fairing

        PROPERTY
        {
            name = _Color
            color = 1.0,1.0,1.0
        }
        PROPERTY
        {
            name = TINTING_MODE
            keyword = TINTING_MODE
        }
        PROPERTY
        {
            name = _Metal
            float = 0.0
        }
        PROPERTY
        {
            name = _Smoothness
            float = 0.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

@PART[mk1podNew]
{
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Body
        currentTextureSet = PartOverhauls_Engine_DefaultMetal

        textureSet = PartOverhauls_Engine_Default
        textureSet = PartOverhauls_Engine_DefaultMetal
        textureSet = PartOverhauls_Engine_Metal
        textureSet = PartOverhauls_Mk1Pod_Custom
    }
    MODULE
    {
        name = SSTURecolorGUI
    }
}

@PART[liquidEngine303]
{
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Engine
        currentTextureSet = PartOverhauls_Engine_Metal

        textureSet = PartOverhauls_Engine_Default
        textureSet = PartOverhauls_Engine_DefaultMetal
        textureSet = PartOverhauls_Engine_Metal
        textureSet = PartOverhauls_Engine_Custom
    }
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Frame
        currentTextureSet = PartOverhauls_EngineFrame_Metal

        textureSet = PartOverhauls_EngineFrame_Default
        textureSet = PartOverhauls_EngineFrame_DefaultMetal
        textureSet = PartOverhauls_EngineFrame_Metal
        textureSet = PartOverhauls_EngineFrame_Custom
    }
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Fairing
        currentTextureSet = PartOverhauls_EngineFairing_Default

        textureSet = PartOverhauls_EngineFairing_Default
        textureSet = PartOverhauls_EngineFairing_DefaultMetal
        textureSet = PartOverhauls_EngineFairing_Metal
        textureSet = PartOverhauls_EngineFairing_Custom
    }
    MODULE
    {
        name = SSTURecolorGUI
    }
}

@PART[liquidEngine303_Boattail]
{
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Engine
        currentTextureSet = PartOverhauls_Engine_Metal

        textureSet = PartOverhauls_Engine_Default
        textureSet = PartOverhauls_Engine_DefaultMetal
        textureSet = PartOverhauls_Engine_Metal
        textureSet = PartOverhauls_Engine_Custom
    }
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Frame
        currentTextureSet = PartOverhauls_EngineFrame_DefaultMetal

        textureSet = PartOverhauls_EngineFrame_Default
        textureSet = PartOverhauls_EngineFrame_DefaultMetal
        textureSet = PartOverhauls_EngineFrame_Metal
        textureSet = PartOverhauls_EngineFrame_Custom
    }
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Fairing
        currentTextureSet = PartOverhauls_EngineFairing_Default

        textureSet = PartOverhauls_EngineFairing_Default
        textureSet = PartOverhauls_EngineFairing_DefaultMetal
        textureSet = PartOverhauls_EngineFairing_Metal
        textureSet = PartOverhauls_EngineFairing_Custom
    }
    MODULE
    {
        name = SSTURecolorGUI
    }
}

@PART[liquidEngine909,liquidEngineT15,liquidEngineT30,liquidEngineT45,liquidEngine909_Boattail,liquidEngineT15_Boattail,liquidEngineT30_Boattail,liquidEngineT45_Boat]
{
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Engine
        currentTextureSet = PartOverhauls_Engine_DefaultMetal

        textureSet = PartOverhauls_Engine_Default
        textureSet = PartOverhauls_Engine_DefaultMetal
        textureSet = PartOverhauls_Engine_Metal
        textureSet = PartOverhauls_Engine_Custom
    }
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Frame
        currentTextureSet = PartOverhauls_EngineFrame_DefaultMetal

        textureSet = PartOverhauls_EngineFrame_Default
        textureSet = PartOverhauls_EngineFrame_DefaultMetal
        textureSet = PartOverhauls_EngineFrame_Metal
        textureSet = PartOverhauls_EngineFrame_Custom
    }
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Fairing
        currentTextureSet = PartOverhauls_EngineFairing_Default

        textureSet = PartOverhauls_EngineFairing_Default
        textureSet = PartOverhauls_EngineFairing_DefaultMetal
        textureSet = PartOverhauls_EngineFairing_Metal
        textureSet = PartOverhauls_EngineFairing_Custom
    }
    MODULE
    {
        name = SSTURecolorGUI
    }
}

 

And copied and threw this next
 

Spoiler

 

@PART[Duna_Agriculture,Duna_Kerbitat,Duna_Kolonist,Duna_LogCenter,Duna_MedBay,Duna_PDU,Duna_Pioneer,MKS_FlexOTube,MKS_Processor125,MKS_Processor250,MKS_Processor375,MKS_SkyCrane,ScoutLanderMk2,Tundra_250Cap,Tundra_275_Hab,Tundra_375Cap,Tundra_425_Hab,Tundra_Agriculture250,Tundra_Agriculture375,Tundra_Airlock,Tundra_Akademy,Tundra_ASM,Tundra_AssemblyPlant,Tundra_HabRing,Tundra_Hub250,Tundra_Hub250_Short,Tundra_Kerbitat250,Tundra_Kerbitat375,Tundra_Kolonist250,Tundra_Kolonist375,Tundra_MedBay250,Tundra_MedBay375,Tundra_MiniAirlock,Tundra_MiniTruss,Tundra_MultiHub,Tundra_MultiTruss,Tundra_NukeProc,Tundra_PDU,Tundra_PioneerLC,Tundra_RecyclingPlant,Tundra_Refinery,Tundra_RegSifter,Tundra_Workshop250,C3_DepletedFuelTank,C3_NukeFuelTank,C3_NukeFuelTank_Lg,C3_RTank_00,C3_RTank_01,C3_RTank_02,C3_RTank_03,C3_RTank_04,C3_RTank_06,C3_RTank_08,C3_Tank_0*,C3_DepletedFuelTank_Lg,C3_FlatRnd_*,C3_FlatTank_*,C3_Kontainer_01,C3_Kontainer_0*,C3_Kontainer_KIS_*]
{
    MODULE
    {
        name = KSPTextureSwitch
        //sectionName = Body
        currentTextureSet = PartOverhauls_Engine_DefaultMetal

        textureSet = PartOverhauls_Engine_Default
        textureSet = PartOverhauls_Engine_DefaultMetal
        textureSet = PartOverhauls_Engine_Metal
        textureSet = PartOverhauls_FuelTank_Custom
    }
    MODULE
    {
        name = SSTURecolorGUI
    }
}

 

I think it wasn't working until I commented out the "sectionName" string. But I'm getting artifacts with the recoloring gui

JtGIhvx.png

I though the stripes in the orange tinted tank were related to one of the meshes inside the model, but it seems it wasn't - I've added this code to exclude them (I think). The decals, after excluding the mesh, flicker

Spoiler

        excludeMesh = COL
        excludeMesh = COLL
        excludeMesh = COL.001
        excludeMesh = Decals
        excludeMesh = Core_001
        excludeMesh = Core_002
        excludeMesh = Core_003

Since I don't really know what I'm doing, did I copy and paste far more code than required? What could be causing the flicker after excluding the Decals mesh and can that be resolved? And what's causing those stripes and can they be removed? And can PBR shaders and the recoloring gui be combined? Should have I asked in Textures Unlimited thread instead?

Also, here's a video of a different setup. It also uses KS3P. It's amazing

giphy.gif

Edited by juanml82
Link to comment
Share on other sites

Hi @Electrocutor! just want to do a simple question, i have a fresh install of KSP 1.4.2 with expansion, what do i have to install to make PBR shaders from Shadowmage work with your configs? i've downloaded and installed lastest versions of TU PBR and your configs but the recolorng GUI doesn't show up. What i'm doing wrong? i just have a fresh install and TU, SSTU-PBR, MM and your config.

Edited by Nitojmg
Link to comment
Share on other sites

15 hours ago, juanml82 said:

I'm trying to make a quick and dirty cfg for some of @RoverDude MKS parts (mostly, the containers and the Tundra and Duna modules) so I can use the recoloring gui on them. The metallic shaders are a welcome bonus. The premise is to use the recoloring gui to identify base sections by function (let's say, agriculture modules in green, manufacturing in orange, hab modules in blue) which I think would be practical and provide a more varied look.

However, I don't really know what I'm doing, so I'm just copying and pasting parts of @Electrocutor configs. So far, I've copied this code from the Parts Overhauls config
 

  Reveal hidden contents

 

@REFLECTION_CONFIG[default]
{
    %enabled = true
}

KSP_COLOR_PRESET
{
    name = rgb_gray
    title = RGB Gray
    color = 127,127,127
    specular = 0
    metallic = 0
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_Mk1Pod_Custom
    title = Custom
    recolorable = true

    MATERIAL
    {
        shader = SSTU/PBR/Masked

        texture = _MaskTex,PartOverhauls/Parts/Command/Size1Pod/Size1Pod

        PROPERTY
        {
            name = _Color
            color = 1.0,1.0,1.0
        }
        PROPERTY
        {
            name = TINTING_MODE
            keyword = TINTING_MODE
        }
        PROPERTY
        {
            name = _Metal
            float = 0.0
        }
        PROPERTY
        {
            name = _Smoothness
            float = 0.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_FuelTank_Custom
    title = Custom
    recolorable = true

    MATERIAL
    {
        shader = SSTU/PBR/Masked

        texture = _MaskTex,PartOverhauls/Parts/FuelTank/Size1/Size1Tanks

        PROPERTY
        {
            name = _Color
            color = 1.0,1.0,1.0
        }
        PROPERTY
        {
            name = TINTING_MODE
            keyword = TINTING_MODE
        }
        PROPERTY
        {
            name = _Metal
            float = 0.0
        }
        PROPERTY
        {
            name = _Smoothness
            float = 0.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_Engine_Default
    title = Default
    recolorable = false

    MATERIAL
    {
        shader = SSTU/PBR/StockMetallicBumped

        excludeMesh = fairing
        excludeMesh = Frame

        PROPERTY
        {
            name = _Color
            color = 1.0,1.0,1.0
        }
        PROPERTY
        {
            name = _Metal
            float = 0.0
        }
        PROPERTY
        {
            name = _Smoothness
            float = 1.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_Engine_DefaultMetal
    title = Default Metal
    recolorable = false

    MATERIAL
    {
        shader = SSTU/PBR/StockMetallicBumped

        excludeMesh = fairing
        excludeMesh = Frame

        PROPERTY
        {
            name = _Color
            color = 1.75,1.75,1.75
        }
        PROPERTY
        {
            name = _Metal
            float = 0.75
        }
        PROPERTY
        {
            name = _Smoothness
            float = 1.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_Engine_Metal
    title = Metal
    recolorable = false

    MATERIAL
    {
        shader = SSTU/PBR/Metallic

        excludeMesh = fairing
        excludeMesh = Frame

        //texture = _MetallicGlossMap,PartOverhauls/Parts/Engine/JebsJunkyard/JebsJunkyard

        PROPERTY
        {
            name = _Color
            color = 1.75,1.75,1.75
        }
        PROPERTY
        {
            name = _Metal
            float = 0.75
        }
        PROPERTY
        {
            name = _Smoothness
            float = 0.75
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_Engine_Custom
    title = Custom
    recolorable = true

    MATERIAL
    {
        shader = SSTU/PBR/Masked

        excludeMesh = Frame
        excludeMesh = fairing

        texture = _MaskTex,PartOverhauls/Parts/Engine/JebsJunkyard/JebsJunkyard

        PROPERTY
        {
            name = _Color
            color = 1.0,1.0,1.0
        }
        PROPERTY
        {
            name = TINTING_MODE
            keyword = TINTING_MODE
        }
        PROPERTY
        {
            name = _Metal
            float = 0.0
        }
        PROPERTY
        {
            name = _Smoothness
            float = 0.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_EngineFrame_Default
    title = Default
    recolorable = false

    MATERIAL
    {
        shader = SSTU/PBR/StockMetallicBumped

        mesh = Frame

        PROPERTY
        {
            name = _Color
            color = 1.0,1.0,1.0
        }
        PROPERTY
        {
            name = _Metal
            float = 0.0
        }
        PROPERTY
        {
            name = _Smoothness
            float = 1.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_EngineFrame_DefaultMetal
    title = Default Metal
    recolorable = false

    MATERIAL
    {
        shader = SSTU/PBR/StockMetallicBumped

        mesh = Frame

        PROPERTY
        {
            name = _Color
            color = 1.75,1.75,1.75
        }
        PROPERTY
        {
            name = _Metal
            float = 0.75
        }
        PROPERTY
        {
            name = _Smoothness
            float = 1.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_EngineFrame_Metal
    title = Metal
    recolorable = false

    MATERIAL
    {
        shader = SSTU/PBR/Metallic

        mesh = Frame

        //texture = _MetallicGlossMap,PartOverhauls/Parts/Engine/JebsJunkyard/JebsJunkyard

        PROPERTY
        {
            name = _Color
            color = 1.75,1.75,1.75
        }
        PROPERTY
        {
            name = _Metal
            float = 0.75
        }
        PROPERTY
        {
            name = _Smoothness
            float = 0.75
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_EngineFrame_Custom
    title = Custom
    recolorable = true

    MATERIAL
    {
        shader = SSTU/PBR/Masked

        mesh = Frame

        texture = _MaskTex,PartOverhauls/Parts/Engine/JebsJunkyard/JebsJunkyard

        PROPERTY
        {
            name = _Color
            color = 1.0,1.0,1.0
        }
        PROPERTY
        {
            name = TINTING_MODE
            keyword = TINTING_MODE
        }
        PROPERTY
        {
            name = _Metal
            float = 0.0
        }
        PROPERTY
        {
            name = _Smoothness
            float = 0.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_EngineFairing_Default
    title = Default
    recolorable = false

    MATERIAL
    {
        shader = SSTU/PBR/StockMetallicBumped

        mesh = fairing

        PROPERTY
        {
            name = _Color
            color = 1.0,1.0,1.0
        }
        PROPERTY
        {
            name = _Metal
            float = 0.0
        }
        PROPERTY
        {
            name = _Smoothness
            float = 0.5
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_EngineFairing_DefaultMetal
    title = Default Metal
    recolorable = false

    MATERIAL
    {
        shader = SSTU/PBR/StockMetallicBumped

        mesh = fairing

        PROPERTY
        {
            name = _Color
            color = 1.75,1.75,1.75
        }
        PROPERTY
        {
            name = _Metal
            float = 0.75
        }
        PROPERTY
        {
            name = _Smoothness
            float = 1.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_EngineFairing_Metal
    title = Metal
    recolorable = false

    MATERIAL
    {
        shader = SSTU/PBR/Metallic

        mesh = fairing

        //texture = _MetallicGlossMap,PartOverhauls/Parts/Engine/JebsJunkyard/JebsJunkyard

        PROPERTY
        {
            name = _Color
            color = 1.75,1.75,1.75
        }
        PROPERTY
        {
            name = _Metal
            float = 0.75
        }
        PROPERTY
        {
            name = _Smoothness
            float = 0.75
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

KSP_TEXTURE_SET
{
    name = PartOverhauls_EngineFairing_Custom
    title = Custom
    recolorable = true

    MATERIAL
    {
        shader = SSTU/PBR/Masked

        mesh = fairing

        texture = _MaskTex,PartOverhauls/Parts/Engine/JebsJunkyard/fairing

        PROPERTY
        {
            name = _Color
            color = 1.0,1.0,1.0
        }
        PROPERTY
        {
            name = TINTING_MODE
            keyword = TINTING_MODE
        }
        PROPERTY
        {
            name = _Metal
            float = 0.0
        }
        PROPERTY
        {
            name = _Smoothness
            float = 0.0
        }
    }
    COLORS
    {
        mainColor = rgb_gray
        secondColor = rgb_gray
        detailColor = rgb_gray
    }
}

@PART[mk1podNew]
{
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Body
        currentTextureSet = PartOverhauls_Engine_DefaultMetal

        textureSet = PartOverhauls_Engine_Default
        textureSet = PartOverhauls_Engine_DefaultMetal
        textureSet = PartOverhauls_Engine_Metal
        textureSet = PartOverhauls_Mk1Pod_Custom
    }
    MODULE
    {
        name = SSTURecolorGUI
    }
}

@PART[liquidEngine303]
{
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Engine
        currentTextureSet = PartOverhauls_Engine_Metal

        textureSet = PartOverhauls_Engine_Default
        textureSet = PartOverhauls_Engine_DefaultMetal
        textureSet = PartOverhauls_Engine_Metal
        textureSet = PartOverhauls_Engine_Custom
    }
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Frame
        currentTextureSet = PartOverhauls_EngineFrame_Metal

        textureSet = PartOverhauls_EngineFrame_Default
        textureSet = PartOverhauls_EngineFrame_DefaultMetal
        textureSet = PartOverhauls_EngineFrame_Metal
        textureSet = PartOverhauls_EngineFrame_Custom
    }
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Fairing
        currentTextureSet = PartOverhauls_EngineFairing_Default

        textureSet = PartOverhauls_EngineFairing_Default
        textureSet = PartOverhauls_EngineFairing_DefaultMetal
        textureSet = PartOverhauls_EngineFairing_Metal
        textureSet = PartOverhauls_EngineFairing_Custom
    }
    MODULE
    {
        name = SSTURecolorGUI
    }
}

@PART[liquidEngine303_Boattail]
{
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Engine
        currentTextureSet = PartOverhauls_Engine_Metal

        textureSet = PartOverhauls_Engine_Default
        textureSet = PartOverhauls_Engine_DefaultMetal
        textureSet = PartOverhauls_Engine_Metal
        textureSet = PartOverhauls_Engine_Custom
    }
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Frame
        currentTextureSet = PartOverhauls_EngineFrame_DefaultMetal

        textureSet = PartOverhauls_EngineFrame_Default
        textureSet = PartOverhauls_EngineFrame_DefaultMetal
        textureSet = PartOverhauls_EngineFrame_Metal
        textureSet = PartOverhauls_EngineFrame_Custom
    }
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Fairing
        currentTextureSet = PartOverhauls_EngineFairing_Default

        textureSet = PartOverhauls_EngineFairing_Default
        textureSet = PartOverhauls_EngineFairing_DefaultMetal
        textureSet = PartOverhauls_EngineFairing_Metal
        textureSet = PartOverhauls_EngineFairing_Custom
    }
    MODULE
    {
        name = SSTURecolorGUI
    }
}

@PART[liquidEngine909,liquidEngineT15,liquidEngineT30,liquidEngineT45,liquidEngine909_Boattail,liquidEngineT15_Boattail,liquidEngineT30_Boattail,liquidEngineT45_Boat]
{
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Engine
        currentTextureSet = PartOverhauls_Engine_DefaultMetal

        textureSet = PartOverhauls_Engine_Default
        textureSet = PartOverhauls_Engine_DefaultMetal
        textureSet = PartOverhauls_Engine_Metal
        textureSet = PartOverhauls_Engine_Custom
    }
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Frame
        currentTextureSet = PartOverhauls_EngineFrame_DefaultMetal

        textureSet = PartOverhauls_EngineFrame_Default
        textureSet = PartOverhauls_EngineFrame_DefaultMetal
        textureSet = PartOverhauls_EngineFrame_Metal
        textureSet = PartOverhauls_EngineFrame_Custom
    }
    MODULE
    {
        name = KSPTextureSwitch
        sectionName = Fairing
        currentTextureSet = PartOverhauls_EngineFairing_Default

        textureSet = PartOverhauls_EngineFairing_Default
        textureSet = PartOverhauls_EngineFairing_DefaultMetal
        textureSet = PartOverhauls_EngineFairing_Metal
        textureSet = PartOverhauls_EngineFairing_Custom
    }
    MODULE
    {
        name = SSTURecolorGUI
    }
}

 

And copied and threw this next
 

  Reveal hidden contents

 

@PART[Duna_Agriculture,Duna_Kerbitat,Duna_Kolonist,Duna_LogCenter,Duna_MedBay,Duna_PDU,Duna_Pioneer,MKS_FlexOTube,MKS_Processor125,MKS_Processor250,MKS_Processor375,MKS_SkyCrane,ScoutLanderMk2,Tundra_250Cap,Tundra_275_Hab,Tundra_375Cap,Tundra_425_Hab,Tundra_Agriculture250,Tundra_Agriculture375,Tundra_Airlock,Tundra_Akademy,Tundra_ASM,Tundra_AssemblyPlant,Tundra_HabRing,Tundra_Hub250,Tundra_Hub250_Short,Tundra_Kerbitat250,Tundra_Kerbitat375,Tundra_Kolonist250,Tundra_Kolonist375,Tundra_MedBay250,Tundra_MedBay375,Tundra_MiniAirlock,Tundra_MiniTruss,Tundra_MultiHub,Tundra_MultiTruss,Tundra_NukeProc,Tundra_PDU,Tundra_PioneerLC,Tundra_RecyclingPlant,Tundra_Refinery,Tundra_RegSifter,Tundra_Workshop250,C3_DepletedFuelTank,C3_NukeFuelTank,C3_NukeFuelTank_Lg,C3_RTank_00,C3_RTank_01,C3_RTank_02,C3_RTank_03,C3_RTank_04,C3_RTank_06,C3_RTank_08,C3_Tank_0*,C3_DepletedFuelTank_Lg,C3_FlatRnd_*,C3_FlatTank_*,C3_Kontainer_01,C3_Kontainer_0*,C3_Kontainer_KIS_*]
{
    MODULE
    {
        name = KSPTextureSwitch
        //sectionName = Body
        currentTextureSet = PartOverhauls_Engine_DefaultMetal

        textureSet = PartOverhauls_Engine_Default
        textureSet = PartOverhauls_Engine_DefaultMetal
        textureSet = PartOverhauls_Engine_Metal
        textureSet = PartOverhauls_FuelTank_Custom
    }
    MODULE
    {
        name = SSTURecolorGUI
    }
}

 

I think it wasn't working until I commented out the "sectionName" string. But I'm getting artifacts with the recoloring gui

 

I though the stripes in the orange tinted tank were related to one of the meshes inside the model, but it seems it wasn't - I've added this code to exclude them (I think). The decals, after excluding the mesh, flicker

  Reveal hidden contents

        excludeMesh = COL
        excludeMesh = COLL
        excludeMesh = COL.001
        excludeMesh = Decals
        excludeMesh = Core_001
        excludeMesh = Core_002
        excludeMesh = Core_003

Since I don't really know what I'm doing, did I copy and paste far more code than required? What could be causing the flicker after excluding the Decals mesh and can that be resolved? And what's causing those stripes and can they be removed? And can PBR shaders and the recoloring gui be combined? Should have I asked in Textures Unlimited thread instead?

Also, here's a video of a different setup. It also uses KS3P. It's amazing

 

RoverDude's stuff will take you some time to do it right because most of his models are a single mesh and most of his textures do not include specular. If you just want to make them metallic, then that is easy: just use the KSP_MODEL_SHADER syntax to set the shader, then use stock variants to give an option for Metallic. If you want to do some recoloring, then you'll want to create your own Mask and MetalGloss textures. You _could_ do a recolor across the whole part, but that will look a strange since everything would be recolored instead of just the painted white/gray parts.

Shadow says the flicker will be resolved in the next release of TU: it was a bug introduced in the 1.4 version having to do with transparencies.

Keep in mind that if you create mask and metal/gloss textures for MKS, you cannot release it because MKS textures are all rights reserved, so any derivative textures cannot be put into their own mod and it highly unlikely that RoverDude would include them with MKS as he is wholly against TU.

 

4 hours ago, Nitojmg said:

Hi @Electrocutor! just want to do a simple question, i have a fresh install of KSP 1.4.2 with expansion, what do i have to install to make PBR shaders from Shadowmage work with your configs? i've downloaded and installed lastest versions of TU PBR and your configs but the recolorng GUI doesn't show up. What i'm doing wrong? i just have a fresh install and TU, SSTU-PBR, MM and your config.

The original stock cfg on the OP does not support recoloring, it is just a generic cfg that enables specular, reflections, and metallicy. Also, be sure you followed the instructions on the TU page and run KSP via -force-glcore.

 

1 hour ago, DracoSilverpath said:

So the 2 stock configs on the first page...what exactly is the difference? Probly a silly question, but I just don't know! :)

 

The porkjet stock one only affects porkjet parts, but allows you to recolor them whereas the original stock one covers all parts (pre 1.4), but merely adds specular, reflections, and metallicy directly. I am working on a much better version but it requires the new TU and new MM be released. It's been mentioned that the porkjet stock cfg may have issues with the current game/TU version: I've not had time to confirm this yet.

Link to comment
Share on other sites

@juanml82 What RoverDude might be willing to put into MKS by pull request would be if you modified his existing textures to include a specular layer and also added normal maps. He may also be willing to include variant textures, such as color-coded Tundra and Duna. If that's the case, then it would be far easier to give them TU treatment on your own afterward.

Edited by Electrocutor
Link to comment
Share on other sites

1 hour ago, Electrocutor said:

RoverDude's stuff will take you some time to do it right because most of his models are a single mesh and most of his textures do not include specular. If you just want to make them metallic, then that is easy: just use the KSP_MODEL_SHADER syntax to set the shader, then use stock variants to give an option for Metallic. If you want to do some recoloring, then you'll want to create your own Mask and MetalGloss textures. You _could_ do a recolor across the whole part, but that will look a strange since everything would be recolored instead of just the painted white/gray parts.

Shadow says the flicker will be resolved in the next release of TU: it was a bug introduced in the 1.4 version having to do with transparencies.

The flicker is gone with the last update. As for recoloring the whole part, I wouldn't bother me much anyway, as I'd be happy with some quick and dirty colored metal shader. In any case, I guess that I need to use the original textures as a base for making mask and metalgloss textures in order to keep the uvw mapping, right? How do I go about adding them to the .cfg and what how should the metalgloss textures be?

The stripes in the retextured module seem to be related to the original copied and pasted texture ( PartOverhauls/Parts/FuelTank/Size1/Size1Tanks ) but I tried to replace it with different textures, incluing a small white square and I end up with just metal shaders and no recoloring. What am I doing wrong ( texture = _MetallicGlossMap,TexturesUnlimitedConfig\cuadroblanco )? Also, is there a simpler working template for this?

Link to comment
Share on other sites

29 minutes ago, juanml82 said:

The flicker is gone with the last update. As for recoloring the whole part, I wouldn't bother me much anyway, as I'd be happy with some quick and dirty colored metal shader. In any case, I guess that I need to use the original textures as a base for making mask and metalgloss textures in order to keep the uvw mapping, right? How do I go about adding them to the .cfg and what how should the metalgloss textures be?

The stripes in the retextured module seem to be related to the original copied and pasted texture ( PartOverhauls/Parts/FuelTank/Size1/Size1Tanks ) but I tried to replace it with different textures, incluing a small white square and I end up with just metal shaders and no recoloring. What am I doing wrong ( texture = _MetallicGlossMap,TexturesUnlimitedConfig\cuadroblanco )? Also, is there a simpler working template for this?

If you just want a colored version, use PartVariants.

KSP_MODEL_SHADER {
	model = path-to-model without .mu

	MATERIAL {
		shader = SSTU/PBR/Metallic
		PROPERTY {
			name = _Metal
			float = 0.0
		}
		PROPERTY {
			name = _Smoothness
			float = 0.3
		}
	}
}

@PART[part] {
	MODULE {
		name = ModulePartVariants

		VARIANT {
			name = Yellow
			displayName = Yellow
			primaryColor = #ffd300
			secondaryColor = #ffd300

			TEXTURE {
				_Color = #ffd300
			}
		}
		VARIANT {
			name = Metal
			displayName = Metal
			primaryColor = #808080
			secondaryColor = #808080

			TEXTURE {
				_Metal = 0.75
				_Smoothness = 0.75
			}
		}
		VARIANT {
			name = MetallicYellow
			displayName = Metallic Yellow
			primaryColor = #ffd300
			secondaryColor = #ffd300

			TEXTURE {
				_Color = #ffd300
				_Metal = 0.75
				_Smoothness = 0.75
			}
		}
	}
}

// https://forum.kerbalspaceprogram.com/index.php?/topic/173208-partvariant-color-tinting/

Check out my PartVariant guide linked in the OP for what options you have there. In your case, if you happen to have an exact material name that you want changed to help limit what is affected, you can do that.

If you specify a mesh= in the KSP_MODEL_SHADER, then only those meshes will use the TU shader, so the _Metal and _Smoothness parameters are ignored for any but those materials. You can also specify materialName= in the PartVariant to make the changes only apply to that specific material.

Edited by Electrocutor
Link to comment
Share on other sites

I'm trying to get a colored version with metallic reflections. I've copied stuff from your PartVariant guide, changing the colors to less saturated versions and probably screwing up a bit in the cfg
 

Spoiler

 

KSP_MODEL_SHADER {
    model = UmbraSpaceIndustries\MKS\Assets\Tundra*

    MATERIAL {
        shader = SSTU/PBR/Metallic
        PROPERTY {
            name = _Metal
            float = 0.75
        }
        PROPERTY {
            name = _Smoothness
            float = 0.75
        }
    }
}

@PART[Tundra*] {
    MODULE {
        name = ModulePartVariants

        VARIANT {
            name = Yellow
            displayName = Yellow
            primaryColor = #ffe981
            secondaryColor = #ffe981

            TEXTURE {
                _Color = #ffe981
            }
        }
        VARIANT {
            name = Metal
            displayName = Metal
            primaryColor = #a2a2a2
            secondaryColor = #a2a2a2

            TEXTURE {
                _Metal = 0.75
                _Smoothness = 0.75
            }
        }
        VARIANT {
            name = MetallicYellow
            displayName = Metallic Yellow
            primaryColor = #ffe981
            secondaryColor = #ffe981

            TEXTURE {
                _Color = #ffe981
                _Metal = 0.75
                _Smoothness = 0.75
            }
        }
                VARIANT {
            name = NCS_Black
            displayName = Black

            primaryColor = #323232
            secondaryColor = #323232

            TEXTURE {
                _Color = #323232
                _Metal = 0.75
                _Smoothness = 0.75
            }
        }
        VARIANT {
            name = NCS_Red
            displayName = Red

            primaryColor = #c44b69
            secondaryColor = #c44b69

            TEXTURE {
                _Color = #c44b69
                _Metal = 0.75
                _Smoothness = 0.75
            }
        }
        VARIANT {
            name = NCS_Green
            displayName = Green

            primaryColor = #629f8b
            secondaryColor = #629f8b

            TEXTURE {
                _Color = #629f8b
                _Metal = 0.75
                _Smoothness = 0.75
                }
        }
        VARIANT {
            name = NCS_Blue
            displayName = Blue

            primaryColor = #5d99d6
            secondaryColor = #5d99d6

            TEXTURE {
                _Color = #5d99d6
                _Metal = 0.75
                _Smoothness = 0.75
                }
        }
        }
    }
}

 

The problem I have is that, while the recoloring works, it doesn't keep the strong reflections. Here are two screenshots with KS3P off, with that config on and off

7vbw87N.png

6bS4vF9.png

Notice how the module in the right still keeps some light reflection in the second screenshot - that's the one with the default recoloring scheme (ie, not recolored). I was trying to achieve a look like this one (KS3P was on at the moment I took that screenshot)

0C2FZWz.png

But without all those stripes in the green module, which I guess are because that original copied and pasted cfg was referencing Porkjet Overhaul parts. Is that were specular maps come into play? And if so, how should they be designed and referenced in the cfg file? Or is it something else entirely?

Edited by juanml82
Link to comment
Share on other sites

On 4/2/2018 at 9:11 PM, Electrocutor said:

So... I have a question for everyone. For a mod like AirplanePlus, do you prefer its current implementation of having one part per visual (and perhaps some slight changes to properties like mass) or would you prefer there to be a single sized part then scroll through the visuals via variants? So for example, simply have a single part named Mk1 Cockpit or Mk1 Inline Cockpit, then have 3 or four 4 visual options.

 

On 4/3/2018 at 11:07 PM, Manwith Noname said:

It would significantly reduce the part list when initially looking at it as all 1.25m cockpits (mods included) would be under one icon, same for every part. A relevant group icon rather than individual ones. Whether or not people would prefer cycling through variants from one icon or having the parts as they are generally in the current form as separate icons and filtering, I don't know.

 

And also @Beale @CobaltWolf who are also interested in this possibility.

 

If I understand correctly, an example of this would be taking these AirplanePlus cockpits -- http://i.imgur.com/XtVdNoE.jpg -- and condensing it into a smaller number of parts.

 

Not to rain on the parade, but if I may, a word of caution -- particularly with respect to @Manwith Noname's interpretation.


The API documentation for ModulePartVariants states:

Quote

(Model changes shouldnt be drastic so it keeps consistent but are possible)

For whatever underlying technical or design reasons, that is the recommendation that we have at this time from the existing documentation from the developer.

In other words, it's not recommended to go too far with this if it involves model changes between the variants.
Using the Making History parts as a rough guideline, these examples are okay:
- different lengths of the same structural tube
- rocket nozzle attached to the "bottom end" of a tank structure, vs only a bare truss structure

But it doesn't look like it is intended or recommended to use Variants as a way to "combine" multiple parts into "one icon" in the part palette in the editor.

In AirplanePlus, let's look at the size2 cockpits as an example -- the three on the left -- those are rather quite distinctly different meshes.
Not to make a blanket statement about all parts, but in this case, I personally would not be very confident about the model differences being "not too drastic".

There are also technical consequences here. Consolidating parts together isn't just combining them into "one icon" -- it is combining them into one part. The original parts do not exist anymore, they have been subsumed.
This change is save breaking. You could be extra careful and keep a copy the original part, and set it up so that it is hidden in the editor, which would allow you to continue to load existing .craft files, and keep playing with your already-launched vessels. But, going back from a "consolidated" part to separate ones would require editing existing vessels in your save files.

This is fine and well in cases like where a modder wishes to do it for several similar parts in their own mod. There is a transition period, and then the old, separate parts get deprecated. It's all official.

However, I'd caution against doing this without permission from the original mod author. In particular, combining parts from stock + different mods together, seems especially ill advised.

First, this impacts other mods that rely on MM to patch existing parts. For instance, Connected Living Space may need to patch its partmodules into existing parts of other mods, or Indicator Lights uses MM to add models to existing parts.

More importantly, this has the potential to create complications for user support, because that sometimes (often?) relies on users providing .craft files and save files that exhibit a particular bug or issue that they are having.

So, a player who is using an "unauthorized" "part combiner" patch encounters a problem with Mod X, and reports it:
- Mod X author has trouble loading the provided save file because "combined-part" is not the same as the original parts.
- Mod author asks for problem to be replicated on 'out-of-box" install of their mod.
- Player is not able to replicate the issue (it may be a complex interaction that is difficult to recreate)
- Bug is not found and resolved.

This can affect other modders besides the original mod author too. E.g. if a player encounters a problem with plugin Mod Y in conjunction with part Mod X.
If I were developer of Mod Y, I'd typically be happy to investigate a mod interaction with Mod X when that has been narrowed down as the cause.
But, if the player is using an unofficial, "combined" version of part from Mod X that bundles it with Mods U, V, W, etc ... that could make things more difficult.

So, please be careful. It is best that changes of this nature be confined within individual mods, and officially incorporated in the mod, not a third- (fourth?-) party patch.

 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...