Jump to content

[1.12.x] Textures Unlimited Recolour Depot


Recommended Posts

On 10/11/2022 at 12:46 AM, Jaggleberry said:

Absolutely essential mod.

My dream is to one day understand how to make my own paths for Quiztech Aero and Aviators Arsenal.

Thank you for all your work. 

To anyone interested: turns out that huge dump of configs from magpie mods has paths for exactly the packs I mentioned. They're just hidden in the misc cfg. 

I have no idea how to give them the bob ross paints or a GUI, so any color editing has to be done normal TU style with notepad adjustments. 

Still, my discount brand Warthog is finally done and it's in part thanks to this mod. Much appreciated. QcsNTPs.jpg

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 2 weeks later...

@Sidestrafe2462 Yes...kind of. That is something I experimented with some time ago with limited success. At least with what I was looking to achieve anyway. It got shelved because of a number of rendering issues. I can perhaps look and see if something has changed internally with KSP that fixes these problems but I suspect they might need a shader wizard to jiggle with TU internals.

Spoiler

B694B568A1F2CCE8FD5F2F5AA0487B767BFE57F7

 

Link to comment
Share on other sites

On 12/9/2022 at 3:29 PM, Manwith Noname said:

@Sidestrafe2462 Yes...kind of. That is something I experimented with some time ago with limited success. At least with what I was looking to achieve anyway. It got shelved because of a number of rendering issues. I can perhaps look and see if something has changed internally with KSP that fixes these problems but I suspect they might need a shader wizard to jiggle with TU internals.

  Reveal hidden contents

B694B568A1F2CCE8FD5F2F5AA0487B767BFE57F7

 

How do you implement transparency into a config? Could you give an example? 

Link to comment
Share on other sites

@Sidestrafe2462

Ok, copy and paste the contents of the code block in the spoiler to a normal text file. That file can be named anything and placed anywhere inside GameData but perhaps put it in with the pWings TU configs. This is for ye olde pWings, not B9.

Spoiler
KSP_TEXTURE_SET:NEEDS[TexturesUnlimited]
{
	name = MWNN_Stock_Paint_Translucent
	title = Bob Ross Glass
	recolorable = true
	
	MATERIAL
	{
		mode = create
		shader = TU/Transparent/Metallic
		
		renderQueue = 3000
		
		keyword = TU_RECOLOR
	}
	COLORS
	{
		mainColor = absolute_red
		secondColor = absolute_green
		detailColor = absolute_blue
	}
}

// ProceduralDynamics/Parts/DYJproceduralwing2

@PART[Proceduralwing2,ProceduralAllMovingWing]:FOR[zzzz_Something_after_P_because_2]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@MODULE[KSPTextureSwitch],0
	{
		textureSet = MWNN_pWings_Paint_Translucent_AMW
	}
}
+KSP_TEXTURE_SET[MWNN_Stock_Paint_Translucent]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = MWNN_pWings_Paint_Translucent_AMW
	@MATERIAL
	{
		mesh = Cube
		
		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,TURD/TU_pWings_Recolour/DYJ_ProcWing_2/180_pWings_2_Spec
		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_pWings_Recolour/DYJ_ProcWing_2/180_pWings_2_Spec
		texture = _MaskTex,TURD/TU_pWings_Recolour/DYJ_ProcWing_2/180_pWings_2_Paint
	}
}

// ProceduralDynamics/Parts/DYJproceduralwing2endcap

@PART[Proceduralwing2EndPiece]:FOR[zzzz_Something_after_P_because_2]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@MODULE[KSPTextureSwitch],0
	{
		textureSet = MWNN_pWings_Paint_Translucent_End
	}
}
+KSP_TEXTURE_SET[MWNN_Stock_Paint_Translucent]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = MWNN_pWings_Paint_Translucent_End
	@MATERIAL
	{
		mesh = Cube
		
		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,TURD/TU_pWings_Recolour/DYJ_ProcWing_2End/180_pWings_End_Spec
		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_pWings_Recolour/DYJ_ProcWing_2End/180_pWings_End_Spec
		texture = _MaskTex,TURD/TU_pWings_Recolour/DYJ_ProcWing_2End/180_pWings_End_Paint
	}
}

// ProceduralDynamics/Parts/DYJproceduralwing3

@PART[Proceduralwing4]:FOR[zzzz_Something_after_P_because_2]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@MODULE[KSPTextureSwitch],0
	{
		textureSet = MWNN_pWings_Paint_Translucent_3
	}
}
+KSP_TEXTURE_SET[MWNN_Stock_Paint_Translucent]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = MWNN_pWings_Paint_Translucent_3
	@MATERIAL
	{
		mesh = obj_ctrlSrf
		mesh = Circle
		
		vector = _DiffuseNorm,1.0,1.0,1.0
		vector = _MetalNorm,1.0,1.0,1.0
		vector = _SmoothnessNorm,1.0,1.0,1.0
		
		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
		texture = _MaskTex,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Paint
	}
}

// ProceduralDynamics/Parts/DYJproceduralwingAllMovingSurface
// In with wing2

// ProceduralDynamics/Parts/DYJproceduralwingB9

@PART[ProceduralwingBac9]:FOR[zzzz_Something_after_P_because_2]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@MODULE[KSPTextureSwitch],0
	{
		textureSet = MWNN_pWings_Paint_Translucent_B9
	}
}
+KSP_TEXTURE_SET[MWNN_Stock_Paint_Translucent]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = MWNN_pWings_Paint_Translucent_B9
	@MATERIAL
	{
		mesh = Mesh2
		
		vector = _DiffuseNorm,0.64,0.84,1.0
		vector = _MetalNorm,0.5,0.5,1.0
		vector = _SmoothnessNorm,0.5,0.5,1.0
		
		texture = _MainTex,TURD/TU_pWings_Recolour/DYJ_ProcWing_B9/180_pWings_B9_Spec
		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_pWings_Recolour/DYJ_ProcWing_B9/180_pWings_B9_Spec
		texture = _MaskTex,TURD/TU_pWings_Recolour/DYJ_ProcWing_B9/180_pWings_B9_Paint
	}
}

// ProceduralDynamics/Parts/DYJproceduralwingSPP

@PART[ProceduralwingSPP]:FOR[zzzz_Something_after_P_because_2]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@MODULE[KSPTextureSwitch],0
	{
		textureSet = MWNN_pWings_Paint_Translucent_SPP
	}
}
+KSP_TEXTURE_SET[MWNN_Stock_Paint_Translucent]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = MWNN_pWings_Paint_Translucent_SPP
	@MATERIAL
	{
		mesh = Wing
		
		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,TURD/TU_pWings_Recolour/DYJ_ProcWing_SPP/180_pWings_SPP_Spec
		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_pWings_Recolour/DYJ_ProcWing_SPP/180_pWings_SPP_Spec
		texture = _MaskTex,TURD/TU_pWings_Recolour/DYJ_ProcWing_SPP/180_pWings_SPP_Paint
	}
}

// ProceduralDynamics/Parts/procedural_ControlSurface_1

@PART[pCtrlSrf1]:FOR[zzzz_Something_after_P_because_2]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@MODULE[KSPTextureSwitch],0
	{
		textureSet = MWNN_pWings_Paint_Translucent_ctrlsurf
	}
}
+KSP_TEXTURE_SET[MWNN_Stock_Paint_Translucent]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = MWNN_pWings_Paint_Translucent_ctrlsurf
	@MATERIAL
	{
		mesh = Collider_001
		
		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,TURD/TU_pWings_Recolour/Proc_ctrlsurf_1/180_pWings_ctrlsurf_Spec
		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_pWings_Recolour/Proc_ctrlsurf_1/180_pWings_ctrlsurf_Spec
		texture = _MaskTex,TURD/TU_pWings_Recolour/Proc_ctrlsurf_1/180_pWings_ctrlsurf_Paint
	}
}

// ProceduralDynamics/Parts/procedural_ControlSurface_SH_4m

@PART[B9_Aero_Wing_ControlSurface_SH_4mProcedural]:FOR[zzzz_Something_after_P_because_2]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@MODULE[KSPTextureSwitch],0
	{
		textureSet = MWNN_pWings_Paint_Translucent_SHctrlsurf
	}
}
+KSP_TEXTURE_SET[MWNN_Stock_Paint_Translucent]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = MWNN_pWings_Paint_Translucent_SHctrlsurf
	@MATERIAL
	{
		mesh = Mesh1
		
		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,TURD/TU_pWings_Recolour/Proc_ctrlsurf_SH/180_pWings_SHctrlsurf_Spec
		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_pWings_Recolour/Proc_ctrlsurf_SH/180_pWings_SHctrlsurf_Spec
		texture = _MaskTex,TURD/TU_pWings_Recolour/Proc_ctrlsurf_SH/180_pWings_SHctrlsurf_Paint
	}
}

 

This has issues, some of which are apparent in the previous screenshot. Other things to note, this just reuses the existing textures. Things could be better with custom textures that would essentially be a flat single colour with some dirt perhaps but if you play around you'll better see why it never went further than testing with existing textures.

Edited by Manwith Noname
Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...
  • 5 weeks later...
  • 2 weeks later...
  • 2 weeks later...
  • 2 weeks later...

I've managed to edit config to add a part, and in KSP the part is showing the menu to open the GUI but my texture isn't loading into the part... looking at the config it's linking to the texture. Any general idea of what I'm doing incorrectly?

Link to comment
Share on other sites

@NaviG Usually the lack of emissive texture showing is a result of the alpha layer being set for transparency. It can be fixed with a modified copy that set the alpha channel values to 1.

@CalixK Probably best to post the config code so I can glance over it either here or via PM. Things that can lead to this off the top of my head are typos, which can sometimes be hard to spot when you've been staring at text for hours and incorrect mesh assignment if you are trying to specify those.

Link to comment
Share on other sites

heXplAY.png0ao5Ev5.pngnyOkiaa.pngWv5InYV.png

3 hours ago, Manwith Noname said:

@NaviG Usually the lack of emissive texture showing is a result of the alpha layer being set for transparency. It can be fixed with a modified copy that set the alpha channel values to 1.

@CalixK Probably best to post the config code so I can glance over it either here or via PM. Things that can lead to this off the top of my head are typos, which can sometimes be hard to spot when you've been staring at text for hours and incorrect mesh assignment if you are trying to specify those.

Thank you so much for your response!

https://imgur.com/a/iAAR3aF

Does this help any? I have experience in photoshop so I've extracted the texture and painted a mask over it then used that file name after copying your code.

I'm not the best at coding but can understand a pattern so I tried to follow yours. Overall I've very grateful for any help.

Edited by CalixK
Link to comment
Share on other sites

@CalixK

Alright just to provide what I think will fix it, a quick check leads me to suspect it is the mesh naming due to case sensitivity. So for example you need to use the mesh names Wing_D and Wing_E instead of wing_d and wing_e.

A couple of notes about this and some other advice...

1) There are a number of tools out there that it will greatly benefit you to be aware of.

a) One is built in to Textures Unlimited itself. If you find the GeneralConfiguration.cfg file there is an entry to enable UV exports. I highly recommend loading the game once with this feature enabled and only whatever models you want to export installed then disabling it. If you have lots of parts mods, it will take a very, very long time to process them all so I'll reiterate, only enable this with the parts you want to export in the GameData folder. You can even remove the majority of the Squad parts folder but for simplicity I would leave that alone. That said, modern CPUs may fair better than  the aging Haswell chip I have as a mental reference. I should try this on my newer chips but I digress. The game will look like it pauses at a certain point during loading. It will create a folder in the game install that will contain wireframe UV maps for every part it detects in the game as svg format alongside a text file that details various properties about those parts. You can ascertain the correct mesh names to use via these files. The UV maps can also be useful when imported in to your graphics editor of choice to help understand where the mesh is transposed in the 2D space. I suspect once you play around with this you'll understand it.

b) There are some other mods that can be useful in this regard also, like Object Inspector or DebugStuff. As an example...

Spoiler

F8390B23512B2C12B626436EF6203E96CB333196

...this gives you a visual indication of the mesh name and wireframe within the game if you prefer that over exporting the UV maps and text data via TU.

c) Blender and the KSP plugin. Kind of a mix of both of the above. You can view the model, the UV map, the textures. I typically load in to Blender when UV maps and textures are all over the place making it difficult to see what is where. While I prefer to do my actual painting and texture authoring within GIMP, Blender has been infinitely useful at times to just paint on a model and see where that appears on a texture.

d) Other softwares and utilities may be available that can do the same things. Use whatever you find that suits you best.

2) I don't know how far you are in to this but I would highly recommend not adding your configs and textures to the existing OPT Recolour files and folders. Make a new TU_OPT_Legacy or simlarly named folder that sits alongside the other existing "packs" and store your files there. It's not that I have a problem with you altering or adding to the files but if I update my OPT pack (which I kinda feel it could probably do with a refresh at some point to add more layers on some parts), you'll end up having to transpose your work over again or worse, potentially losing it if you did not have a backup. The sooner you do this, the less laborious it would be. Plus, if you complete covering Legacy parts and want to share it, compatibility will be almost ensured without people having to overwrite the existing OPT pack files.

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