Shadowmage

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

Recommended Posts

Hi,

Something is causing all parts with stock changeable textures to appear black.

JslWQqz.png

Those are a few FLT fuselages.

I have SSTU, Textures Unlimited, and TURD by @Manwith Noname

Any knowledge?

Edited by Thorn_Ike

Share this post


Link to post
Share on other sites
32 minutes ago, blowfish said:

Installing just Textures Unlimited and running with -force-d3d11 resulted in no icon issues for me (KSP 1.5.x) 

Look at this

KSP-x64-2018-11-08-16-23-18-12.jpg

Share this post


Link to post
Share on other sites
2 minutes ago, alexus said:

Look at this

I believe you, I guess I'm saying that it seems like the presence/absence of Textures Unlimited isn't the full story.  I'm sure Shadowmage could benefit from seeing your logs to determine where the fix isn't working as intended.

Edited by blowfish

Share this post


Link to post
Share on other sites
9 hours ago, Thorn_Ike said:

Any knowledge?

This is because I have not released an update for KSP 1.5 and Squad have used the same part names for those tanks as they used previously while moving the parts to a new folder, so, the configs are looking for textures in an old directory path which no longer exists resulting in them not being found. Even if they were still located as they once were, the paint scheme would most likely be misaligned and largely inappropriate.

 

9 hours ago, blowfish said:

I believe you, I guess I'm saying that it seems like the presence/absence of Textures Unlimited isn't the full story.  I'm sure Shadowmage could benefit from seeing your logs to determine where the fix isn't working as intended.

With the latest version of TU, some part icons will still display blue-ish with certain shaders, most notably, the new bump spec mapped. It's known as in one of the files there is a comment about it.

Edited by Manwith Noname

Share this post


Link to post
Share on other sites
9 hours ago, alexus said:

Look at this

KSP-x64-2018-11-08-16-23-18-12.jpg

Those aren't stock parts.  Those are mod added parts, likely using a non-standard shader.  If you find me the name of the shader they use, I can add it to the list of 'stock crap to fix'.


Do you have any issues with stock parts though?  (those are all that I can test fixes for)

Share this post


Link to post
Share on other sites

Hmm... super-secret project is not so secret anymore...

 

Top = reference implementation - using a standard sphere with a surface shader to implement scattering (extrude verts of original planet in vertex pass, use that for atmo) (not my code)
Bottom = TU's 'screen-space' atmospheric scattering implementation of the same math functions - done entirely in post-process, as a single additive blending pass. (custom TU shader code)

oQeG3go.png

The gist of it is that I'm trying to find a way to implement a Scatterer-like effect (atmospheric multiple-scattering) that won't kill performance, and that will play nicely with KSPs rendering and with TU's reflection system.  The above is done as an iterative sample-integrator (simulating raycasts for each rendered pixel), with close to zero noticeable impact on framerate (0.01 ms, on some really old GFX card).  It could be improved quite a bit by the use of precomputed lookup tables rather that iterative sampling, and likely some other low-level process flow/branch optimizations that could be made as well, but it is already blazingly fast.

Also, the above should be considered only a very basic 'proof of concept'.  So far it only functions properly when viewing from outside the atmosphere (theoretically simple to fix, but wasn't part of the reference implementation, so have to do some additional figuring out of things).  It also only functions for rendering of a single planet atmosphere at a time, with position, radius, atmo radius, etc all configured as shader properties; any use of this in KSP would need to be adapted to query the stats for a planet from the KSP constructs.  Thankfully it will work just fine for scaled space or non-scaled space setups -- the above is actually a 'scaled space' type rendering, with the earth spheres only being ~1m in diameter (and all effects scaled such that it should be accurate for a full-size planet).

It is all based on the work presented here:   https://www.alanzucconi.com/2017/10/10/atmospheric-scattering-1/   with major adaptions to allow it to function as a post-process shader (and yet more future modifications will be needed to get it working in KSP).


Edit:  2nd image with bloom enabled.

QHpXE4W.png

Edited by Shadowmage

Share this post


Link to post
Share on other sites

 

10 hours ago, Manwith Noname said:

This is because I have not released an update for KSP 1.5 and Squad have used the same part names for those tanks as they used previously while moving the parts to a new folder, so, the configs are looking for textures in an old directory path which no longer exists resulting in them not being found. Even if they were still located as they once were, the paint scheme would most likely be misaligned and largely inappropriate.

 

When can we expect a 1.5 release?

Share this post


Link to post
Share on other sites

A bit more playing around with scattering things...

Twilight boundary / extinction(?)

UV5rF0X.png

(flat plane used as a ground-level reference in the following two images; normally there would be a planet out to the horizon... but unity doesn't like real-scale sized celestial objects, so I've got to cheat)

pWS8qJ5.png

Sun down past the horizon a bit (the black edge is where the planet would be obscuring the effect if I wasn't cheating with a flat plane)

EA0AvBZ.png

Share this post


Link to post
Share on other sites

I have difficulties on installing the texture unlimited to my 1.4.1 and 1.4.5 vision. can somebody help me? I've followed the instruction and installed all the module managers(3.0.5-3.1.0), but none of them work.

Share this post


Link to post
Share on other sites
1 hour ago, buguniao said:

I have difficulties on installing the texture unlimited to my 1.4.1 and 1.4.5 vision. can somebody help me? I've followed the instruction and installed all the module managers(3.0.5-3.1.0), but none of them work.

you need the PBR folder that can be found in SSTU download links. I bet you missed that.
https://github.com/shadowmage45/SSTULabs/releases
I would install SSTU so you can paint parts, although you could install the Recolour Depot but I don't think it works in 1.4.5, so you could paint stock parts too.

Share this post


Link to post
Share on other sites
6 hours ago, Agustin said:

you need the PBR folder that can be found in SSTU download links. I bet you missed that.
https://github.com/shadowmage45/SSTULabs/releases
I would install SSTU so you can paint parts, although you could install the Recolour Depot but I don't think it works in 1.4.5, so you could paint stock parts too.

well, i found that this thing actually start to work. but how can i change the texture of it? like i want to change my fairings to silver or metal instead of white plastic

Edited by buguniao

Share this post


Link to post
Share on other sites
9 hours ago, buguniao said:

I have difficulties on installing the texture unlimited to my 1.4.1 and 1.4.5 vision. can somebody help me? I've followed the instruction and installed all the module managers(3.0.5-3.1.0), but none of them work.

Textures Unlimited is an API -- meaning it is a mod for other modders to use.  By itself it does nothing (well, almost nothing; it does fix some issues with stock parts in DX11/OpenGL).  Generally though you would only want TU to be installed if there is another mod that is making use of it.  You can find a listing of these mods in the opening post.

 

1 hour ago, buguniao said:

well, i found that this thing actually start to work. but how can i change the texture of it? like i want to change my fairings to silver or metal instead of white plastic

With SSTU + SSTU-PBR installed, you would right click on one of the mods parts, and click the 'Open Recoloring GUI' button.  It should open up a GUI that will let you select the colors for that part.   The option is only available on SSTU's parts that support it, but it is not on every part (and may only be available for specific texture sets for some parts).

Share this post


Link to post
Share on other sites

Would it also be possible to simulate water using TU in a manner similar to Scatterer?
(The comment refers back to your WIP atmospheres)

Edited by Delay

Share this post


Link to post
Share on other sites
5 minutes ago, Shadowmage said:

Textures Unlimited is an API -- meaning it is a mod for other modders to use.  By itself it does nothing (well, almost nothing; it does fix some issues with stock parts in DX11/OpenGL).  Generally though you would only want TU to be installed if there is another mod that is making use of it.  You can find a listing of these mods in the opening post.

 

With SSTU + SSTU-PBR installed, you would right click on one of the mods parts, and click the 'Open Recoloring GUI' button.  It should open up a GUI that will let you select the colors for that part.   The option is only available on SSTU's parts that support it, but it is not on every part (and may only be available for specific texture sets for some parts).

I have just realized that now:o but I have problems installing the PBR.... the mod just don't come out

Share this post


Link to post
Share on other sites
1 hour ago, buguniao said:

... I have problems installing the PBR.... the mod just don't come out

Please post an image of your gamedata folder. (you can also install the Recolour Depot mod referenced in the Opening Post of this Thread to make the same painting functionality on Stock parts).
In your gamedata folder there should be:
Module manger dll  (file)
000_TexturesUnlimited (folder)
SSTU-PBR (folder)

and then the SSTU parts mod for example, or the recolour depot mod, which installs everything in a "TURD" folder. These make the mods above be visible or a have purpose, nothing will happen if you don't install some of these two.

Edited by Agustin

Share this post


Link to post
Share on other sites
9 hours ago, Agustin said:

Please post an image of your gamedata folder. (you can also install the Recolour Depot mod referenced in the Opening Post of this Thread to make the same painting functionality on Stock parts).
In your gamedata folder there should be:
Module manger dll  (file)
000_TexturesUnlimited (folder)
SSTU-PBR (folder)

and then the SSTU parts mod for example, or the recolour depot mod, which installs everything in a "TURD" folder. These make the mods above be visible or a have purpose, nothing will happen if you don't install some of these two.

I've got it at last:) thanks for reply!:P

Share this post


Link to post
Share on other sites

Where can I find the SSTU/PBR shaders? NSS config file and textures unlimited config files point to those missing folders but the SSTU-PBR folder does not include them!

;.;

Share this post


Link to post
Share on other sites
1 minute ago, Moofrog said:

Where can I find the SSTU/PBR shaders? NSS config file and textures unlimited config files point to those missing folders but the SSTU-PBR folder does not include them!

;.;

They are included with TU, in the SSTU-Shaders ssf bundle file ( https://github.com/shadowmage45/TexturesUnlimited/blob/master/GameData/000_TexturesUnlimited/Shaders/sstushaders-universal.ssf  )

So, as long as you have TU installed, the shaders are there as well.

Share this post


Link to post
Share on other sites
45 minutes ago, Shadowmage said:

They are included with TU, in the SSTU-Shaders ssf bundle file ( https://github.com/shadowmage45/TexturesUnlimited/blob/master/GameData/000_TexturesUnlimited/Shaders/sstushaders-universal.ssf  )

So, as long as you have TU installed, the shaders are there as well.

Thanks. As it turned out the shaders were not the issue.

Yeah so ModuleManager has a problem with this expression in TexturesUnlimited_NSS.cfg:

Quote

[ERR 17:05:27.452] [ModuleManager] name specifier detected on insert node (not a patch): NSS/MM/TexturesUnlimited_NSS/REFLECTION_CONFIG[default]

REFLECTION_CONFIG[default]
{
	%enabled = true
	%interval = 1
}

Can you tell me whats wrong with it? Maybe the "@" is missing? I looked into UnofficialPatch config and found similar expression. I try to put the "@" in. :) Now I have to inform other modders of their modulemanager patch typos. 

Edited by Moofrog
Formatting, idea

Share this post


Link to post
Share on other sites
4 minutes ago, Moofrog said:

Can you tell me whats wrong with it?

You don't need that patch anymore.  Can safely delete it, or just ignore it.  TU should function fine without it.

(the setting that it enabled (reflections) is now enabled by default in recent releases)

Share this post


Link to post
Share on other sites

Ahh thats even better. I will comment it out and inform OctoSat mod creator. So that patch is outdated for all the mods who use it?

Also just this reflection patch or can the whole cfg file be deleted?

Share this post


Link to post
Share on other sites
Just now, Moofrog said:

So that patch is outdated for all the mods who use it? 

Yes.

Just now, Moofrog said:

Also just this reflection patch or can the whole cfg file be deleted?

Just that patch.  I have no idea what the 'whole cfg' contains, but it is likely the important bits in there that you will want to keep :) (you know, the bits that specify what shaders/textures to use)

Share this post


Link to post
Share on other sites
1 minute ago, Shadowmage said:

Yes.

Just that patch.  I have no idea what the 'whole cfg' contains, but it is likely the important bits in there that you will want to keep :) (you know, the bits that specify what shaders/textures to use)

Yeah glancing over it I think thats what the config is for :)

Do you know how to do pull requests on github?

Otherwise I will just open an issue on the github.

Linuxgurugamer is maintaing a lot of mods. No wonder he did oversee it.  So want to make it as easy as possible for mod maintainers to change their files. :)

Share this post


Link to post
Share on other sites
4 minutes ago, Gordon Dry said:

What could this be?

 

 

24 minutes ago, Moofrog said:

Thanks. As it turned out the shaders were not the issue.

Yeah so ModuleManager has a problem with this expression in TexturesUnlimited_NSS.cfg:


REFLECTION_CONFIG[default]
{
	%enabled = true
	%interval = 1
}

Can you tell me whats wrong with it? Maybe the "@" is missing? I looked into UnofficialPatch config and found similar expression. I try to put the "@" in. :) Now I have to inform other modders of their modulemanager patch typos. 

 

So yeah I guess the whole config needs overhauling :)

Share this post


Link to post
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.