Jump to content

FSTextureSwitch


Recommended Posts

I'm on gen 3 of my B9 parts expansion and I hit on a little snag.

For the wings pack, I've basically taken 4 of the base textures I used on all wings and made my own recolored versions of them. I made them roughed up with a bit of matting and noise, a little darkening, added some blue, and also made my own NRMs for them. They finally look pretty good.

What I would like to do is let them be FSTextureSwitched with B9's original flat and shiny things.

This, however, requires I go from KSP/diffuse/bumped (just called "KSP/bumped") to KSP/specular/bumped shader to get it to look right. How do I switch out the shaders along with the texture? I see where I can switch out a normal map also with FSTexture switch, but nothing about how to change the shader values. He mentions a "specular map" in the documentation, but I don't see a KSP shader that would apply in this situation.

I guess part 2 is: can I add additional texture layers as child objects in Unity and will it work correctly?

Edited by PolecatEZ
Link to comment
Share on other sites

Make all your models with specular/bumped, but for those textures that were simply bumped, make the alpha channel all a single value, and just pick a value that gives you the same results as a bumped shader.

So would this write the alpha channel changes into the .mbm file and not the .mu? Sorry, dumb question...so the alpha value is set on the texture?

Edited by PolecatEZ
Link to comment
Share on other sites

Ok, got it to work, but I had to reload the game from scratch to get it to set.

For anyone else's future reference:

I made a dummy blank_NRM texture (64x64 plain blue) in its own assets folder.

I have my own SquareWings texture, modified with some noise and coloring modifications (not important really)

I made a bumpy SqareWings_NRM texture of the above.

I have Tavarius/Bac9's square wings model000 texture sitting in its proper folder.

In Unity, set it for Specular/Bumped. Reduced shininess to nothing. In the little tab also set Specular color to pitch black. This was using my SquareWings and SquareWings_NRM. Exported to the Expansion folder. Don't forget to click on the NRM texture in Unity and say its a Normal, but don't let it otherwise modify it.

And put this in my .cfg for the wing.

MODULE

{

name = FStextureSwitch

moduleID = 12

textures

{

name = B9_Aerospace/Expansions/D12Wingtech/SquareWings

name = B9_Aerospace/Parts/Aero_Wing_SH_S/model000

}

objects

{

name = wing

}

additionalMap

{

name = B9_Aerospace/Expansions/D12Wingtech/SquareWings_NRM

name = B9_Aerospace/Expansions/D12Assets/blank_NRM

}

additionalMapType = _BumpMap

mapIsNormal = true

}

Now I can switch back and forth between roughed up wings and shiny smoothness in game. Reloading assets in the game won't let you tweak it, to test it you need to completely reload the game unlike with just regular texture switching.

I may go back and remake my own normal, as the end effect isn't that dramatic, but the concept is there.

Edited by PolecatEZ
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...