Jump to content

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


Shadowmage

Recommended Posts

[AddonLoader]: Instantiating addon 'TexturesUnlimitedDebug' from assembly 'TexturesUnlimited'
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

Uploading Crash Report
NullReferenceException: Object reference not set to an instance of an object
  at KSP.UI.Screens.ApplicationLauncher.RemoveModApplication (KSP.UI.Screens.ApplicationLauncherButton button) [0x00029] in <cd473063d3a2482f8d93d388d0c95035>:0
  at KSPShaderTools.Addon.TexturesUnlimitedDebug.Awake () [0x000b9] in <d05d146f0f32458d9a30cf17e61f35a8>:0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
UnityEngine.GameObject:Internal_AddComponentWithType(Type)
UnityEngine.GameObject:AddComponent(Type)
AddonLoader:StartAddon(LoadedAssembly, Type, KSPAddon, Startup)
AddonLoader:StartAddons(Startup)
AddonLoader:OnLevelLoaded(GameScenes)
AddonLoader:OnSceneLoaded(Scene, LoadSceneMode)
UnityEngine.SceneManagement.SceneManager:Internal_SceneLoaded(Scene, LoadSceneMode)

Textures unlimited throws this up in the log file when I place the "LV-T91 Cheetah" engine"

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
On 12/9/2021 at 5:37 AM, Grunf911 said:

Hi,

I have the following issue with James Webb.

When i build it in VAB, all looks good, however when i take it out the mirror and all else is black. Here is what it looks like:

 

 

You could have reflections turned off in the game settings or you may need planetshine to make it look how you think it should.

Link to comment
Share on other sites

  • 2 months later...
On 8/1/2021 at 7:58 AM, Bob’sCousin said:

So I installed this mod and Procedural Parts, and I encountered a problem, the paint will work in the VAB/Hanger however when you launch it disappears 

  Hide contents

KmYIPxI.png

  Hide contents

vNmGZru.png

 

Did you find a workaround? This one is frustrating to track down and I'm not having much luck. 

Link to comment
Share on other sites

  • 2 months later...

Sorry if this has been asked time and time again, i'm newly back to KSP heavy modding and its hard to keep track of which mods / addons are updated and which are 3 years old and shouldnt even be attempted :D

I'm of course running Textures Unlimited, and this Recolor mod.
Now, i'm looking for where i can find compatible recolors for the NearFutureTech mods (liquid hydrogen/methane engines, the other parts), as well as some fuel tanks that i *think* are stock but arent supported in this recolor (the fuel adapters and the mid-sized tanks).

I'm running these versions;
TexturesUnlimited-1.5.10.25
TU_Stock Recolour_v0_3_10
TU_pWingsB9_v0_1_0

I'm looking for recolor mods for these;
NearFuture (all packs)
FarFutureTechnologies_1_2_0
SCANsat-v20.4
Pathfinder-1.38.0
KerbalAtomics_1_3_3
DMagic_Orbital_Science-1.4.3

Do those exist or is it just a case of, nobody has put in the work on making those mods compatible yet (understandable given the amount)?
Thanks, sorry for just splashing a big list, ive searched in google but found very sporadic extremely old / incomplete packs. 

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

h i there ,

i have a little visual problem with the control surfaces when its shape is set to "rounded". see picture https://1drv.ms/u/s!Am0PDmGqv17_hKpdF2TZHArDG0HCdw?e=vTQLhv

and i can't even recolor it.

any idea how to fix that?

my latest  logs are available here => https://1drv.ms/u/s!Am0PDmGqv17_hKpOqPRyuaODwZc86w?e=nYPNsn

greets

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...

I've been trying to figure out why this is happening but whenever I have this mod installed, all of my stock command pods and cockpits windows become opaque in IVA, which makes IVA much less playable than I'd like. I've been able to definitively isolate it to TexturesUnlimited but I'm not willing to just remove the mod, I'd like to, if possible, figure out how to fix the windows but keep TU installed. Thanks in advance for anyone who knows what steps I should start to take. Here's an example image to describe what I'm experiencing, this is the Cupola module facing upwards on the launchpad at midday.

Link to comment
Share on other sites

10 hours ago, devoured.by.incandescence said:

I've been trying to figure out why this is happening but whenever I have this mod installed, all of my stock command pods and cockpits windows become opaque in IVA, which makes IVA much less playable than I'd like. I've been able to definitively isolate it to TexturesUnlimited but I'm not willing to just remove the mod, I'd like to, if possible, figure out how to fix the windows but keep TU installed. Thanks in advance for anyone who knows what steps I should start to take. Here's an example image to describe what I'm experiencing, this is the Cupola module facing upwards on the launchpad at midday.

Can you post your modlist please? It's probably a problem with another mod.

Link to comment
Share on other sites

10 hours ago, devoured.by.incandescence said:

I've been trying to figure out why this is happening but whenever I have this mod installed, all of my stock command pods and cockpits windows become opaque in IVA, which makes IVA much less playable than I'd like. I've been able to definitively isolate it to TexturesUnlimited but I'm not willing to just remove the mod, I'd like to, if possible, figure out how to fix the windows but keep TU installed. Thanks in advance for anyone who knows what steps I should start to take. Here's an example image to describe what I'm experiencing, this is the Cupola module facing upwards on the launchpad at midday.

Check you TU cfg/s and comment the entries that have "internal" or "spaces" in them, for example

// model = Squad/Spaces/Mk2CrewCabinInternal/MK2_CrewCab_Int

Hope this helps

Link to comment
Share on other sites

  • 2 months later...

I used to have the shiny textures.

now, it doesn't work.

I also never had the option to change the colors of items.

I deleted all my mods awhile back since i had so many that I didn't use. I then, redownloaded TU and it doesn't work anymore.. I've tried uninstalling and reinstalling and still hasn't worked in months. 

 

 

could someone help.. PLEASE :(

Link to comment
Share on other sites

  • 3 months later...

@Shadowmage 2 questions: How does one get a list or see what meshes are on a specific part? Like say if i wanted to put a shader only on a specific mesh not the whole part? Where do i find out what meshes are on the part and their names or whatever?

and what is the format for color property when using with sstu/pbr/metallic?   float = xxxxx? what? RGB?

Link to comment
Share on other sites

On 3/6/2023 at 6:22 AM, Astra Infinitum said:

@Shadowmage 2 questions: How does one get a list or see what meshes are on a specific part? Like say if i wanted to put a shader only on a specific mesh not the whole part? Where do i find out what meshes are on the part and their names or whatever?

and what is the format for color property when using with sstu/pbr/metallic?   float = xxxxx? what? RGB?

To see the meshes I would import the model into blender using the .mu plugin.  Alternatively, I believe at one point I had some debug tools in TU/TUFX that would dump mesh names for precisely that purpose, but haven't played with the mod or code in so long, I can't say for certain, or if it was exposed in the in-game utils or needed to be recompiled with debugging enabled.

Those float properties are likely referencing single-attribute values such as 'metallic' property, where the input is in the expected range of 0...1.  You can see a use-case example here in the project repository:
https://github.com/shadowmage45/TexturesUnlimited/blob/master/TU-Examples/TU_StockPartFix.cfg#L26

There it is being used to set the 'smoothness' value for the shader.

Link to comment
Share on other sites

 

On 3/9/2023 at 2:51 PM, Shadowmage said:

To see the meshes I would import the model into blender using the .mu plugin.  Alternatively, I believe at one point I had some debug tools in TU/TUFX that would dump mesh names for precisely that purpose, but haven't played with the mod or code in so long, I can't say for certain, or if it was exposed in the in-game utils or needed to be recompiled with debugging enabled.

Those float properties are likely referencing single-attribute values such as 'metallic' property, where the input is in the expected range of 0...1.  You can see a use-case example here in the project repository:
https://github.com/shadowmage45/TexturesUnlimited/blob/master/TU-Examples/TU_StockPartFix.cfg#L26

There it is being used to set the 'smoothness' value for the shader.

Thank you for the reply. i may have quoted to wrong shader, i was just trying to figure out basically how to make the metallic shader show as a copper color.  i have done it before in the past for configs i made for NF Spacecraft capsules but completely forgot what i used or how i went about it. I know i used the metallic and something to change the color but i dont remember what i added to config to change color. What would i use to do that?

On 11/25/2022 at 4:57 PM, das_boo said:

I used to have the shiny textures.

now, it doesn't work.

I also never had the option to change the colors of items.

I deleted all my mods awhile back since i had so many that I didn't use. I then, redownloaded TU and it doesn't work anymore.. I've tried uninstalling and reinstalling and still hasn't worked in months. 

 

 

could someone help.. PLEASE :(

You probably had TU  installed along with a config file somewhere in your GameData. Idk if you made it yourself or downloaded one from sonmewhere but if you want a stock config for the shiny parts they have one for stock parts for download on SpaceDockl.

 

If you want the option to change colors for certain parts and part packs you'll need to download and install TURD (Textures Unlimited Recolor Depot) along with TU.

TURD is here and has download links (google drive) to different config packs created. Stock, Mk2, Mk3, Mk4 Spaceplane, OPT spaceplane, APP (Airplanes Plus), OG B9 wings, and newer b9 wings, configs are listed and available for download. It allows you to change colors for details on many parts for each of the parts packs listed
 

 

Link to comment
Share on other sites

  • 2 weeks later...

I am getting major lag in the VAB any time I add a part or change something in the PAW, and when it happens this error is spit out in the log:

ERROR: Could not locate TextureSet for MODEL_SHADER from global cache for the input name of: 

From what I've gathered from a google search for this error, this is related to Textures Unlimited.  Anyone have any idea what's causing it, or better yet how to stop it?  It's making the game intolerable to play, doing anything in the VAB takes 5x+ longer than it should because I have to wait for this lag spike to end.  I really don't want to have to scrap this playthrough or uninstall TU, but I don't see how I can continue when I can't even build a rocket without having to wait 3 seconds every time I add/remove a part or touch anything in the PAW.

Here is a link to the full KSP log.

Edit:

Just to give more info, some troubleshooting steps I've tried:

1.  Used VSCode to search for MODEL_SHADER in gamedata folder.  References to modulemanager.configcache, Shaddy, and SSTU.  Deleted modulemanager.configcache to let it rebuild.  No joy.  Tried removing Shaddy since it has TU configs for restock solars and they were on the craft in question when the lag hit.  No joy.  
2.  Searched for TexturesUnlimited in gamedata with VSCode.  Found this:

Spoiler

E8P2S2o.png

3.  Created a new KSP install with TU, the above listed mods and their dependencies to see if I could reproduce the error.  No Luck.

I'm at a total loss.  Also pretty bummed out about it.  My save was going so well, and I'm really happy with the selection of mods that I have installed, with no urges to add or remove anything.  I didn't notice this problem before today, I suppose it's possible that it was lurking in the background and I only noticed it today, but I can't think of anything that I've changed that would have made this present itself today.   The only change that I made was switching my colonization parts from Pathfinder to USI-MKS since I'm about to build a Minmus base and decided to go with what I'm familiar with instead of trying to learn a whole new colonization thing.  I don't think either of those mods even interact with TU in any way to my knowledge. 

 I can't say that I've experienced *no* VAB lag in this save, but this is an exceptional amount of lag and it appears to have come out of nowhere. It's basically unplayable and I don't know what to do now.  Seriously, any help is appreciated, even if it's just pointing me in the direction of something I may have overlooked in my modlist (which is in the KSP.Log)

Edited by DeliriumTrigger
Link to comment
Share on other sites

Re: my last post.   I would just edit that, but I'm gonna bump for visibility in case anyone else has the mods in question installed and feels like checking to see if this is just a issue with my particular install or affecting everyone.

After trying all the stuff above and taking a break to let the problem simmer, and noticing that the error wasn't firing with a new craft, I decided to rebuild the craft that was throwing the error from scratch with the console open and wait for the error to show up.   This narrowed down the problem to Procedural Fairings and TU, but strangely enough, only the fairing bases.  The bases have their default light and dark coloration, and then a TU recolor option.  With the default colorations, once the base is placed, the error will fire every time I update a part.  Doesn't matter if its adding or removing a part, changing the size of a procedural tank, adjusting the height of a decoupler shroud, or changing the contents of a tank.  Every interaction with the craft throws that error and has a massive lag spike associated with it.

If I switch to the TU recolor option, the error (and the lag) goes away.

I'm not sure whether this is a TU problem, a Procedural Fairings problem, or a "screw this guy in particular" problem.   The fairing base seems to cause TU to throw the error, but I'm not sure whether the massive lag part of it is PF or TU or just my particular assortment of mods.  So I will leave that for you @Shadowmage and  @pap1723 to sort out.    If either of you need more info from me just ask, happy to provide.  In the meantime I'll just have to remember to recolor my fairing bases.
 

Link to comment
Share on other sites

Ok back with another update.  Don't go on some crazy bug hunt, thanks to the unity profiler and JonnyOThan we figured out that the performance problem had nothing to do with texture switching and everything to do with re-rooting my craft to a procedural part.  It was just incidental that every time I added a part or changed something in the PAW, KSP was creating and destroying a copy of the entire craft, and the TU error would fire.   

Link to comment
Share on other sites

  • 2 months later...

Hello, found a visual bug with the new Eve clouds

 

Why does this happen?

CLOUDS
As u can see, there are not clouds in the reflections at ground altitude. Ground elements are reflected correctly.
3aNLk6s.png
85.000m
OUVca5G.png
120.000m

7YVFYNK.png

Noticed that in this distance, kerbin does a fast flickering when moving camera, which is possible to be related.
160.000m? This last less than a seconds (i think it's reloading kerbin textures, but not sure why)
lmWywon.png
159.993m (camera near planet)
CDu0ok3.png
159.993m (camera far from planet, no reflections)

Q9ZOZuY.png

200.000m (all good)

chLfSNS.png

 

Its the same behaviour that you have on helmets... the problem is that the game updates the 3D layer into 2D layer and reflection only works with 2D layer, but i'm guessing, im noob. i'm using chrome colour on TURD. Also the update reflection of the helmet is much slower, i did changes on @default.cfg (reflection resolution and interval) with no luck, any help?

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