Jump to content

[1.9.x] Textures Unlimited - PBR-Shader, Texture Set, and Model Loading API


Shadowmage

Recommended Posts

1 hour ago, alexus said:

Shadowmage, please, tell me, is  there a difference between _SpecMap (of SSTU/PBR/Masked) and _MetallicGlossMap  (of SSTU/PBR/Metallic) as result?

 

 

 

SSTU/PBR/Masked -- is for 'recoloring' of parts.  _SpecMap.rgb = smoothness;  _SpecMap.a = metallic
SSTU/PBR/Metallic -- standard shader.  _MetallicGlossMap.r = metallic; _MetallicGlossMap.a = smoothness

Channels are swapped on input textures.  Lighting and rendering are identical except for the input channels (and the obvious recoloring capability differences; but in the absence of a mask, the rest should be identical).

Link to comment
Share on other sites

Shadowmage , I am sorry for question but I can not understand how do "Masked" shader work?

 _MaskTex - RGB - Mask textureRGB = R = user color1, G = user color2, B = user color3; only one channel should be active at any one time

How do I work with it?

 

Edited by alexus
Link to comment
Share on other sites

9 hours ago, alexus said:

Shadowmage , I am sorry for question but I can not understand how do "Masked" shader work?

 _MaskTex - RGB - Mask textureRGB = R = user color1, G = user color2, B = user color3; only one channel should be active at any one time

How do I work with it?

 

Probably easiest to answer this with pictures.

Start with some nearly flat gray diffuse/spec/metal textures  (these act as a detail mask applied in some sort of burn/dodge mode)--

53qEbFV.png

Add a 'mask' texture - each area can be Red OR Green OR Blue -- determines which GUI slider recolors that section --

rIexIKx.png

Use the 'Recoloring GUI' to select the colors for each masked section (Red = 'Main', Green = 'Second', Blue = 'Detail')--

E3GbojB.png

Enjoy nearly infinite color options for your parts --

(the shader and plugin code use the colors specified

ofHsHcf.png

 

Or just download and look at SSTU for examples of how to use the shader and what it does --  way easier than me trying to explain it...

 

Link to comment
Share on other sites

2 hours ago, alexus said:

Shadowmage , please, tell me: Is opportunity to apply new texture of model in a game without restart a ksp game programm?

Alt + F11 -> Reload Database

(may not work in all cases)

 

Edit: This is why I test my stuff in the Unity Editor using the Standard Shader -- much quicker turn-around for iterative design.

Edited by Shadowmage
Link to comment
Share on other sites

25 minutes ago, alexus said:

How can I open .mu in Unity Editor?

Sadly SQUAD has not provided us with that ability.  You can try importing the .mu into Blender, and then exporting that or an fbx into Unity...

^^ is why I don't play with stock/other peoples models.  Too much hassle and drama....

 

Link to comment
Share on other sites

any change to add a"dont show this warning again "buttom,please

or a other way to disable it

it works pretty well for me with dx9 and tryed both dx11 and open glcore and it was a mess

 -force-glcore (half icons ,AA switch on/off = no results)

 -force-opengl (half icons ,AA switch on/off = no results)

-force-d3d11 (ksp didnt start whitescreen)

-force-d3d11-no-singlethreaded (start but with the warning)

thanks

Link to comment
Share on other sites

11 hours ago, alexus said:

Does _AoMap work in SSTU/PBR/Metallic shader?

i do not see different between with it and without it.

Yes, at least it does in my testing.  Its not a direct 'color multiply' type of AO as is commonly used by legacy rendering -- the shader uses it for lots of different functions such as decreasing specular lighting and fresnel on AO impacted areas.

8 hours ago, Burning Kan said:

or a other way to disable it

Yep, you can un-install the mod.  Problem solved.  No more warning dialog.

Or tell SQUAD to fix their openGL/DX11 support.  Or tell Unity to fix their DX9 cubemap blurring.  Or... TU is open source -- feel free to fork your own version and compile it without the warning... but I'll offer absolutely zero support for forked versions (and forking of an active mod always leads to drama).  Those are really the only options I can offer.

Edit: @Burning Kan  The one exception to the above would be that if you can show me a mod that is using TU, but not using any of the shaders.  The DX9 problems only arise when trying to use any of the advanced shader functions;  if there is a mod using TU only for model loading (one o bcink's?), I would be willing to investigate a solution for those cases.

Edited by Shadowmage
Link to comment
Share on other sites

Good news on the updated shader front -- it so far all looks like it will work out well.  It does result in an absolutely massive shader package (~2mb), and crazy long compile times, as Unity internally compiles variants for each potential keyword combination (1300+ variants with the current # of keywords; grows exponentially with each added keyword feature).  But it does work, and should offer some minor performance benefits when features are not used.

Also made good progress on a new recoloring shader variant that works so much better than the existing options as far as consistency of recoloring between parts.  It uses additional user-provided input textures to extract the 'detail' from the original diffuse/specular/metal textures, while discarding the base color / level data.  The result is a much more consistent color output for the presets in the GUI (depending on the accuracy of the user-provided 'normalization' textures).

For an example, here is one of the stock parts using the new recoloring shader, along with an SSTU tank, both using the same 'green paint' preset color from the GUI (I created the normalization mask for this part, based on one of @Manwith Noname's recoloring masks; is also using that recoloring mask for the section layout).

  wM5UDJM.png

This new shader was all geared to be part of the KSP 1.5 update -- but I'm close to having something available and usable now.  Might have a version available for testing and feedback by end of week/the weekend.  Still a few of the new features to add and clean up, but the existing features have all been transferred and appear to be working.

Link to comment
Share on other sites

On 10/8/2018 at 1:12 PM, Burning Kan said:

any change to add a"dont show this warning again "buttom,please

or a other way to disable it

it works pretty well for me with dx9 and tryed both dx11 and open glcore and it was a mess

 -force-glcore (half icons ,AA switch on/off = no results)

 -force-opengl (half icons ,AA switch on/off = no results)

-force-d3d11 (ksp didnt start whitescreen)

-force-d3d11-no-singlethreaded (start but with the warning)

thanks

same here the texture unlimited ruins the game 

please remove dependency on texture unlimited

i get weird things all around the game and even my rocket disappear when i zoom in 

please remove texture unlimited requirement the game is mess with force dx11    

Link to comment
Share on other sites

On 10/3/2018 at 1:31 AM, Shadowmage said:

Will try and take a look at this in the next couple of days.  If there are shader/plugin fixes needed, the earliest they might be available would be this weekend.

Will let you know what I find out....

did you look it

Link to comment
Share on other sites

52 minutes ago, alexus said:

did you look it

Sorry, I did not.  I really don't have time to be downloading random mods and writing configs by hand to look at stuff like that.

Could you provide a .zip package that contains specifically and exactly the files needed to duplicate the problem?  (models, textures, configs, and patches, in proper folder structure so that I might simply install it as a mod) -- if you leave it up for me to have 'free time'... we'll probably both be old and senile before that happens.

1 hour ago, Ninadragonborn said:

same here the texture unlimited ruins the game 

Then un-install it.  I'm not forcing anyone to use this.

Edit: I'm still willing to provide a work-around for the 'warning dialog' if someone can provide proof/example of a mod that is using TU for model loading but not using any of the shaders.  So far, nobody has provided that information (seriously guys, you'll come to the forum to whine and complain.... but refuse to do even a little bit of real 'work' to potentially get the problem solved?)

Edited by Shadowmage
Link to comment
Share on other sites

So something I'm not always sure of with mods and version compatability is backwards compatability. I'm using rss/ro 1.3.1 and I've got the version of tu for 1.3.1 but I'm wondering if the later versions will still run in 1.3.1 with the additional enhancements???? If it's screwed up do I just delete the folder and download the supported version with my game?

Link to comment
Share on other sites

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...