Jump to content

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


Shadowmage

Recommended Posts

Unfortunately, looks like no release for this weekend.  There have been a lot of changes that might impact existing configs, and I want to give some additional time to review those changes for side-effects.  Also want to take a run at trying to fix up the atmosphere and skybox reflections in the stock reflection probe, as those add quite a bit of impact to the reflection maps that is currently missing, and take a look at cleaning up Scatterer reflections.  And finally, I want to finish up the external toolset that can be used for normalization data generation, time permitting.

However, for anyone so inclined, the dev branch is being kept up-to-date with the fixes, and you are welcome to download the /GameData folder directly from there if you wanted to give the new stuff a try.  It shouldn't break anything, but please let me know if you encounter any issues, new or otherwise.

Will aim for next weekend for the next release, as that should give sufficient time for review and testing, and hopefully give time for cleaning up some of the reflection stuff.

 

Link to comment
Share on other sites

Terrifically looking forward to the part recoloring! I never really got the hang of Kerb Paint, and later just used a part color switcher once 1.4's variant switcher apparatus was developed but this was limited to individual variants hand-crafted and configured:

 

Pretty excited to be able to do it from within TU!

Link to comment
Share on other sites

  Reveal hidden contents

I'm putting the quote with the screenshots in a spoiler because it's a big post. In the part list on the left the parts appear dimmed - they don't appear to have the reflections visible in the VAB/SPH like they do without using TexturesUnlimted. I'm running my game in DX9 currently (had read about DX11 issues other than textures which this fixes). Does this issue go away when running in DX11? Or is it just something we need to live with? I know it's a pretty minor thing, it's just taking some readjusting when looking at the parts. I'm finding it a little bit harder to see find what I'm looking for because I'm used to the stock reflections being there. What is it about Textures Unlimited that causes this to happen? Mainly curious on that aspect. 

I installed TexturesUnlimited so that I could use the James Webb telescope mod but could happily live without it (although I would love to use the mod). 

I have placed two images inside the spoiler tag which show what the parts list is like in the VAB without and without Textures Unlimited installed in 1.7.3 running on DX9:

  Reveal hidden contents

I'm pretty sure that reflections are enabled properly in game. Only setting I can find is the refresh time one and the one next to it (forgotten the name right now). 

 

One final thing to ask: Are there are extra or required config files needed for stock and mods? Or is everything included with the download? 

Edited by madindehead
Link to comment
Share on other sites

  On 8/2/2019 at 10:56 AM, madindehead said:

they don't appear to have the reflections visible in the VAB/SPH like they do without using TexturesUnlimted.

Expand  

What you are seeing there isn't reflections, but the stock icon shader inflating the diffuse lighting.  I don't have access to the stock shader source, so have no reference on what they are doing, or how to duplicate it.

 

  On 8/2/2019 at 10:56 AM, madindehead said:

Does this issue go away when running in DX11?

Expand  

In order to fix issues with the stock icon-shaders on DX11 (they are flat blue for everything), TU has provided its own replacements; however as mentioned above, they are not entirely equivalent replacements.

 

Long story short -- if the icons bug you, you will have to remove TU or disable the icon replacement configs.  It is a side effect of me fixing issues with stock DX11.  Personally I think the stock icon shaders look far too bright and washed out, and the replacements don't bug me.  Combined with lack of access to the stock shaders to know what they are doing to replicate it, the chances of this being fixed are minimal.

If you use ModuleManager to delete these nodes, TU will no longer patch icon shaders: https://github.com/shadowmage45/TexturesUnlimited/blob/master/GameData/000_TexturesUnlimited/Shaders/TUShaders.cfg#L21

E.G.  (or whatever the correct syntax is)

-KSP_SHADER_DATA[*]{}

 

  On 8/2/2019 at 10:56 AM, madindehead said:

One final thing to ask: Are there are extra or required config files needed for stock and mods?

Expand  

Yes.  TU is only an API and by itself doesn't do much.

  On 8/2/2019 at 10:56 AM, madindehead said:

Or is everything included with the download? 

Expand  

No.  See above.

I provide configs for my main parts mod (SSTU), but I'm not aware of any other comprehensive sets for stock or other mods.  The closest available is likely:

 

 

Link to comment
Share on other sites

  On 8/2/2019 at 3:04 PM, Shadowmage said:

What you are seeing there isn't reflections, but the stock icon shader inflating the diffuse lighting.  I don't have access to the stock shader source, so have no reference on what they are doing, or how to duplicate it.

 

In order to fix issues with the stock icon-shaders on DX11 (they are flat blue for everything), TU has provided its own replacements; however as mentioned above, they are not entirely equivalent replacements.

 

Long story short -- if the icons bug you, you will have to remove TU or disable the icon replacement configs.  It is a side effect of me fixing issues with stock DX11.  Personally I think the stock icon shaders look far too bright and washed out, and the replacements don't bug me.  Combined with lack of access to the stock shaders to know what they are doing to replicate it, the chances of this being fixed are minimal.

If you use ModuleManager to delete these nodes, TU will no longer patch icon shaders: https://github.com/shadowmage45/TexturesUnlimited/blob/master/GameData/000_TexturesUnlimited/Shaders/TUShaders.cfg#L21

E.G.  (or whatever the correct syntax is)

-KSP_SHADER_DATA[*]{}

 

Yes.  TU is only an API and by itself doesn't do much.

No.  See above.

I provide configs for my main parts mod (SSTU), but I'm not aware of any other comprehensive sets for stock or other mods.  The closest available is likely:

 

 

Expand  

Ace. Thanks for all of that info :) I will probably get used to the part list icons being different and then end up not noticing it :D

One other thing: If I wanted to remove the TU support from SSTU, is it just a case of deleting the configs? What will that default do texture wise?

Edited by madindehead
Link to comment
Share on other sites

  On 8/2/2019 at 5:57 PM, Shadowmage said:

Not possible; its a linked-dependency of the SSTU plugin.  You could remove the texture-switching and recoloring GUI functions through careful patching, but it will always require that TU be installed.

Expand  

I didn't explain myself very well. 

If I don't want the reflections on SSTU how would I change that? Is that just disabling the reflections in the TU config options? I love the idea of the SSTU parts: not sure about all the reflections though (maybe it needs to grow on me) but I feel like it looks weird. I found a stock config for TU and it also feels weird right now to have all of those chrome parts :/ 

Link to comment
Share on other sites

... and I updated my fiddled ColorPresets.cfg:

  Reveal hidden contents

 

Edited by Gordon Dry
Link to comment
Share on other sites

  On 8/5/2019 at 7:06 PM, Buflak said:

Open recolor GUI, set specular to 0?

Expand  

Good, functional.  I'll raise you one though.

@madindehead

Open the stock in-game settings, find the stuff that deals with reflections, and turn it off :)    TU uses the stock reflection probes and stock reflection system, and the reflections can be disabled that way, globally, across the entire mod (and entire game).

(note though:  anything that should be metal/chrome will instead show a solid color instead of reflections, whatever stock has specified that color to be, and is entirely out of my control).

Edited by Shadowmage
Link to comment
Share on other sites

  • 2 weeks later...
  On 8/20/2019 at 4:30 PM, Lo Var Lachland said:

So is this just the modern replacement of PlanetShine with some extra on the side?

Expand  

Not really.

TexturesUnlimited is a nearly-full implementation of Unity Standard shaders in KSP, bringing the option to use Physically Based Rendering methods and basic Global Illumination.  With some extra features on the side for the 'recoloring' system.

PlanetShine simply introduced colored ambient (maybe it was directional?) light depending upon what body you orbited, using preconfigured color maps or values taken from the celestial body data constructs.

TexturesUnlimited unlocks the full potential of environment-mapped reflections, which uses the actual rendered environment to determine what lights and colors will show on your craft; up-to and including fully reflective surfaces with pixel-accurate reflections of the surroundings.

 

So, yes, TU does duplicate the visible function of PlanetShine, but only as a side-effect of its more modern rendering techniques and shaders.

 

Link to comment
Share on other sites

  • 2 weeks later...

I like this new detail slider.

 

I'm noticing some weirdness with PartVariants though. If you place a part and switch to a recolour variant, paint it, all good. When you place the same part again and switch to the recolour variant, the previous colour scheme is applied. This in itself isn't a huge problem but what happens next is the weird part. If you alter the colour scheme for the newly placed part all looks good in the VAB/SPH, when you launch however both parts will display the newly designed scheme. Then, when you revert to the editor and redo the scheme and launch, it seems to work correctly.

At least, from memory. I fiddled around with it a few days ago so might be slight error on which part gets altered going to launch.

Link to comment
Share on other sites

  On 8/31/2019 at 2:56 PM, Manwith Noname said:

I like this new detail slider.

 

I'm noticing some weirdness with PartVariants though. If you place a part and switch to a recolour variant, paint it, all good. When you place the same part again and switch to the recolour variant, the previous colour scheme is applied. This in itself isn't a huge problem but what happens next is the weird part. If you alter the colour scheme for the newly placed part all looks good in the VAB/SPH, when you launch however both parts will display the newly designed scheme. Then, when you revert to the editor and redo the scheme and launch, it seems to work correctly.

At least, from memory. I fiddled around with it a few days ago so might be slight error on which part gets altered going to launch.

Expand  

If memory serves, this is one of the bugs with TU and PartVariants that's been there since the beginning: it caches the colors/material per part instead of per part instance.

 

@Shadowmage

So... KSP is FINALLY dropping dx9... albeit only shortly before KSP2 comes out.

Link to comment
Share on other sites

  On 8/31/2019 at 3:20 PM, Electrocutor said:

it caches the colors/material per part instead of per part instance.

Expand  

Notably, its a problem with the way the PartVariants function, and the fact that they -all- use a SharedMaterial per variant (rather than per-part).  E.g. multiple parts with the same variant all share a material (that is STOCK code doing it, not TU).  What needs to happen, is that this is changed to a per-part shared material instance.  TU doesn't cache anything.

  On 8/31/2019 at 3:20 PM, Electrocutor said:

So... KSP is FINALLY dropping dx9... albeit only shortly before KSP2 comes out.

Expand  

Yeah, after I've already lost countless hours dealing with fixing their lack of caring.  At this point.. it is me who is about to exhibit a lack of caring.

Edit:  That probably comes across much more negatively than is truly intended.  Yes, I'm a bit frustrated by their development route (and the entirety of KSP2); but I'm also happy they are finally making the changes, and am excited to see how much stuff was 'fixed' (but also quite scared to see how much was broken or still not fixed).

Edited by Shadowmage
Link to comment
Share on other sites

I made a custom patch for planetary domes beta... SHINY ! 

I4rUusL.pngmnA0sdt.jpg

Full Album

Download (requires Planetary Domes Beta for 1.7 (quite obviously))

I suggest you remove the shader on the glass parts if you use it because it's apparently quite glitchy with these parts (textures dissappear at various camera angles)

Edited by lBoBl
Link to comment
Share on other sites

Hi, I'm excited to try out the part recolouring, only I can't get it to work... Do I need either the recolouring depot or the mod from Electrocutor? 

I've tried it with the recolouring depot but that doesn't work at all for me. I'm probably doing something completely wrong as usual, so any help would be appreciated.

Link to comment
Share on other sites

  On 9/6/2019 at 7:29 PM, ISOREX_ said:

Hi, I'm excited to try out the part recolouring, only I can't get it to work... Do I need either the recolouring depot or the mod from Electrocutor? 

I've tried it with the recolouring depot but that doesn't work at all for me. I'm probably doing something completely wrong as usual, so any help would be appreciated.

Expand  

Hi, and thanks for the interest.

Unfortunately I'm not aware of any fully functional recoloring config sets.  The recoloring-depot is likely the closest that is available, but I'm pretty sure it is a bit out-of-date at this point.  I do not provide these patches/config sets myself, and cannot provide any specific support for them.

I was/am working on developing a stock-recoloring mod myself, but the work is extremely slow and time-consuming, and there is a lot of it (300+ parts, often with multiple textures each), so it likely won't be available anytime soon.

 

If you are truly interested in recolorable parts, I would take a look at SSTU -- https://forum.kerbalspaceprogram.com/index.php?/topic/117090-wip17x-sstulabs-low-part-count-solutions-orbiters-landers-lifters-dev-thread-11-18-18/ -- it is the only mod that I'm aware of that has properly implemented the recoloring system, and a large majority of the parts in it are fully recolorable.

 

Link to comment
Share on other sites

  On 9/6/2019 at 7:29 PM, ISOREX_ said:

I've tried it with the recolouring depot but that doesn't work at all for me. I'm probably doing something completely wrong as usual, so any help would be appreciated.

Expand  

It should mostly work, if you have specific problems you want addressed post in the TURD thread. I suspect you either didn't install correctly, are missing a dependency or are running something which interferes with it. It's not "complete", some parts are missing (though not many), some things may be broken that I have not found due to recent updates to KSP itself. It's an ongoing and time consuming project though and I would advise not getting used to it should you want a problem free game because some future updates will drastically alter what you experience.

This is work in progress for example...

  Reveal hidden contents

 

Every texture needs either doctoring or creating.

Edited by Manwith Noname
Link to comment
Share on other sites

  On 9/6/2019 at 8:55 PM, Manwith Noname said:

Every texture needs either doctoring or creating.

Expand  

Pretty much that ^^.

Even without creating new metallic textures or normal maps, just making the masks alone, can take upwards of ~2 hours per part depending on how messy the original UV maps and textures are.  Its slow work, for me at least.

 

Link to comment
Share on other sites

  On 9/6/2019 at 9:43 PM, Shadowmage said:

Even without creating new metallic textures or normal maps, just making the masks alone, can take upwards of ~2 hours per part depending on how messy the original UV maps and textures are.  Its slow work, for me at least.

Expand  

Well, as far as I can tell, Squad's models consist of just one mesh! If you want to separate the models into different materials you're forced to make your own maps to tell the engine what material to place where.

Link to comment
Share on other sites

  On 9/6/2019 at 9:57 PM, Delay said:

Well, as far as I can tell, Squad's models consist of just one mesh! If you want to separate the models into different materials you're forced to make your own maps to tell the engine what material to place where.

Expand  

Indeed.  Which only serves to complicate the entire process from a (re)texturing perspective; esp in regards to utilizing different shader styles on a single part.  Only choice is to use a single shader, and create any custom texture maps that might be needed for that shader.

Link to comment
Share on other sites

Given that KSP 1.8 is around the corner, with native DX11 support, using Unity 2019.2, will that deprecate your mod or just make your life harder, Shadowmage, to change all the code to be once again compatible? Just wondering what it means for the code of TU and if its a sigh of relief to you (YAY, native support!) or more a sigh of "OH-NO-ALL-BROKEN!"

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