Aelfhe1m Posted November 17, 2017 Share Posted November 17, 2017 @Electrocutor Out of curiosity I dropped your stock retextures into a heavily modded game. There seems to be a clash with some mod parts which reuse stock models with their own texturing that prevents some parts from loading. There were only 7 instances of this problem across the MANY parts in the game - mostly to do with drills. Example: Quote PartLoader: Compiling Part 'UmbraSpaceIndustries/KarbonitePlus/Parts/ORE_Drill/ORE_DRILL' (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42) PartLoader: Encountered exception during compilation. System.NullReferenceException: Object reference not set to an instance of an object at PartLoader.ReplaceTextures (UnityEngine.GameObject model, System.Collections.Generic.List`1 textureNames, System.Collections.Generic.List`1 newTextures) [0x00000] in <filename unknown>:0 at PartLoader.CompileModel (.UrlConfig cfg, .ConfigNode partCfg, Single scaleFactor, .AvailablePart partInfo) [0x00000] in <filename unknown>:0 at PartLoader.ParsePart (.UrlConfig urlConfig, .ConfigNode node) [0x00000] in <filename unknown>:0 at PartLoader+<CompileParts>c__Iterator66.MoveNext () [0x00000] in <filename unknown>:0 The Karbonite drill contains this section in its part config: MODEL { model = Squad/Parts/Resources/RadialDrill/TriBitDrill texture = TriBitDrill, UmbraSpaceIndustries/KarbonitePlus/Assets/TriBitDrill_GY scale = 2,2,2 } For the moment I can just comment out the model lines in your config that clash (or not use your mod until it's finished) but I felt it was something you should be aware of. Quote Link to comment Share on other sites More sharing options...
Van Disaster Posted November 17, 2017 Share Posted November 17, 2017 Hmm - I guess I shall stop porting my old colourizing plugin! only thing this doesn't do over everything else I was working on is let you recolour existing maps, which is just fancy shader maths & some menus. And maybe decals, I think. Quote Link to comment Share on other sites More sharing options...
Shadowmage Posted November 18, 2017 Author Share Posted November 18, 2017 1 hour ago, Van Disaster said: let you recolour existing maps, which is just fancy shader maths & some menus. And maybe decals, I think. It actually does include recoloring shaders / support, though they are intended to be used with base-gray detail textures and 3-channel area masks (up to 3 independent sections per part). Might be able to add a shader property that would control the expected base texture albedo, to allow for use of recoloring/tinting on existing parts. Sounds like a worthwhile feature to add. Decals, however, I'm much less familiar with. Sounds like a 'textures' related feature, fitting with the theme of the mod, and I would be open to some collaboration or contributions if you were so inclined. Probably more-so the functionality than including any specific resources; I would like to keep this to an API-only distribution. 2 hours ago, Aelfhe1m said: @Electrocutor Out of curiosity I dropped your stock retextures into a heavily modded game. There seems to be a clash with some mod parts which reuse stock models with their own texturing that prevents some parts from loading. There were only 7 instances of this problem across the MANY parts in the game - mostly to do with drills. Example: [...snip...] For the moment I can just comment out the model lines in your config that clash (or not use your mod until it's finished) but I felt it was something you should be aware of. Please open an issue on the TexturesUnlimited repository regarding this. It would appear to be something that will need to be handled at the plugin level, and likely not caused directly by the patches. Quote Link to comment Share on other sites More sharing options...
Electrocutor Posted November 18, 2017 Share Posted November 18, 2017 4 hours ago, Aelfhe1m said: @Electrocutor Out of curiosity I dropped your stock retextures into a heavily modded game. There seems to be a clash with some mod parts which reuse stock models with their own texturing that prevents some parts from loading. There were only 7 instances of this problem across the MANY parts in the game - mostly to do with drills. Example: The Karbonite drill contains this section in its part config: MODEL { model = Squad/Parts/Resources/RadialDrill/TriBitDrill texture = TriBitDrill, UmbraSpaceIndustries/KarbonitePlus/Assets/TriBitDrill_GY scale = 2,2,2 } For the moment I can just comment out the model lines in your config that clash (or not use your mod until it's finished) but I felt it was something you should be aware of. I've just started working on building a USI cfg for TU, so I'll probably run into this before long. If I had to make a random guess, I'd say that USI is perhaps hanging onto a material reference and TU replaces the mesh renderer's material with a new one. Quote Link to comment Share on other sites More sharing options...
Van Disaster Posted November 18, 2017 Share Posted November 18, 2017 (edited) 2 hours ago, Shadowmage said: It actually does include recoloring shaders / support, though they are intended to be used with base-gray detail textures and 3-channel area masks (up to 3 independent sections per part). Might be able to add a shader property that would control the expected base texture albedo, to allow for use of recoloring/tinting on existing parts. Sounds like a worthwhile feature to add. Decals, however, I'm much less familiar with. Sounds like a 'textures' related feature, fitting with the theme of the mod, and I would be open to some collaboration or contributions if you were so inclined. Probably more-so the functionality than including any specific resources; I would like to keep this to an API-only distribution. I knocked up a bunch of shaders involving blending based on some input - originally it was the source albedo converted to HSV, but then I did something a bit more tricky involving masked areas based on greyscale ( which is "a lot" of possible colour areas - I can't say how many because it depends on the boundaries of the greyscale map and I've also forgotten exactly what I did! ). I had some working prototypes and a plan but I was too ill to work on anything for a year, and it looks like you picked up most of what I wanted to do. My paint tinting proof of concept demo ( this was in a usable state in 1.1, had a lot of the stuff you've implemented like only applying to certain parts of the model ) and there was some work to support other types of shader. I've got the shaders around somewhere or other. Bits that matter are somewhere around 1 min onwards I think. Spoiler Decals are just other textures you paint in an area on the model - just need to scale & place, and obviously probably limited to a single map for sanity. It would probably not be like players are expecting ( ie place anywhere on the craft ) but useful for things like text or aircraft markings which don't overlap parts. Edit: I think this was a demo of one of the greyscale mask shaders - a selector for RGB channel & then colour areas dependent on greyscale level in the selected channel ( and iirc alpha mask for all of it ). There was some other stuff I wanted to check like instancing which I think would probably be good for KSP, but I'm well out of touch there. Spoiler Edited November 18, 2017 by Van Disaster Quote Link to comment Share on other sites More sharing options...
vossiewulf Posted November 19, 2017 Share Posted November 19, 2017 23 hours ago, Van Disaster said: I knocked up a bunch of shaders involving blending based on some input - originally it was the source albedo converted to HSV, but then I did something a bit more tricky involving masked areas based on greyscale ( which is "a lot" of possible colour areas - I can't say how many because it depends on the boundaries of the greyscale map and I've also forgotten exactly what I did! ). I had some working prototypes and a plan but I was too ill to work on anything for a year, and it looks like you picked up most of what I wanted to do. My paint tinting proof of concept demo ( this was in a usable state in 1.1, had a lot of the stuff you've implemented like only applying to certain parts of the model ) and there was some work to support other types of shader. I've got the shaders around somewhere or other. Bits that matter are somewhere around 1 min onwards I think. Reveal hidden contents Decals are just other textures you paint in an area on the model - just need to scale & place, and obviously probably limited to a single map for sanity. It would probably not be like players are expecting ( ie place anywhere on the craft ) but useful for things like text or aircraft markings which don't overlap parts. Edit: I think this was a demo of one of the greyscale mask shaders - a selector for RGB channel & then colour areas dependent on greyscale level in the selected channel ( and iirc alpha mask for all of it ). There was some other stuff I wanted to check like instancing which I think would probably be good for KSP, but I'm well out of touch there. Reveal hidden contents That's some nice and interesting work also. Quote Link to comment Share on other sites More sharing options...
Shadowmage Posted November 20, 2017 Author Share Posted November 20, 2017 Updated release is available: https://github.com/shadowmage45/TexturesUnlimited/releases/tag/0.9.0.3 Adds some additional shader properties, cleans up compatibility with the stock texture-replacement function on empty texture slots, and includes a new SubSurfaceScattering based solar panel shader. Should be fully backwards compatible (e.g. should not break anything if updated in place). Quote Link to comment Share on other sites More sharing options...
HebaruSan Posted November 20, 2017 Share Posted November 20, 2017 Mind if we add this to CKAN? You've already got one dependent mod trying to bundle this one, and there will probably be more before long. It would be cleaner to have one standalone entry they can all depend on. Quote Link to comment Share on other sites More sharing options...
Agustin Posted November 20, 2017 Share Posted November 20, 2017 (edited) I am not puting anything on the end of my ksp exe to change the driver to gl 11 or anything. I am seeing everything okay... So I don't understand the warning in the OP. This is amazing and my mid end pc doesn't even blink with this installed. Ksp is looking much nicer every day... Now I want a new graphics card for that clouds.... ( although I play with them installed anyways but low fps ) Anyway, Just want to pass by and say thank you so much for sharing this with everyone this is unbelievable. I really am super excited to play with this much level of inmersion in my KSP universe... Edited November 20, 2017 by Agustin Quote Link to comment Share on other sites More sharing options...
Electrocutor Posted November 20, 2017 Share Posted November 20, 2017 With the new version, the stock cfg no longer needs any helper textures. You can just drop this cfg anywhere in the GameData folder and it'll work. https://drive.google.com/open?id=1QGANnsrxPjq4tIpKjCsuFbFjv9F1rml5 Quote Link to comment Share on other sites More sharing options...
beelzerob Posted November 20, 2017 Share Posted November 20, 2017 I'm happy about anything that makes loading renderers and shaders easier. I'm sure it was obvious to most others, but I frequently had a hard time figuring out exactly what was supposed to be loaded to get me beautiful looking environments and shading. Quote Link to comment Share on other sites More sharing options...
Mecripp Posted November 20, 2017 Share Posted November 20, 2017 Gratz @Shadowmage on making StarMods Quote Link to comment Share on other sites More sharing options...
Shadowmage Posted November 20, 2017 Author Share Posted November 20, 2017 14 hours ago, HebaruSan said: Mind if we add this to CKAN? You've already got one dependent mod trying to bundle this one, and there will probably be more before long. It would be cleaner to have one standalone entry they can all depend on. Sounds like a good idea for this mod, being an API and all. Kind of important that others can bundle it correctly. Please let me know if there is anything I need to do on this end. Quote Link to comment Share on other sites More sharing options...
kendoka15 Posted November 20, 2017 Share Posted November 20, 2017 Just saw this mod on the KSP blog, amazing work Quote Link to comment Share on other sites More sharing options...
Agustin Posted November 20, 2017 Share Posted November 20, 2017 (edited) In the spirit of collaboration, may I ask why my solar panel's reflections seem to be in the opposite direction? It should reflect the dark of the night, or maybe even better the stars behind.... Maybe it's a known limitation, or planned fix, or maybe my installation is broken, or ultimately I just found a glitch... You know, it's upside down or something... The dark side of the sky is reflected when I look fro below: BHasically reflections see to be upside down in my modded install.. Edited November 21, 2017 by Agustin Quote Link to comment Share on other sites More sharing options...
sardia Posted November 21, 2017 Share Posted November 21, 2017 This isn't a rival to textureReplacerReplaced right? Quote Link to comment Share on other sites More sharing options...
Shadowmage Posted November 21, 2017 Author Share Posted November 21, 2017 6 hours ago, Agustin said: In the spirit of collaboration, may I ask why my solar panel's reflections seem to be in the opposite direction? It should reflect the dark of the night, or maybe even better the stars behind.... Maybe it's a known limitation, or planned fix, or maybe my installation is broken, or ultimately I just found a glitch... You know, it's upside down or something... The dark side of the sky is reflected when I look fro below: BHasically reflections see to be upside down in my modded install.. Would likely be related to the normals. However, I did not create the stock patches, so no idea what is being applied to them or how. Is it all reflections, or just those on the solar panels? 42 minutes ago, sardia said: This isn't a rival to textureReplacerReplaced right? Define 'rival'? Different intended purposes, but with perhaps some feature overlap. This mod adds PBR shaders and methods to replace textures. The shaders happen to support reflections along with a ton of other features. TRR offers skybox and visor texture replacement, which this mod does not. Quote Link to comment Share on other sites More sharing options...
Agustin Posted November 21, 2017 Share Posted November 21, 2017 (edited) It is all reflections, not only those solar panels. they are big and plane, so they are easy to see what's going on I guess Edited November 21, 2017 by Agustin Quote Link to comment Share on other sites More sharing options...
Kablob Posted November 21, 2017 Share Posted November 21, 2017 9 hours ago, sardia said: This isn't a rival to textureReplacerReplaced right? I mean, you could have read the OP and seen that they do completely different things... Quote Link to comment Share on other sites More sharing options...
Electrocutor Posted November 21, 2017 Share Posted November 21, 2017 8 hours ago, Shadowmage said: Would likely be related to the normals. However, I did not create the stock patches, so no idea what is being applied to them or how. Is it all reflections, or just those on the solar panels? The normals would only be light vector, and you can't make the blue channel be negative, only red and green. Regardless of whether Squad made the normals correctly or not for the panels, it should not be showing the inverse plane. Perhaps this is related to the bug that removes the skybox? Quote Link to comment Share on other sites More sharing options...
Shadowmage Posted November 21, 2017 Author Share Posted November 21, 2017 1 hour ago, Electrocutor said: The normals would only be light vector, and you can't make the blue channel be negative, only red and green. Regardless of whether Squad made the normals correctly or not for the panels, it should not be showing the inverse plane. Perhaps this is related to the bug that removes the skybox? I'm pretty sure you can get the normals to face backwards through a normal map. RGB = 0.5, 0.5, 0 would be a vector with components 0, 0, -1. Whether Unity supports this or not is unknown, as it does some weird swizzling with its normal maps. Which is why I was asking if it was all parts or just the solar panels. I should have been more specific -- I need to know if the 'backwards reflection' problem exists on a stock part that actually has a real NRM texture, or if it is just on those parts using the run-time provided (which I could have specified incorrectly, not sure what Unity expects at runtime). More to the point, I do not see this problem on SSTU's parts that all use their own proper normal maps. The reflections all point the proper direction. If you assign a proper (flat) NRM map to those solar panels does the problem exist? (this is what I really need answered; will tell me if it is a problem with the mesh, the textures, or a more far-reaching problem with the refl. calculations) Quote Link to comment Share on other sites More sharing options...
Shadowmage Posted November 21, 2017 Author Share Posted November 21, 2017 (edited) Very strange... when I try the solar panel parts in my install there are no issues -- the reflection direction is properly set. This is using the 'stock patches' from earlier in the week though. Going to try updating to the latest to see if it might be something there. Properly reflecting the sun, right where it should be: Properly reflecting Kerbin, also right where it should be: Edit: One more idea to try. @Agustin appears to be running DX9, and it would absolutely not surprise me if had issues other than the mip-map/cubemap blurring problems.. Edit2: No change under DX9 with any of the stock solar panels. All appear to reflect the proper directions, regardless of orbit altitude or inclination. @Agustin is that an otherwise stock craft file that you could share? (any part-mods used on it?) Edited November 21, 2017 by Shadowmage Quote Link to comment Share on other sites More sharing options...
Electrocutor Posted November 21, 2017 Share Posted November 21, 2017 (edited) The new transparency PBR shader works well. I've set it up on @RoverDude's Life Support pods that have transparent domes. The Viewing Cupola actually has an armchair inside. Edited November 21, 2017 by Electrocutor Quote Link to comment Share on other sites More sharing options...
Shadowmage Posted November 21, 2017 Author Share Posted November 21, 2017 @Electrocutor Very nice. Glad that shader is working, as I completely forgot to do any testing on it. Something I'll still have to look into will be adding support for texture replacement for IVA use (props, base IVA model, etc). Might work as-is, but have never tried it... Quote Link to comment Share on other sites More sharing options...
Electrocutor Posted November 22, 2017 Share Posted November 22, 2017 2 hours ago, Shadowmage said: @Electrocutor Very nice. Glad that shader is working, as I completely forgot to do any testing on it. Something I'll still have to look into will be adding support for texture replacement for IVA use (props, base IVA model, etc). Might work as-is, but have never tried it... The IVA is actually much easier because IVA uses a fake sun (Unity light source) so you don't have to worry about pulling in the fake lights from PQS. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.