Jump to content

[1.3.1]TextureReplacerReplaced v0.5.4


HaArLiNsH

Recommended Posts

TextureReplacerReplaced v0.5.4 aka TRR

Kerbal and suits personalisation, texture replacement and reflections.

This is the continuation of TextureReplacer.

 

31586173-e980b41e-b1cd-11e7-9ec5-d35d829

 

TextureReplacerReplaced is a plugin for Kerbal Space Program that allows you to replace stock textures and customise your Kerbals. . More specifically, it can:

  • replace stock textures with custom ones,
  • assign personalized head and suit textures for each Kerbal,
  • assign suits based on class and experience level,
  • configure the elements of the heads and suits,
  • toggle between 3 suits : Iva , Eva Ground, Eva Space ,
  • add reflections to parts and helmet visors,
  • generate missing mipmaps for PNG and JPEG model textures,
  • compress uncompressed textures from `GameData/` to shrink textures in VRAM,
  • unload textures from RAM after KSP finishes loading to reduce RAM usage and
  • change bilinear texture filter to trilinear to improve mipmap quality.

Special thanks to

  • Shaw for making TextureReplacer in the first place, You rock man !
  • RangeMachine who kept this mod alive,
  • rbray89 who contributed a reflective visor shader and for [thread=59005]Active Texture Management[/thread] and [thread=55905]Visual Enhancements[/thread] where some code has been borrowed from,
  • Tingle for [thread=44135]Universe Replacer[/thread]; studying his code helped me a lot while developing this plugin,
  • taniwha for [thread=99018]KerbalStats[/thread] that was optionally used by this plugin for gender determination and role-based suit assignment,
  • Razchek and Starwaster for [thread=70089]Reflection Plugin[/thread] where I learnt how to implement reflections,
  • sarbian for fixing an issue with non-mupliple-of-4 texture dimensions,
  • therealcrow999 for testing and benchmarking this plugin,
  • Ippo343 for contributing KSP-AVC configuration,
  • JPLRepo for contributing DeepFreeze compatibility fixes,
  • Proot, Scart91, Green Skull and many others for creating texture packs and
  • Sylith and Scart91 for giving others permissions to make derivatives of their texture packs,
  • Sigma88 for his contribution on the MM compatibility and the new folder system,
  • Ger_space for his brilliant work on the shader system,
  • ThirdOfSeven for his help fixing the shaders on Linux and MacOs.

Links

TextureReplacerReplaced :

You can find an empty premade folder for your custom textures here .

 

TRR_guide (a collection of textures to learn of to use TRR and make your own textures) :

28243115-85ee9c00-69bf-11e7-9a12-32a4f42

WHBcjZA.gif

 

Important note :

The navball texture replacement is disabled.
You can use Navball Texture Changer to change your navball.

Recommended Mods

WindowShine

 

Texture Packs

Galenmacil_Skybox

The Horsehead Nebula - 4K Skybox

 

Diverse Kerbal Heads

Human Colored Heads Recolored

 

Cetera's Suits for TextureReplacerReplaced

Araym's Stock-alike Advanced Suits

 

Fix for others mods

Reflections for FASA   (Thanks to @Mecripp )

Instructions

Look at the Readme of the source's Readme for detailed explanations.

 

Important Stuff

If you had Texture Replacer (TR) installed, uninstall it before using TRR. Its not recommended to use both TR and TRR. 

TRR is provided with mandatory default textures.

DON'T REMOVE THEM except for these 4 if you don't like them:

  • Suit_Iva_Veteran_Default : this the veteran version of the IVA suit
  • Suit_EvaSpace_Veteran_Default : this the veteran version of the EVAground suit
  • Suit_EvaGround_Veteran_Default : this the veteran version of the EVAspace suit
  • logoFullRed_alt : this is the custom logo at the main menu

You can still replace these textures as you did before with Texture Replacer, but if you remove them , your game WILL crash.

It is now recommended that you use a different folder than TRR for your custom textures

WITH A PREFIX CALLED   "TRR"   like "TRR_MyTextureMod"

(or at least one that goes alphabetically after "Squad" and "TextureReplacerReplaced")

You can find an empty premade here

You just have to make 3 steps to make it ready for you :

Change the name "TRR_MyTextureMod" by the one you want,

  • Of the folder that goes in GameData/
  • Of the file TRR_MyTextureMod.cfg
  • Inside the .cfg

You can make this "TRR_MyTextureMod.cfg" also by yourself, make a TRR_MyTextureMod.txt file and rename it TRR_MyTextureMod.cfg and put this inside :

TextureReplacerReplaced
{
Folders
{
	Default = TRR_MyTextureMod/Default/
	EnvMap = TRR_MyTextureMod/EnvMap/
	Heads = TRR_MyTextureMod/Heads/
	Suits = TRR_MyTextureMod/Suits/		
}
}

General Suit settings

Your kerbals have now 3 suits that are used generally this way :

  • IVA : Used inside vehicle and outside of vehicle, on the ground, with atmosphere
  • EVA Ground : Used outside of vehicle, on the ground, without atmosphere
  • EVA Space : Used outside of Vehicle, in Space

You can assign one of these suits (and their elements, suit,helmet,visor and jetpack) for each of these situations :

  • EVAground Atmo : Out Of Vehicle, On the Ground, With Atmosphere,
  • EVAground NoAtmo : Out Of Vehicle, On the Ground, Without Atmosphere,
  • EVAspace : Out Of Vehicle, In Space,
  • IVA Safe : In Vehicle, Safe (landed or in orbit),
  • IVA Unsafe : In Vehicle, UnSafe (flying)

You can also configure the color and the reflection color of the 3 visors. This setting will affect how your visor custom texture will appear. TRR is provided with 3 visor textures with different transparency level

  • IVA : grey 40% (clear but you still see the reflections)
  • EVAground : grey 70% (mid clear)
  • EVAspace : grey 85% (nearly not clear , you can still see the head)

The EVAspace visor is colored in yellow by default. Don't forget to change the base color if you use a custom texture.

All of this can be changed in the new in-game menus :)

Head Set

Head textures reside inside a directory inside either Heads/Male/ or Heads/Female/ directory. Each head set must reside inside its own directory:

GameData/TRR_MyTextureMod/Heads/Male/				// for the male heads
GameData/TRR_MyTextureMod/Heads/Female/			// for the female heads
  MyTextureModMaleHead1/								// the custom folder for your head set
			HeadTexture0										//	The texture for the head at level 0 (mandatory)
			HeadTexture1										//	The texture for the head at level 1
			HeadTexture2										//	The texture for the head at level 2
			HeadTexture3										//	The texture for the head at level 3
			HeadTexture4										//	The texture for the head at level 4
			HeadTexture5										//	The texture for the head at level 5
			
			HeadTextureNRM0									//	The normal map for the head at level 0 (mandatory)
			HeadTextureNRM1									//	The normal map for the head at level 1
			HeadTextureNRM2									//	The normal map for the head at level 2
			HeadTextureNRM3									//	The normal map for the head at level 3
			HeadTextureNRM4									//	The normal map for the head at level 4
			HeadTextureNRM5									//	The normal map for the head at level 5

Suit Set

Suit textures reside inside a directory and their name are not the same as the ones you use to replace the default textures. You can make variants for the level, the gender and the veteran, badass, veteran badass status of each elements and their normal maps Each suit set must reside inside its own directory. You can find the full list in the source's Readme.

KNOW ISSUES

  • STATIC reflections are not recommended.
  • Resetting a suit in the visor menu or in the suit menu will reset it for both.
  • You need to get out/get in the vehicle or reload the scene to see the change in the IVA_safe and IVA_unsafe situation.
  • female teeth texture use only the one from the 'DEFAULT_MALE', the male use the head's texture normally.
  • the 'lvlToHide_TeethUp' setting works for both teeth for the male and normally for the female.
  • the 'lvlToHide_TeethDown' setting don't work for the male and work normally for the female.
  • the 'lvlToHide_Ponytail' don't work for the male (obviously).
  • When in EVAground Atmo, you can switch the suit status to the 3 situations (EVAground Atmo, ,EVAground NoAtmo, ,EVAspace), when in EVAground NoAtmo, you can switch to 2 situations (EVAground, EVAspace) and you can't switch when in EVAspace.
  • Because of the bug of the jetpack flags being displaced from the mesh, I disabled them.
  • REAL reflections don't work on Linux and Mac, you will have a pink visor, the shader seems to have a problem with OpenGL.
  • You need to name you custom folder with a name that goes alphabetically AFTER "Squad" and "TextureReplacerReplaced". (I suggest "TRR_" as prefix for only texture mods). If you don't, the textures that loads in the "Squad" (the parts textures) and "TextureReplacerReplaced" (the new head and suits default texture) folder will load after yours and thus, override your custom texture.

Licence

Copyright © 2013-2017 Davorin Učakar, Ryan Bray, RangeMachine, HaArliNsH

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

 

 

Edited by HaArLiNsH
Link to comment
Share on other sites

Already new ideas and pull request, man thx for the help. 

Just be aware I'm new to github on the dev-side, I've used all your mods for ages but I will need a little time to adapt and improve :) 

And as we have a working version on TextureReplacer for the 1.3, we don't need to rush. 

@linuxgurugamer : I'll wait until we have a stabilized version with MM compatibility, an accepted format to use TRR with the others mods and textures pack and I'm sure that there will be others things that seems to be waiting since a long time, before I put this on CKAN. Lets avoid a lot of double work. Thx for the help, I'll need it in time.

On 09/06/2017 at 9:09 PM, Ger_space said:

OK, here we go:

Download Link for 1.2.2 and 1.3 and the compiled shader package.

my Source repository for TR:

https://github.com/GER-Space/TextureReplacer

my shaders and some test plugin for the shader-loader: (sources)
https://github.com/GER-Space/KSP-NGShader

 

@Avera9eJoe you need to search and replace the shader entry in the windowshine config with "ShaderNG/TR_Reflective_Emissive_Alpha"  Feel free to include the shaders.ksp into window shine.

 

I have no Idea if Linux or MacOS users will have some luck with the shaders, as I saw only directx entries, when they where exported. Sorry about that, but I have no idea how to change that. 

@Ger_space : Could you make a pull request for this on the new github? and also explain me a bit how this work ? I've seen these shader files but I don't see how you do them as it seems to not being directly linked to my sources and I don't really understand what they do :) 

@Avera9eJoe : I've just learned that TR was linked with your mod, so there are great chances that I've broke something. Can you tell me if everything goes right before we try to merge the new code from Ger_space ?

Link to comment
Share on other sites

This is fantastic Haar! I look forwards to what this brings forwards :)

 

9 hours ago, HaArLiNsH said:

Already new ideas and pull request, man thx for the help. 

Just be aware I'm new to github on the dev-side, I've used all your mods for ages but I will need a little time to adapt and improve :) 

And as we have a working version on TextureReplacer for the 1.3, we don't need to rush. 

@linuxgurugamer : I'll wait until we have a stabilized version with MM compatibility, an accepted format to use TRR with the others mods and textures pack and I'm sure that there will be others things that seems to be waiting since a long time, before I put this on CKAN. Lets avoid a lot of double work. Thx for the help, I'll need it in time.

@Ger_space : Could you make a pull request for this on the new github? and also explain me a bit how this work ? I've seen these shader files but I don't see how you do them as it seems to not being directly linked to my sources and I don't really understand what they do :) 

@Avera9eJoe : I've just learned that TR was linked with your mod, so there are great chances that I've broke something. Can you tell me if everything goes right before we try to merge the new code from Ger_space ?

Yeah... I've been trying to get it working all morning... XD kidding :P I fiddled with it for around 10 minutes with no luck

WindowShine works with RangeMachine's v2.5.4 in KSP v1.2.2 but I haven't delved at all into 1.3 yet. I've been busy working on Spectra (And animation finals) and haven't had the time.

Edited by Avera9eJoe
Link to comment
Share on other sites

7 minutes ago, CarnageINC said:

Okay, for now I'll start on the rough listing of TR mods.  Real life demands my attention for a few days so the rough draft will not be done till around Wed.-Thur.  From there I can adjust to the format you think is best, just let me know how you want it done and when you need it and I'll PM you and @Gaarst the info.

Don't stress you out, we have time and I have the feeling that we gonna need to fix older TR mods/packs by at least adding a cfg to them and repost them and this will impact the list. And all of this needs the MM compatibility first :)

 

This make me think that this MM thing could be a solution for one problem I have in the modifications I was working on to improve the suit states. :0.0:

 

Link to comment
Share on other sites

17 minutes ago, HaArLiNsH said:

And all of this needs the MM compatibility first :)

just to be clear, MM is not really needed to load textures from other folders. TR already supports that.

the only issue being that the cfgs used to tell TR which folders look into cannot be edited via mm, they need to be written correctly in the file

 

(and with my PR, that issue has been fixed as well - meaning that now you can even edit the cfgs using mm)

Link to comment
Share on other sites

8 minutes ago, Sigma88 said:

just to be clear, MM is not really needed to load textures from other folders. TR already supports that.

the only issue being that the cfgs used to tell TR which folders look into cannot be edited via mm, they need to be written correctly in the file

 

(and with my PR, that issue has been fixed as well - meaning that now you can even edit the cfgs using mm)

Can you provide me a sample with, for example, a head texture or anything else and the proper cfg file needed so it work with your PR ? This way I would see more clearly how it work and also make new instructions to use TRR. 

Link to comment
Share on other sites

3 minutes ago, HaArLiNsH said:

Can you provide me a sample with, for example, a head texture or anything else and the proper cfg file needed so it work with your PR ? This way I would see more clearly how it work and also make new instructions to use TRR. 

there's a comment in the PR with an example

it uses the same syntax used by TR, the only difference is that now you can use MM patch to change the content of the cfg files instead of having to manually edit them

https://github.com/HaArLiNsH/TextureReplacerReplaced/pull/1#issuecomment-307576093

Edited by Sigma88
Link to comment
Share on other sites

8 hours ago, HaArLiNsH said:

@Ger_space : Could you make a pull request for this on the new github? and also explain me a bit how this work ? I've seen these shader files but I don't see how you do them as it seems to not being directly linked to my sources and I don't really understand what they do :) 

I'll make a new PR later on. 

Link to comment
Share on other sites

1 hour ago, s411532d said:

I have a question. Every time i try to go on EVA after installing this mod my game crashes, is there anyway to fix this?

I need you to check some things to see what's going wrong.

First you need to uninstal the old TextureReplacer and anything that could be related with, if both are there it will crash.

Then, are you using KSP 1.3 ?  Because I don't think this one will work for older release of KSP.

Lastly, as I've just checked this release on a fresh install and it seems to work for me, can you tell me if it crash when EVA in space or on the ground ? I ask because for now I've only tried to EVA on the launchpad and maybe the problem could come from there (which I doubt but one never knows..)

Also are you using another mod that use TextureReplacer things along this one (like WindowShine) ? I can't guarantee yet that this version work without bugs with the others mods

Link to comment
Share on other sites

19 hours ago, HaArLiNsH said:

@Ger_space : Could you make a pull request for this on the new github? and also explain me a bit how this work ? I've seen these shader files but I don't see how you do them as it seems to not being directly linked to my sources and I don't really understand what they do :) 

@Avera9eJoe : I've just learned that TR was linked with your mod, so there are great chances that I've broke something. Can you tell me if everything goes right before we try to merge the new code from Ger_space ?

10 hours ago, Ger_space said:

I'll make a new PR later on. 

I wanted to report and say that Ger_space's newest release works without a single flaw :)

You've saved WindowShine. Congrats :) I also cannot express how great it is that the both of you are in talk with each other on this :wink:

 

Gar I think it would make most sense for your shaders and code to get packaged inside of future releases of TRR so that WindowShine remains just a config file and textures; it makes it simple for me to update and allows anyone else to add reflections to their mods without WindowShine as well if they like. Also I'd be dropping it inside of the TR plugins folder anyways :P

 

It's honestly been an incredible turn out week for me... I released update v0.5 of Spectra a few hours ago and @blackrack showed me it's glow effects are working alongside Scatterer-EVE Integration for the very next release. Most notable though is WindowShine, after two full years since I released it will finally have proper cabin lights, highlighting, and heating. Wow :) As soon as the improved shader version of TRR is released I'll slap your name @Ger_space at the top of the page with a giant thank you.

And on top of all this our kitchen remodel has started and is in full blow downstairs and I'm planning my vacation to California as I speak :D

Edited by Avera9eJoe
Link to comment
Share on other sites

8 hours ago, Sigma88 said:

there's a comment in the PR with an example

it uses the same syntax used by TR, the only difference is that now you can use MM patch to change the content of the cfg files instead of having to manually edit them

https://github.com/HaArLiNsH/TextureReplacerReplaced/pull/1#issuecomment-307576093

Nice this seems to be working :) I don't totally understand yet how MM works, so I'll need more help on this subject.  

Alright, first step so, now can we use this to move the textures from the TRR folder (like the head or suit) ?

My aim is to have people that make texture pack to put their stuff in this way :

(folder) MySuperTexturePack :

- (folder) heads :   with the heads textures inside

- (folder) suits:    with the suits textures inside

and so on for the different subsection if they have them in their mod.

And put this away from the TRR folder

Edited by HaArLiNsH
Link to comment
Share on other sites

23 minutes ago, Avera9eJoe said:

I wanted to report and say that Ger_space's newest release works without a single flaw :)

I also cannot express how great it is that the both of you are in talk with each other on this... :wink:  - I would prefer that your shaders get packaged inside of TRR from here on so that WindowShine remains just a config file and remade textures, it makes it simple for me to run and allows anyone else to add reflections to their mods as well if they like. Best of luck moving forwards!

It's honestly been an incredible turn out week for me... I released update v0.5 of Spectra a few hours ago and @blackrack showed me it's glow effects are working alongside Scatterer-EVE Integration for the very next release. WindowShine after two full years since I released it will finally have proper cabin lights, highlighting, and heating. Wow :) As soon as the improved shader version of TRR is released I'll slap your name @Ger_space at the top of the page with a giant thank you. You saved WindowShine. Congrats :)

And on top of all this our kitchen remodel has started and is in full blow downstairs and I'm planning my vacation to California as I speak :D

This is KSP 1.3 ?   hmmmm :)

Yeah I think I would pack the shaders with TRR (like it was before as I think this can affect multiple mods). I just need some precisions on how to maintain them if we have to build them from something else than TRR.

Link to comment
Share on other sites

I've changed the branches on the github. From now, the master branch is (should be :) ) a bit more secure and need code approval on the dev branch first to merge PR.

Try to make PR on the dev branch (from a fork based on the Master branch) as I'll publish them as dev-preRelease to test them and only use the Master branch to publish stable builds. I can make several dev branches if needed.

These Dev builds are made to test new features, so they might brake things around, use them carefully with your main campaign save.

So here is the first Dev-preRelease, I've merged the PR from @Sigma88 that you can find here.

There isn't yet real instructions yet, but you can download an example here.  (This is the sample provided by Sigma88 in the PR).

Tell us what you think of this. :cool:

Link to comment
Share on other sites

3 hours ago, HaArLiNsH said:

My aim is to have people that make texture pack to put their stuff in this way :

(folder) MySuperTexturePack :

- (folder) heads :   with the heads textures inside

- (folder) suits:    with the suits textures inside

and so on for the different subsection if they have them in their mod.

this should be possible, I'll add it to my todo list, which at the moment is pretty full :D

 

Link to comment
Share on other sites

30 minutes ago, HaArLiNsH said:

I have a question, I see a lot of


Util.log("Some Message");

how/where can I see these messages ?  in the console that we bring with ALT-F12 ingame or somewhere else ?

Probably in the log file, I'll take a look at the code

Edit:  Confirmed, it is in the log file.  Which might also be shown in the console, depending on the settings.

 

15 hours ago, HaArLiNsH said:

@linuxgurugamer : I'll wait until we have a stabilized version with MM compatibility, an accepted format to use TRR with the others mods and textures pack and I'm sure that there will be others things that seems to be waiting since a long time, before I put this on CKAN. Lets avoid a lot of double work. Thx for the help, I'll need it in time.

First, you don't really need the MM compatibility to have it available on CKAN.  That is an enhancement for future-proofing it.

Second, there are a number of mods which depend on TR aka TRR.  Not having this listed in CKAN means that those mods will be unavailable in CKAN for now.

It seems to be working (based on the comments above), so it would be nice to have it available.  

However, it's your mod, so I'll follow your wishes.

Edited by linuxgurugamer
Link to comment
Share on other sites

this is exciting :)

Really tho, I don't see why you had to credit shaw using his real name. I actually had to go and check that was who I thought it was when I noticed shaw wasn't credited in the OP.

Doing so does not also mean you can distribute the mod without including the original license file that you'll find in the original TR OP (I see you have it in the ReadMe on the Github but forum rules state it must be in the downloaded file as well)

Edited by Drew Kerman
Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

First, you don't really need the MM compatibility to have it available on CKAN.  That is an enhancement for future-proofing it.

Second, there are a number of mods which depend on TR aka TRR.  Not having this listed in CKAN means that those mods will be unavailable in CKAN for now.

It seems to be working (based on the comments above), so it would be nice to have it available.  

However, it's your mod, so I'll follow your wishes.

Ooh you mean there are still mods that aren't still "compatible" because of the 1.3 ? I tough the last build of TR was available on CKAN (didn't checked) and other mods could use this.

Anyway, I've updated the release (I forgot the toolbar icon) to V0.1.a.   I'm pretty sure now this is stable enough and if there are still mod waiting, we can publish it on CKAN. I've just absolutely not idea (yet) on how to do it :blush:

So yeah, if you can launch it, it will be greatly appreciated :) 

I'll need some explanations on how it works, so I wont need to bother you each time this will be updated.

Don't use the DEV_prerelease_V0.2 as this is not the "stable" branch, use the initial prerelease v0.1.a :) 

 

EDIT :  oh wait  before publishing to CKAN , I've another important change to do it  !   WRONG CREDITS.  I'll fix this asap 

Edited by HaArLiNsH
Link to comment
Share on other sites

18 minutes ago, cy4n said:

@Ger_space I can confirm that the new shaders do not work on Mac. Not sure about Linux.

I have no idea what black magic I need to get the KSP parttools compile opengl shaders. Perhaps I can use precompiled shaders to feed them into the ksp asset compiler. 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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