Jump to content

[1.12.x] Textures Unlimited Recolour Depot


Recommended Posts

19 minutes ago, Mlgisawsome02 said:

Asking because sometimes I don't use the shaders on the supported parts because it would clash with the unsupported parts

I feel ya there, and do much the same thing (and is why I haven't personally played KSP in ~2 years).  Too many darned ugly stock parts/shaders that need to be fixed... (not to mention nearly every single parts mod).

Link to comment
Share on other sites

Hi there!

@Manwith Noname i try to add a texture set to a stock part (the cupola) with TURD. But at the beginning i encounter issue. I've Restock installed, and the cupola (like many other parts affected by Restock) have no TU switching module in the VAB..
I try to found a solution on this thread but ... nothing. Have you a solution?!

Link to comment
Share on other sites

7 hours ago, Uohcnam said:

Hi there!

@Manwith Noname i try to add a texture set to a stock part (the cupola) with TURD. But at the beginning i encounter issue. I've Restock installed, and the cupola (like many other parts affected by Restock) have no TU switching module in the VAB..
I try to found a solution on this thread but ... nothing. Have you a solution?!

You have to uninstall restock. 

Link to comment
Share on other sites

52 minutes ago, Uohcnam said:

AH !

You said uninstall it then .... reinstall it, or uninstall and don't using restock?! :) 

Do not use restock with Turd installed. Remove Turd if you want restock. If you want restock remove Turd. They don't work together! :)

 

Link to comment
Share on other sites

On 3/9/2020 at 7:21 PM, Mlgisawsome02 said:

Can there be support for nertias mods and the dlc? Asking because sometimes I don't use the shaders on the supported parts because it would clash with the unsupported parts

Ok, small wall of text incoming. Your question is fine but coupled with some other recent posts I feel it might be worth clarifying a couple of things.

I want every part available in KSP, including mods, to use TexturesUnlimited and have recolour. No exceptions. I want them all to play nicely with one another. No exceptions. Is this possible? Yes, however, it's going to take a huge amount of work. A certain mod that crushed my soul when it appeared is likely in the order of 1000 - 2000 hours work, maybe more. I estimate this because I've already covered the same parts over the course of approximately 6 years, on and off. A single part can take anything from 30 minutes to 5+ hours depending on complexity and how suitable the existing art assets are. I'll admit, some of that time is down to my own indecision of how to lay things out and general mulling over of hurdles I encounter. When I think of how long I have spent on Stock alone and consider that it is still a way off being perfect...

Now, covering stock parts is fairly straight forward. Squad are open to people modding their game and they have a set of guidelines on what is and isn't allowed. Follow those and all should be fine and dandy. When it comes to altering other mods, I take a different approach and have done since 2014 when making masks for KerbPaint. I start working on it and when it reaches a state where there is something reasonable to show, I contact the mod author. I ask them if they have any objections to this becoming publicly available and eventually offer them the option of a preview download to inspect if they wish. If the mod author is absent, I revert to their license after some months. To date, I have been able to find agreeable terms with mod authors I have contacted and in only one case am I reverting to the license due to an author being absent, while in another, I'm effectively extending permissions granted from 5 or 6 years ago as the mod really hasn't changed but the license is also permissible. Having permission for one mod from an author however is not permission for another mod of theirs as far as I am concerned unless it was specifically proposed in the original enquiry, so the process is repeated where this isn't the case.

I also don't generally announce ongoing projects for two reasons:

1) The author might object and so the work never gets released. It's not fair on anyone for me to post preview pics or make comments until permission has been received.
2) My own sanity. I've made starts on a couple of things which I've vaguely hinted at in the past only to drop the project for the foreseeable future due to a number of reasons.

Generally, I have a number of projects on the go at once. It relieves the frustration to jump between them when I find problems on a particular part but have motivation and time to do conversions, while also giving the brain time to chew over how to solve it. As of now, I have three undisclosed projects on the go, two of which I have permission to upload but there are some things I want to do before that happens, which comes back to the time and motivation just mentioned. This also kinda leads to, sometimes, when you've been spending all your free time working on something, for a game you don't really play because you want all these wonderful toys before you do, you just want to take a break and actually play something else or generally enjoy other things in life.

To end this comment where I started, I also appreciate that realistically what I want will never become a reality. It's going to take more than just little ol' me slogging away at least. I hope people can read this and understand why some things don't exist or get mentioned right now, however disappointing that might be. To lighten the mood and relieve some of my own frustrations at least, let's play a little game called "spot the odd one out".

Spoiler

48CD5C5A8D49CA45C4393908FE808F2ECBBF49ED


 

Link to comment
Share on other sites

17 hours ago, Manwith Noname said:

To lighten the mood and relieve some of my own frustrations at least, let's play a little game called "spot the odd one out".

Argh! How could you do this to me :)  I'm not seeing any messed up normals or weird rendering, almost like things are working like they should :)  (sarcasm...)

Top-right; uses two-way symmetry for its plate, the others are using 4-way.  You can tell because the latches on all of them are 'messed up', but the latches on the top-right are 'less messed up than the others'.  Its all about those little details... (that SQUAD misses, or messes up...).  Note that one way to do it properly would be for no symmetry/no mirroring (2x/4x the texture space used); the other way would be to instead of mirror, simply repeat, but then you need to make each segment/wedge 'seamless', which is harder than it sounds for non-UV aligned textures.

Link to comment
Share on other sites

3 hours ago, Arco123 said:

Sorry for being late. My school is freaking out and my family has been doing stuff together so I don't get as much time.

You never need to apologise for not being on the internet. The "real world" is far more important.

 

1 hour ago, Shadowmage said:

Argh! How could you do this to me :)  I'm not seeing any messed up normals or weird rendering, almost like things are working like they should :)  (sarcasm...)

Top-right; uses two-way symmetry for its plate, the others are using 4-way.  You can tell because the latches on all of them are 'messed up', but the latches on the top-right are 'less messed up than the others'.  Its all about those little details... (that SQUAD misses, or messes up...).  Note that one way to do it properly would be for no symmetry/no mirroring (2x/4x the texture space used); the other way would be to instead of mirror, simply repeat, but then you need to make each segment/wedge 'seamless', which is harder than it sounds for non-UV aligned textures.

This is an answer but perhaps not the answer I was looking for. I wonder if you have actually seen it in a way.  I didn't really want to give out clues but you mention something here which is on the right track. This also highlights why I thought this would be fun, it's curious how people pick up on different things.

Link to comment
Share on other sites

Talking Stock

So, after splurging inner thoughts and reasons for why some stuff will always remain secret until finalised, given this is a development thread I figure it might be an idea to give some insight in to current progress on covering 1.9 parts.

Spoiler

D408C7E805CD8331621EED4B9261EAB957B50591

Here we can see the Skipper engine in its not so natural habitat of undergoing recolour implementation (I suddenly have a feeling I might have done that joke before...apologies). No, it doesn't look too special right now because the first order of the day is to lay out the colour mapping and finalise it before working on the metallicglossmap and potential diffuse texture adjustments.

The engine currently uses PartVariants (shown as the three placed engines) and consists of 4 main meshes. Mount1, the outer shrouding seen on the right. Mount2, the ring plate and some pipe extensions in the middle. Engine, the main manifolds and block which appears in all 3 variants. Right now, I'm still undecided on what to cover with the "green layer". The 4th mesh is the engine bell, which while using the stock part variant system will remain unmasked. Technically, it could be painted but limitation of the stock variant system mean colours (or better put, materials) across meshes start coming in to conflict at some point. I've had an idea kicking around for some time now on how I might be able to work around this but I'm hoping to follow up on this post with another covering that at some point. It might come tonight, it might come next week depending on how quickly I can get it up and running around other commitments...assuming it works of course because right now, it's just an untested idea.

Edited by Manwith Noname
Link to comment
Share on other sites

The Problem with Variants

Alright, some people might be wondering "I don't get it, what's the problem? You've got it all mapped out and it's working". Allow my eccentric rocket building enthusiast friend (definitely not me) to demonstrate more visually.

Spoiler

F4C9A6876E30C6E5311FE7FB521692F8A56B65C3

They decided they quite liked the general scheme of the engine as it was but wanted to spruce it up a little. They made the red layer steel metallic and knocked up a close approximation of the orange paint with a bit of shine in the green layer. Not quite content with the original ball thingamie, they make it a nice shiny gloss white. Overall, they're quite pleased with how it turned out despite the engine block having to follow suit with the main base.

Now, this is all fine, in isolation but when it comes to painting rockets, our eccentric rocket building enthusiast has visions of a grand design.

Spoiler

5066C9CE48CF23AE96372F909ED46D2E537CCB84

Hmm, ok, their taste isn't fantastic but this just will not do, will it? You see, this little sneaky bugger of a shroud is locked to the same colour palette of the engine and doesn't necessarily fit with the scheme they wanted on the rest of the rocket and you know they couldn't possibly commit similar crimes against rocketry design to the engine. Right?

This is just a bit of fun to set up for the next post. More news at eleven. It gets better, I promise.

Link to comment
Share on other sites

The Solution!...well, maybe?

Every time I think of variants, I think of Aliens. We should nuke the thing from orbit, it's the only way to be sure. I've tried manipulating the module in cunning ways but all I managed to do was break the editor. So, the idea that's been kicking around my head for a long time is to completely replace the stock part variant system with something else that I know plays nice with TU.

Ladies and gentlemen, I present to you, the "variants begone" part switcher...sponsored by B9 Part Switch.

*drumroll*

Spoiler

*cymbal splash*

 

87AF6A77A283E6E4184FC27629D0D96A095A97B9

So, the proof of concept works it seems. Sadly, it comes with one or two issues right now.

Spoiler

*slide whistle*

 

97E5DBDF560CFF36444E3B1E81FAA945A1554252

I feel like this should work with a bit more time digging out how to set up the B9 part switch module. Then again, I might find that this is also an area that B9 just will not solve. Another drawback if I can get it all to work is it becomes a dependency but I kinda feel that a lot of people will have it installed anyway due to other mods incorporating it. I might see how Firespitter mesh switch functions in this area too but not tonight I suspect.

Thoughts and suggestions on this are welcome. I've had my fun for the evening goofing around. Normal business may resume.

Link to comment
Share on other sites

@Manwith Noname I still might be able to do something about this in TU, to allow for multiple TUPartVariant modules to reside on a part, each referencing their own configs (somehow).  They would all still be driven by the stock part-variant system, but target different meshes, and each add a new 'section' to the recolor GUI.  Just something that would need a bit of deliberation on how to best implement it, and likely could be some very simple config changes to make it all work.

Think, for instance, right now you add an EXTRA INFO block to the variant config, with a 'textureSet = XXXX' reference.  What if we added an index/number to the TUPartVariant module (Default = 0), and appended (optionally) a number onto the texture-set names in the info block?  Something like the config below (just random samples, not actually a viable config...)

//the extra-info blocks would look something like:
EXTRA_INFO
{
	textureSet = textureSetForFirstGroupOfMeshes
	textureSet1 = textureSetForSecondGroupOfMeshes
	textureSet2 = textureSetForThirdGroupOfMeshes
}
// - OR -
// (the '0' on the default textureSet property name is optional)
EXTRA_INFO
{
	textureSet0 = textureSetForFirstGroupOfMeshes
	textureSet1 = textureSetForSecondGroupOfMeshes
	textureSet2 = textureSetForThirdGroupOfMeshes
}

MODULE
{
	name = TUPartVariant
	sectionName = FirstGroupOfStuff
	moduleIndex = 0
}
MODULE
{
	name = TUPartVariant
	sectionName = SecondGroupOfStuff
	moduleIndex = 1
}
MODULE
{
	name = TUPartVariant
	sectionName = ThirdGroupOfStuff
	moduleIndex = 2
}

 

Thoughts?  Is that, in essence what you are trying to accomplish?  (if yes, I could very likely have this in the next release of TU; would require fairly minimal changes to the code I think (barring stock weirdness interfering with simplicity)).  There should be no practical limit to the number of TUPartVariant modules you could add; only limited by how the model was split into meshes and how you wanted to group them up.

 

30 minutes ago, Manwith Noname said:

Every time I think of variants, I think of Aliens. We should nuke the thing from orbit, it's the only way to be sure.

I wholeheartedly agree.  If only it were an option, and if only they would stop making even more parts use it. 

Or if they would fix the code-side API of it to not be full of holes.  Or if they would fix their shader loading to recognize external shaders (you wouldn't even need TU modules then, aside from recoloring) (this would actually be a very easy fix for them; simply stop using Shader.Find("shaderName"), create a list of 'loaded shaders', let mods add shaders to that list during startup, and then search that list when looking for a specific one by name) .

Link to comment
Share on other sites

@Shadowmage

Maybe? It's late, I'm a bit brain dead. I must admit, I butchered the part massively but I do quite like how it functions. Everything works independently so B9 handles just the model changes and the standard TU texture switch module deals with the usual texture set side of things. This is essentially how I would like things to work, switching models keeps texture sets applied, switching texture sets has no effect on the meshes being displayed.

I fixed one issue, that was straight forward, I just forgot to add the fairing transforms to the B9 switcher. I'm reasonably sure I've seen posts in the past about engine plumes in the editors but I'm not entirely sure what caused them. There could also potentially be issues with using a 1.8 plugin on 1.9. I just want to test the concept and see how it functioned.

This is the config, obviously you won't be able to use it due to missing textures and what not but it might give more of an idea of how I set it up.

Spoiler

@PART[engineLargeSkipper_v2]:FOR[zZzZz_zCRAPPYz_zTHINGz_zZzZz]:NEEDS[TexturesUnlimited&!Restock]
{
	!MODULE[ModulePartVariants],*{}
}
	
@PART[engineLargeSkipper_v2]:FOR[000_Standardised_Switching]:NEEDS[TexturesUnlimited&!Restock]
{	
	MODULE
	{
		name = ModuleB9PartSwitch
		moduleID = VariantReplacer
		switcherDescription = Stock Variants Begone
		
		SUBTYPE
		{
			name = Shroud
			title = Shroud
			
			transform = Engine
			transform = Mount1
			transform = obj_gimbal
			
			transform = fairing1
		}
		SUBTYPE
		{
			name = TrussMount
			title = Truss Mount
			
			transform = Engine
			transform = Mount2
			transform = obj_gimbal
			
			transform = fairing1
		}
		SUBTYPE
		{
			name = Bare
			title = Bare
			
			transform = Engine
			transform = obj_gimbal
			
			transform = fairing2
		}
	}
	MODULE
	{
		name = KSPTextureSwitch
		sectionName = Shroud
		currentTextureSet = Stock_Default_engineLargeSkipper_v2_Shroud
		textureSet = Stock_Default_engineLargeSkipper_v2_Shroud
	}
	MODULE
	{
		name = KSPTextureSwitch
		sectionName = Ring Mount
		currentTextureSet = Stock_Default_engineLargeSkipper_v2_Mount
		textureSet = Stock_Default_engineLargeSkipper_v2_Mount
	}
	MODULE
	{
		name = KSPTextureSwitch
		sectionName = Engine Block
		currentTextureSet = Stock_Default_engineLargeSkipper_v2_Block
		textureSet = Stock_Default_engineLargeSkipper_v2_Block
	}
	MODULE
	{
		name = KSPTextureSwitch
		sectionName = Bell End
		currentTextureSet = Stock_Default_engineLargeSkipper_v2_Bell
		textureSet = Stock_Default_engineLargeSkipper_v2_Bell
	}
	MODULE
	{
		name = KSPTextureSwitch
		sectionName = Fairing
		currentTextureSet = Stock_Default_engineLargeSkipper_v2_Fairing
		textureSet = Stock_Default_engineLargeSkipper_v2_Fairing
	}
	%MODULE[SSTURecolorGUI]
	{
		%name = SSTURecolorGUI
	}
}
+KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = Stock_Default_engineLargeSkipper_v2_Shroud
	@MATERIAL
	{
		mesh = Mount1
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_diffuse
		texture = _BumpMap,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_normal
		texture = _Emissive,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_emissive
	}
}
+KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = Stock_Default_engineLargeSkipper_v2_Mount
	@MATERIAL
	{
		mesh = Mount2
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_diffuse
		texture = _BumpMap,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_normal
		texture = _Emissive,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_emissive
	}
}
+KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = Stock_Default_engineLargeSkipper_v2_Block
	@MATERIAL
	{
		mesh = Engine
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_diffuse
		texture = _BumpMap,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_normal
		texture = _Emissive,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_emissive
	}
}
+KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = Stock_Default_engineLargeSkipper_v2_Bell
	@MATERIAL
	{
		mesh = obj_gimbal
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_diffuse
		texture = _BumpMap,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_normal
		texture = _Emissive,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_emissive
	}
}
+KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = Stock_Default_engineLargeSkipper_v2_Fairing
	@MATERIAL
	{
		mesh = fairing1
		mesh = fairing2
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/Shroud
		texture = _BumpMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Bump
		texture = _Emissive,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Emis
	}
}




@PART[engineLargeSkipper_v2]:FOR[003_Standardised_Switching]:NEEDS[TexturesUnlimited&!Restock]
{
	@MODULE[KSPTextureSwitch],0
	{
		textureSet = Alternate_Stock_Metallic_engineLargeSkipper_v2_Shroud
	}
	@MODULE[KSPTextureSwitch],1
	{
		textureSet = Alternate_Stock_Metallic_engineLargeSkipper_v2_Mount
	}
	@MODULE[KSPTextureSwitch],2
	{
		textureSet = Alternate_Stock_Metallic_engineLargeSkipper_v2_Block
	}
	@MODULE[KSPTextureSwitch],3
	{
		textureSet = Alternate_Stock_Metallic_engineLargeSkipper_v2_Bell
	}
	@MODULE[KSPTextureSwitch],4
	{
		textureSet = Alternate_Stock_Metallic_engineLargeSkipper_v2_Fairing
	}
}
+KSP_TEXTURE_SET[Alternate_Stock_Metallic]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = Alternate_Stock_Metallic_engineLargeSkipper_v2_Shroud
	@MATERIAL
	{
		mesh = Mount1
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_diffuse
		texture = _BumpMap,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_normal
		texture = _Emissive,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_emissive
		texture = _AOMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Occ
		texture = _MetallicGlossMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Occ
	}
}
+KSP_TEXTURE_SET[Alternate_Stock_Metallic]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = Alternate_Stock_Metallic_engineLargeSkipper_v2_Mount
	@MATERIAL
	{
		mesh = Mount2
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_diffuse
		texture = _BumpMap,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_normal
		texture = _Emissive,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_emissive
		texture = _AOMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Occ
		texture = _MetallicGlossMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Occ
	}
}
+KSP_TEXTURE_SET[Alternate_Stock_Metallic]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = Alternate_Stock_Metallic_engineLargeSkipper_v2_Block
	@MATERIAL
	{
		mesh = Engine
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_diffuse
		texture = _BumpMap,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_normal
		texture = _Emissive,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_emissive
		texture = _AOMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Occ
		texture = _MetallicGlossMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Occ
	}
}
+KSP_TEXTURE_SET[Alternate_Stock_Metallic]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = Alternate_Stock_Metallic_engineLargeSkipper_v2_Bell
	@MATERIAL
	{
		mesh = obj_gimbal
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_diffuse
		texture = _BumpMap,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_normal
		texture = _Emissive,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_emissive
		texture = _AOMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Occ
		texture = _MetallicGlossMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Occ
	}
}
+KSP_TEXTURE_SET[Alternate_Stock_Metallic]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = Alternate_Stock_Metallic_engineLargeSkipper_v2_Fairing
	@MATERIAL
	{
		mesh = fairing1
		mesh = fairing2
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/Shroud
		texture = _BumpMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Bump
		texture = _Emissive,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Emis
		texture = _AOMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Occ
		texture = _MetallicGlossMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Occ
	}
}





@PART[engineLargeSkipper_v2]:FOR[999_Standardised_Switching]:NEEDS[TexturesUnlimited&!Restock]
{
	@MODULE[KSPTextureSwitch],0
	{
		textureSet = MWNN_Stock_Paint_engineLargeSkipper_v2_Shroud
	}
	@MODULE[KSPTextureSwitch],1
	{
		textureSet = MWNN_Stock_Paint_engineLargeSkipper_v2_Mount
	}
	@MODULE[KSPTextureSwitch],2
	{
		textureSet = MWNN_Stock_Paint_engineLargeSkipper_v2_Block
	}
	@MODULE[KSPTextureSwitch],3
	{
		textureSet = MWNN_Stock_Paint_engineLargeSkipper_v2_Bell
	}
	@MODULE[KSPTextureSwitch],4
	{
		textureSet = MWNN_Stock_Paint_engineLargeSkipper_v2_Fairing
	}
}
+KSP_TEXTURE_SET[MWNN_Stock_Paint]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = MWNN_Stock_Paint_engineLargeSkipper_v2_Shroud
	@MATERIAL
	{
		mesh = Mount1
		
		vector = _DiffuseNorm,0.5,0.45,0.3
		vector = _MetalNorm,0.25,0.225,0.15
		vector = _SmoothnessNorm,0.25,0.225,0.15
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_diffuse
		texture = _BumpMap,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_normal
		texture = _Emissive,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_emissive
		texture = _AOMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Occ
		texture = _MetallicGlossMap,TURD/TU_Stock_Recolour/Engine/Liquid_Engine_Skipper_v2/190_skipper_v2_Spec
		texture = _MaskTex,TURD/TU_Stock_Recolour/Engine/Liquid_Engine_Skipper_v2/190_skipper_v2_Paint
	}
}
+KSP_TEXTURE_SET[MWNN_Stock_Paint]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = MWNN_Stock_Paint_engineLargeSkipper_v2_Mount
	@MATERIAL
	{
		mesh = Mount2
		
		vector = _DiffuseNorm,0.5,0.3,0.3
		vector = _MetalNorm,0.25,0.15,0.15
		vector = _SmoothnessNorm,0.25,0.15,0.15
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_diffuse
		texture = _BumpMap,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_normal
		texture = _Emissive,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_emissive
		texture = _AOMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Occ
		texture = _MetallicGlossMap,TURD/TU_Stock_Recolour/Engine/Liquid_Engine_Skipper_v2/190_skipper_v2_Spec
		texture = _MaskTex,TURD/TU_Stock_Recolour/Engine/Liquid_Engine_Skipper_v2/190_skipper_v2_Paint
	}
}
+KSP_TEXTURE_SET[MWNN_Stock_Paint]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = MWNN_Stock_Paint_engineLargeSkipper_v2_Block
	@MATERIAL
	{
		mesh = Engine
		
		vector = _DiffuseNorm,0.5,0.74,0.3
		vector = _MetalNorm,0.25,0.5,0.15
		vector = _SmoothnessNorm,0.25,0.5,0.15
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_diffuse
		texture = _BumpMap,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_normal
		texture = _Emissive,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_emissive
		texture = _AOMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Occ
		texture = _MetallicGlossMap,TURD/TU_Stock_Recolour/Engine/Liquid_Engine_Skipper_v2/190_skipper_v2_Spec
		texture = _MaskTex,TURD/TU_Stock_Recolour/Engine/Liquid_Engine_Skipper_v2/190_skipper_v2_Paint
	}
}
+KSP_TEXTURE_SET[MWNN_Stock_Paint]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = MWNN_Stock_Paint_engineLargeSkipper_v2_Bell
	@MATERIAL
	{
		mesh = obj_gimbal
		
		vector = _DiffuseNorm,0.74,0.74,0.74
		vector = _MetalNorm,0.5,0.5,0.5
		vector = _SmoothnessNorm,0.5,0.5,0.5
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_diffuse
		texture = _BumpMap,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_normal
		texture = _Emissive,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_emissive
		texture = _AOMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Occ
		texture = _MetallicGlossMap,TURD/TU_Stock_Recolour/Engine/Liquid_Engine_Skipper_v2/190_skipper_v2_Spec
		texture = _MaskTex,TURD/TU_Stock_Recolour/Engine/Liquid_Engine_Skipper_v2/190_skipper_v2_Paint
	}
}
+KSP_TEXTURE_SET[MWNN_Stock_Paint]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = MWNN_Stock_Paint_engineLargeSkipper_v2_Fairing
	@MATERIAL
	{
		mesh = fairing1
		mesh = fairing2
		
		vector = _DiffuseNorm,0.74,0.74,0.74
		vector = _MetalNorm,0.5,0.5,0.5
		vector = _SmoothnessNorm,0.5,0.5,0.5
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/Shroud
		texture = _BumpMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Bump
		texture = _Emissive,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Emis
		texture = _AOMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Occ
		texture = _MetallicGlossMap,TURD/TU_Stock_Recolour/Engine/Liquid_Engine_Mainsail_v2/190_Shroud_Spec
		texture = _MaskTex,TURD/TU_Stock_Recolour/Engine/Liquid_Engine_Mainsail_v2/190_Shroud_Paint
	}
}

 

 

Edit: I think I understand your suggestion. Essentially the extra info block and part variant modules would allow for the material control to display in the GUI but it would all be tied to a particular variant? This would of course work, I just like the ability to switch between texture sets on specific meshes so you can mix and match say, a straight metallic set on some meshes with recolour on others. Basically, I like that flexibility but to some extent it's not essential. What bothers me the most is being limited to 3 user definable colours / materials when a part could be broken down to allow more.

 

Another edit: Haha, might need to switch out colliders too...

Spoiler

5F7F3D53E1F517AAD1B01BB09B297D768A8497D3

 

Edited by Manwith Noname
Link to comment
Share on other sites

@Manwith Noname  I've added support for multiple TUPartVariant modules, as outlined above:  https://github.com/shadowmage45/TexturesUnlimited/commit/c44539197b9a95c9fe49308e0c2e602a349de6e4#diff-2878e404bd26e80b4b5bd93e6116a98eR32-R294

Changes are available on the dev branch if you were interested (grab the .dll from there), though I've not given it any testing yet.  As you inferred, It isn't going to work exactly like your combo of B9 + multiple TUTextureSwitch modules, as with part-variants you wouldn't be able to switch the texture-sets individually (they are tied to whatever was specified in the variant), but it should still allow for multiple recoloring section entries on a single part.

Link to comment
Share on other sites

On 3/14/2020 at 1:40 AM, Shadowmage said:

 


//the extra-info blocks would look something like:
EXTRA_INFO
{
	textureSet = textureSetForFirstGroupOfMeshes
	textureSet1 = textureSetForSecondGroupOfMeshes
	textureSet2 = textureSetForThirdGroupOfMeshes
}
// - OR -
// (the '0' on the default textureSet property name is optional)
EXTRA_INFO
{
	textureSet0 = textureSetForFirstGroupOfMeshes
	textureSet1 = textureSetForSecondGroupOfMeshes
	textureSet2 = textureSetForThirdGroupOfMeshes
}

MODULE
{
	name = TUPartVariant
	sectionName = FirstGroupOfStuff
	moduleIndex = 0
}
MODULE
{
	name = TUPartVariant
	sectionName = SecondGroupOfStuff
	moduleIndex = 1
}
MODULE
{
	name = TUPartVariant
	sectionName = ThirdGroupOfStuff
	moduleIndex = 2
}

 

@Shadowmage, is your new add on TU with TUPartVariant module work the same way as the code above?
What's the significant difference between TUPartVariant and B9+TUTextureSwitch ?
TUPartVariant is working fine with parts using B9? 

I'll try to understand all of this small world ! :D 

Edited by Uohcnam
Link to comment
Share on other sites

On 3/14/2020 at 11:04 PM, Mountain Parrot said:

is this compatable with restock / restock+?

They can both be installed, but last I heard, restock parts will not have TU recolor functionality. It's good for planes and OPT, etc, but not so much for rockets and stations. Your mileage may vary.

Link to comment
Share on other sites

7 hours ago, Uohcnam said:

TUPartVariant is working fine with parts using B9? 

No.  TUPartVariant is for working alongside the stock PartVariant system.

7 hours ago, Uohcnam said:

is your new add on TU with TUPartVariant module work the same way as the code above?

What?  I'm not sure what you are asking here?  No, that little sample will not 'work' as it was just enough info to provide to @Manwith Noname so that he would know how to use additions to the system -- to provide him the syntax to use for his configs.  If you are not writing configs, then you don't need to worry about it.

7 hours ago, Uohcnam said:

What's the significant difference between TUPartVariant and B9+TUTextureSwitch ?

One works with the stock PartVariant system, the other does not.

Link to comment
Share on other sites

On 3/15/2020 at 3:04 AM, Mountain Parrot said:

is this compatable with restock / restock+?

As was mentioned, it's "compatible" in the sense they should work together without causing issues. What happens is where there are conflicts due to redesigned parts from ReStock, my patches (should) disable themselves and textures for those parts do not load. Might be worth mentioning, I've found a couple of errors with this, meaning I found one part unintentionally being blocked and some typos in the blacklist which meant unused textures would be loaded. These will be fixed when I have the last of the 1.9 stock parts sorted but they're also not critical.

 

8 hours ago, Uohcnam said:

@Shadowmage, is your new add on TU with TUPartVariant module work the same way as the code above?
What's the significant difference between TUPartVariant and B9+TUTextureSwitch ?
TUPartVariant is working fine with parts using B9? 

I'll try to understand all of this small world ! :D 

I would to some extent forget all my ramblings about PartVariants and B9 Part Switch. It was just a bit of fun for me to test something that at the time I was unable to achieve with TU alone and had been kicking around the idea for quite a while. I've always preferred the standard texture switch module but now, where appropriate, PartVariants can be split in to multiple sections to get more material control in the GUI, which was what it was all about really. As you're interested, the implementation of the new TUPartVariant functionality ended up something like this...

Spoiler

@PART[engineLargeSkipper_v2]:FOR[000_Standardised_Switching]:NEEDS[TexturesUnlimited&!Restock]
{
	@MODULE[ModulePartVariants]
	{
		@VARIANT[Shroud]
		{
			EXTRA_INFO
			{
				textureSet0 = Stock_Default_engineLargeSkipper_v2_Shroud
				// textureSet1 = Stock_Default_engineLargeSkipper_v2_Mount
				textureSet2 = Stock_Default_engineLargeSkipper_v2_Block
				textureSet3 = Stock_Default_engineLargeSkipper_v2_Bell
				textureSet4 = Stock_Default_engineLargeSkipper_v2_Fairing
			}
		}
		@VARIANT[TrussMount]
		{
			EXTRA_INFO
			{
				// textureSet0 = Stock_Default_engineLargeSkipper_v2_Shroud
				textureSet1 = Stock_Default_engineLargeSkipper_v2_Mount
				textureSet2 = Stock_Default_engineLargeSkipper_v2_Block
				textureSet3 = Stock_Default_engineLargeSkipper_v2_Bell
				textureSet4 = Stock_Default_engineLargeSkipper_v2_Fairing
			}
		}
		@VARIANT[Bare]
		{
			EXTRA_INFO
			{
				// textureSet0 = Stock_Default_engineLargeSkipper_v2_Shroud
				// textureSet1 = Stock_Default_engineLargeSkipper_v2_Mount
				textureSet2 = Stock_Default_engineLargeSkipper_v2_Block
				textureSet3 = Stock_Default_engineLargeSkipper_v2_Bell
				textureSet4 = Stock_Default_engineLargeSkipper_v2_Fairing
			}
		}
	}
	MODULE
	{
		name = TUPartVariant
		sectionName = Base
		moduleIndex = 0
	}
	MODULE
	{
		name = TUPartVariant
		sectionName = Mount
		moduleIndex = 1
	}
	MODULE
	{
		name = TUPartVariant
		sectionName = Block
		moduleIndex = 2
	}
	MODULE
	{
		name = TUPartVariant
		sectionName = Bell
		moduleIndex = 3
	}
	MODULE
	{
		name = TUPartVariant
		sectionName = Fairing
		moduleIndex = 4
	}
	%MODULE[SSTURecolorGUI]
	{
		%name = SSTURecolorGUI
	}
}
+KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = Stock_Default_engineLargeSkipper_v2_Shroud
	@MATERIAL
	{
		mesh = Mount1
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_diffuse
		texture = _BumpMap,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_normal
		texture = _Emissive,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_emissive
	}
}
+KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = Stock_Default_engineLargeSkipper_v2_Mount
	@MATERIAL
	{
		mesh = Mount2
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_diffuse
		texture = _BumpMap,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_normal
		texture = _Emissive,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_emissive
	}
}
+KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = Stock_Default_engineLargeSkipper_v2_Block
	@MATERIAL
	{
		mesh = Engine
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_diffuse
		texture = _BumpMap,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_normal
		texture = _Emissive,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_emissive
	}
}
+KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = Stock_Default_engineLargeSkipper_v2_Bell
	@MATERIAL
	{
		mesh = obj_gimbal
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_diffuse
		texture = _BumpMap,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_normal
		texture = _Emissive,Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2_emissive
	}
}
+KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited&!Restock]
{
	@name = Stock_Default_engineLargeSkipper_v2_Fairing
	@MATERIAL
	{
		mesh = fairing1
		mesh = fairing2
		
		texture = _MainTex,Squad/Parts/Engine/liquidEngineSkipper_v2/Shroud
		texture = _BumpMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Bump
		texture = _Emissive,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Emis
	}
}

 

To some extent, this is also not entirely necessary. I fiddled with different structures partly to try and break it but also to see where I could reduce the config length. You can essentially mix and match how much you break down the texture sets but I settled on this for a number of reasons.

1) It keeps the various configs very similar. So when someone reads the stock texture sets, they closely match the recolour texture sets.

2) My heavy use of copying from a base texture set applies things I sometimes forget to apply within nested MATERIAL blocks. Things like remembering to specify the shader or keywords and so on. Naturally, they get added when I realise after loading the game and things are broken but this significantly reduces my level of brainfarts and reloads.

3) The general idea of the Standardised Switching is to set everything up initially and becomes an easier way to just keep adding on to. If I had stuck with one of the other configs I had tried, I kept the stock stuff with just 2 texture sets from memory, there was only one TUPartVariant MODULE and everything else was added later in the recolour config. It's ultimately about trying to keep the various configs consistent and hopefully logical so people trying to learn from them can piece the puzzle together.

 

Additionally, yes, I know ReStock doesn't currently replace this part....but it will. I believe their next update will replace all these new stock parts and all the wheels from posts I have seen in their release thread.

Edited by Manwith Noname
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...