Jump to content

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


Shadowmage

Recommended Posts

3 minutes ago, New Horizons said:

Do you have errors in your log, when using TU and ROTanks?

I have 40 of those:

[LOG 22:08:58.333] ERROR: Could not locate TextureSet for MODEL_SHADER from global cache for the input name of: 

That report belongs in the thread of whatever configuration (patch) set you are using; whomever it was that provided the configs that are adjusting the tanks.  As I am not the author of those configs, I cannot say how those configs are set up, or if that message is intended with those configs, or an actual error.

Link to comment
Share on other sites

Been working through the post-process stack (v2) setup a bit, and it seems like most of the effects work in KSP fairly well, if used and configured properly.  Definitely ran into a few big '?' inducing moments though...

Motion-blur in map-scene is a no-go:

MlBSCol.png

Auto-exposure can do fun(ny) things if you play with the settings:

V5yZIqD.png

 

But when used in moderation, the effects can be fairly pleasant and not distracting:

Before:

d4R9WUn.png

After:

gxSM0rQ.png

 

At this point I'm only partway done with the in-game config editing UI, but full text-file (standard KSP .cfg file) based profile creation and in-game per-scene profile selection is in place and working.  Will likely have more news to share on this later...

 

Edited by Shadowmage
Link to comment
Share on other sites

12 hours ago, dtoxic said:

is there any performance impact? looks great btw!

Undoubtedly, there will be some performance impact.  I haven't noticed anything notable on my PC, but its not exactly a potato.  I'll likely do some frame-rate studies and comparisons vs KS3P before I do any releases (which will be done under a separate mod; not as part of TU).  So far I would say it has lower impact than KS3P (which uses post-process stack v1), but I don't have any proof at this time.

 

6 hours ago, Chaotic Protocol said:

Hello, I might be really stupid but what are the keybinds for the editor?

TU does not have any keybinds, in the editor or otherwise.  Curious what you are thinking would need one?

All of TU's texture-switching is done through the right-click menu on the parts, using the standard part action window with sliders/selection widgets.  The recoloring features are also launched from the part-right-click menu ('Open Recolor GUI').

 

12 minutes ago, Electrocutor said:

@Shadowmage Do you intend to include your lightweight atmospheric scattering shader along with the post-process stuff?

Currently, no; I never finished it / never got it fully usable.  Got stuck on the 'volumetric clouds' feature, which didn't seem to be going the direction that I wanted (looked great; ran terribly).

Might be something I look into again in the future, but I might also just leave the volumetric environment stuff to the current experts; I don't think there is much to be gained by my creation of a new system (contrast to KS3P, which is no longer maintained, and using old/unsupported Unity packages).

Link to comment
Share on other sites

On 2/29/2020 at 12:27 PM, Manwith Noname said:

Additionally to what @Shadowmage mentioned, make sure you have reflections enabled in the game options, without that, parts configured to make use of them tend to appear quite dark. Also, if you're sending mirror like objects in to space they tend to look black too. :D

As for why pwings doesn't work, I'd need to see the config as I take it you managed to get the recolour pack working.

Sorry for a late reply. What reflection settings should I have? I'll send you the config when I get back home. 

Edited by Arco123
Link to comment
Share on other sites

1 minute ago, Arco123 said:

Sorry for a late reply. What reflection settings should I have? I'll send you the config when I get back home. 

He means the actual in-game settings. Squad defaults KSP to have the majority of visuals turned off or at low quality.

Link to comment
Share on other sites

Just now, Electrocutor said:

He means the actual in-game settings. Squad defaults KSP to have the majority of visuals turned off or at low quality.

I know that but I don't know how much should I up the settings. I know reflection but I don't know what level I should put it at. Max settings?

Link to comment
Share on other sites

Just now, Arco123 said:

I know that but I don't know how much should I up the settings. I know reflection but I don't know what level I should put it at. Max settings?

I just use low 128 most of the time unless I happen to have some parts with large reflections on them, like a giant glass dome.

Link to comment
Share on other sites

1 hour ago, Shadowmage said:

TU does not have any keybinds, in the editor or otherwise.  Curious what you are thinking would need one?

All of TU's texture-switching is done through the right-click menu on the parts, using the standard part action window with sliders/selection widgets.  The recoloring features are also launched from the part-right-click menu ('Open Recolor GUI').

 

Hmm, for some reason the GUI isn't popping up in my game. I'm going to troubleshoot this afternoon and see what's going on. Thank you!

Link to comment
Share on other sites

1 hour ago, Chaotic Protocol said:

Hmm, for some reason the GUI isn't popping up in my game. I'm going to troubleshoot this afternoon and see what's going on. Thank you!

So, you right-click on the part, press the 'Open Recolor GUI' button, and nothing happens?

Or is the problem that there is no 'Open Recolor GUI' button on the part-right click menu?

(the first would be a bug with the mod, the second is likely configuration/patch related for whatever set of configs you are using;  you are using a config set?)

Link to comment
Share on other sites

3 minutes ago, Shadowmage said:

So, you right-click on the part, press the 'Open Recolor GUI' button, and nothing happens?

Or is the problem that there is no 'Open Recolor GUI' button on the part-right click menu?

(the first would be a bug with the mod, the second is likely configuration/patch related for whatever set of configs you are using;  you are using a config set?)

No open GUI button, I am (Attempting) to use TURD with it. For some odd reason I might've had ReStock installed which is what I think is causing said issue. Like I said, I'm pretty sure I'm just an idiot. Oof

 

Link to comment
Share on other sites

3 minutes ago, Chaotic Protocol said:

had ReStock installed

Yes, having restock installed will either disable or trample over the configs, as they were written for the stock parts and not the restock parts; different models, different textures, entirely different config setups needed.

Also note, the 'open recolor gui' button will only be available on specific parts (the ones that have configs written, and mask textures created), and will only be visible in the editor.

Please let me know if you find out more.  Might also be worth posting up your KSP.log file (to some file-sharing/hosting site), as that might contain additional information on what is/is not working/why.

Link to comment
Share on other sites

32 minutes ago, Shadowmage said:

Yes, having restock installed will either disable or trample over the configs, as they were written for the stock parts and not the restock parts; different models, different textures, entirely different config setups needed.

Also note, the 'open recolor gui' button will only be available on specific parts (the ones that have configs written, and mask textures created), and will only be visible in the editor.

Please let me know if you find out more.  Might also be worth posting up your KSP.log file (to some file-sharing/hosting site), as that might contain additional information on what is/is not working/why.

I'll give this a try and make sure it's only ReStock. I've had issues in the past running solely this mod, but if need be I'll try my hand in writing a config for ReStock. Thank you for the help guy, It's greatly appreciated. Cheers!

Link to comment
Share on other sites

I have two. Default and Recolour: The don't work btw. (Proc wings.)

Spoiler

Default 


// ProceduralDynamics/Parts/DYJproceduralwing2

@PART[Proceduralwing2,ProceduralAllMovingWing]:FOR[000_Standardised_Switching]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	MODULE
	{
		name = KSPTextureSwitch
		sectionName = Appearance
		currentTextureSet = Stock_Default_pWings_2
		textureSet = Stock_Default_pWings_2
	}
	%MODULE[SSTURecolorGUI]
	{
		%name = SSTURecolorGUI
	}
}
+KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = Stock_Default_pWings_2
	@MATERIAL
	{
		@shader = KSP/Diffuse
		
		mesh = Cube
		
		texture = _MainTex,ProceduralDynamics/Parts/DYJproceduralwingAllMovingSurface/model000
	}
}

// ProceduralDynamics/Parts/DYJproceduralwing2endcap

@PART[Proceduralwing2EndPiece]:FOR[000_Standardised_Switching]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	MODULE
	{
		name = KSPTextureSwitch
		sectionName = Appearance
		currentTextureSet = Stock_Default_pWings_End
		textureSet = Stock_Default_pWings_End
	}
	%MODULE[SSTURecolorGUI]
	{
		%name = SSTURecolorGUI
	}
}
+KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = Stock_Default_pWings_End
	@MATERIAL
	{
		@shader = KSP/Diffuse
		
		mesh = Cube
		
		texture = _MainTex,ProceduralDynamics/Parts/DYJproceduralwing2endcap/model000
	}
}

// ProceduralDynamics/Parts/DYJproceduralwing3

@PART[Proceduralwing4]:FOR[000_Standardised_Switching]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	MODULE
	{
		name = KSPTextureSwitch
		sectionName = Appearance
		currentTextureSet = Stock_Default_pWings_3
		textureSet = Stock_Default_pWings_3
	}
	%MODULE[SSTURecolorGUI]
	{
		%name = SSTURecolorGUI
	}
}
+KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = Stock_Default_pWings_3
	@MATERIAL
	{
		@shader = KSP/Diffuse
		
		mesh = obj_ctrlSrf
		mesh = Circle
		
		// texture = _MainTex,TURD/TU_pWings_Recolour/DYJ_ProcWing_3/180_pWings_3_Diff
	}
}

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

// ProceduralDynamics/Parts/DYJproceduralwingB9

@PART[ProceduralwingBac9]:FOR[000_Standardised_Switching]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	MODULE
	{
		name = KSPTextureSwitch
		sectionName = Appearance
		currentTextureSet = Stock_Default_pWings_B9
		textureSet = Stock_Default_pWings_B9
	}
	%MODULE[SSTURecolorGUI]
	{
		%name = SSTURecolorGUI
	}
}
+KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = Stock_Default_pWings_B9
	@MATERIAL
	{
		@shader = KSP/Specular
		
		mesh = Mesh2
		
		texture = _MainTex,ProceduralDynamics/Parts/DYJproceduralwingB9/model000
	}
}

// ProceduralDynamics/Parts/DYJproceduralwingSPP

@PART[ProceduralwingSPP]:FOR[000_Standardised_Switching]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	MODULE
	{
		name = KSPTextureSwitch
		sectionName = Appearance
		currentTextureSet = Stock_Default_pWings_SPP
		textureSet = Stock_Default_pWings_SPP
	}
	%MODULE[SSTURecolorGUI]
	{
		%name = SSTURecolorGUI
	}
}
+KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = Stock_Default_pWings_SPP
	@MATERIAL
	{
		@shader = KSP/Specular
		
		mesh = Wing
		
		texture = _MainTex,ProceduralDynamics/Parts/DYJproceduralwingSPP/procWings
	}
}

// ProceduralDynamics/Parts/procedural_ControlSurface_1

@PART[pCtrlSrf1]:FOR[000_Standardised_Switching]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	MODULE
	{
		name = KSPTextureSwitch
		sectionName = Appearance
		currentTextureSet = Stock_Default_pWings_ctrlsurf
		textureSet = Stock_Default_pWings_ctrlsurf
	}
	%MODULE[SSTURecolorGUI]
	{
		%name = SSTURecolorGUI
	}
}
+KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = Stock_Default_pWings_ctrlsurf
	@MATERIAL
	{
		@shader = KSP/Specular
		
		mesh = Collider_001
		
		texture = _MainTex,ProceduralDynamics/Parts/procedural_ControlSurface_1/model000
	}
}

// ProceduralDynamics/Parts/procedural_ControlSurface_SH_4m

@PART[B9_Aero_Wing_ControlSurface_SH_4mProcedural]:FOR[000_Standardised_Switching]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	MODULE
	{
		name = KSPTextureSwitch
		sectionName = Appearance
		currentTextureSet = Stock_Default_pWings_SHctrlsurf
		textureSet = Stock_Default_pWings_SHctrlsurf
	}
	%MODULE[SSTURecolorGUI]
	{
		%name = SSTURecolorGUI
	}
}
+KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = Stock_Default_pWings_SHctrlsurf
	@MATERIAL
	{
		@shader = KSP/Specular
		
		mesh = Mesh1
		
		texture = _MainTex,ProceduralDynamics/Parts/procedural_ControlSurface_SH_4m/model000
	}
}
Spoiler

Recolor


// ProceduralDynamics/Parts/DYJproceduralwing2

@PART[Proceduralwing2,ProceduralAllMovingWing]:FOR[zzzz_Something_after_P_because_1]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@MODULE[KSPTextureSwitch],0
	{
		textureSet = MWNN_pWings_Paint_AMW
	}
}
+KSP_TEXTURE_SET[MWNN_Stock_Paint]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = MWNN_pWings_Paint_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,ProceduralDynamics/Parts/DYJproceduralwingAllMovingSurface/model000
		texture = _MainTex,TURD/TU_pWings_Recolour/DYJ_ProcWing_2/180_pWings_2_Diff
		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_1]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@MODULE[KSPTextureSwitch],0
	{
		textureSet = MWNN_pWings_Paint_End
	}
}
+KSP_TEXTURE_SET[MWNN_Stock_Paint]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = MWNN_pWings_Paint_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,ProceduralDynamics/Parts/DYJproceduralwing2endcap/model000
		texture = _MainTex,TURD/TU_pWings_Recolour/DYJ_ProcWing_2End/180_pWings_End_Diff
		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_1]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@MODULE[KSPTextureSwitch],0
	{
		textureSet = MWNN_pWings_Paint_3
	}
}
+KSP_TEXTURE_SET[MWNN_Stock_Paint]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = MWNN_pWings_Paint_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 = _MainTex,TURD/TU_pWings_Recolour/DYJ_ProcWing_3/180_pWings_3_Diff
		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_3/180_pWings_3_Spec
		texture = _MetallicGlossMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Occ
		// texture = _MaskTex,TURD/TU_pWings_Recolour/DYJ_ProcWing_3/180_pWings_3_Paint
		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_1]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@MODULE[KSPTextureSwitch],0
	{
		textureSet = MWNN_pWings_Paint_B9
	}
}
+KSP_TEXTURE_SET[MWNN_Stock_Paint]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = MWNN_pWings_Paint_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,ProceduralDynamics/Parts/DYJproceduralwingB9/model000
		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_1]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@MODULE[KSPTextureSwitch],0
	{
		textureSet = MWNN_pWings_Paint_SPP
	}
}
+KSP_TEXTURE_SET[MWNN_Stock_Paint]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = MWNN_pWings_Paint_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,ProceduralDynamics/Parts/DYJproceduralwingSPP/procWings
		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_1]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@MODULE[KSPTextureSwitch],0
	{
		textureSet = MWNN_pWings_Paint_ctrlsurf
	}
}
+KSP_TEXTURE_SET[MWNN_Stock_Paint]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = MWNN_pWings_Paint_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,ProceduralDynamics/Parts/procedural_ControlSurface_1/model000
		texture = _MainTex,TURD/TU_pWings_Recolour/Proc_ctrlsurf_1/180_pWings_ctrlsurf_Diff
		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_1]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@MODULE[KSPTextureSwitch],0
	{
		textureSet = MWNN_pWings_Paint_SHctrlsurf
	}
}
+KSP_TEXTURE_SET[MWNN_Stock_Paint]:NEEDS[TexturesUnlimited,ProceduralDynamics]
{
	@name = MWNN_pWings_Paint_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,ProceduralDynamics/Parts/procedural_ControlSurface_SH_4m/model000
		// texture = _MainTex,TURD/TU_pWings_Recolour/Proc_ctrlsurf_SH/180_pWings_SHctrlsurf_Diff
		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
	}
}

 

Link to comment
Share on other sites

5 hours ago, Arco123 said:

Sorry for a late reply. What reflection settings should I have? I'll send you the config when I get back home. 

You can have any settings so long as the reflections are enabled, so any update besides none. Personally, I use every frame but what you set comes down to preference and capability of your hardware. Not that I find the reflections particularly demanding.

 

2 hours ago, Chaotic Protocol said:

ReStock

If you have Restock installed, 99% of the stock recolour is disabled both via configs and use of the blacklist plugin. Basically, right now, if you're going to use Restock the only parts you'll be able to recolour are those made by Porkjet or other external mods.

 

1 hour ago, Arco123 said:

I have two. Default and Recolour: The don't work btw. (Proc wings.)

Do you have the main Stock recolour installed? If not, these will not function as they rely on modifying existing texture sets created there.

A later edit specific to this point:

I just got round to downloading the latest official release of TU and put it in KSP 1.9, the pWings configs should work if you have the main recolour pack too. If this isn't the case, as below, please raise the issue in the recolour thread.

Spoiler

7900746F0C66DD5241A6B19F983E6326EC645EB9

 

Edit:

Also, if you're having problems specifically with the configs and texture packs I have put together, might be best to take those queries to the recolour thread.

Edited by Manwith Noname
Link to comment
Share on other sites

TUFX is nearing a releasable state.  The in-game config editing UI is cleaned up and very usable; everything except for Color Grading can be configured through the UI (and even it can partially).  Profile exporting is in place (it dumps to log file, you have to manually update the physical file(s)).

Left to do is figure out why if I even -touch- the Editor camera things go wonky (things start sliding all over, etc); currently I've simply disabled effects in the editors.  I also need to create some sort of float-curve (spline) based editing window/system, as well as some sort of ability to specify texture parameters to those effects that allow texture inputs (vignette mask, dirt texture for blur, LUTs for color-grading and a few other effects, etc).

Profile selection:
RvrCIH8.png

Profile editing mode in the UI -- takes a moment to get used to, but it all flows and works quite well, especially considering the sheer number of config values being exposed.
Q9qWJDc.png

Yes, all of these effects work... (not that I'll personally use even half of them, but they were part of the package, so might as well include them as long as they were functional)

8NPuO80.png


Will likely clean up the existing stuff and look for some initial 'beta' releases this weekend.  Might take me a few weeks to figure out how to deal with the spline parameters and texture parameters from the UI perspective, but both can be manually specified in the profiles if needed (though there won't be any examples of the syntax available outside of the source-code).

Link to comment
Share on other sites

Hi all!

First, thanks for this mod, it's so coool!
Then, after testing some recoloring / switching config, i'd like to explore this mod by creating my own config for my personnal usage.

I've got a problem, in game, i've the switching gui, then the recoloring box when the texture set is recolorable but when i switch / recolor my part, there is no effect, the material still the same.. i've no error in my KSP.log, the mod is fine loaded so ... i need the community help ! :)

Here is the config i created, i use only this mod (except TU and MM), i'm on KSP 1.7.3 and i try to setup tu on the I Beam 200 strutural part.

@REFLECTION_CONFIG[Default]:NEEDS[TexturesUnlimited]
{
	%enabled = true
}

@PART[structuralIBeam2]:NEEDS[TexturesUnlimited]
{
	
	MODULE
	{
		name = KSPTextureSwitch
		
		//transformName = AspectTransform
		
		sectionName = Aspect
		
		currentTextureSet = Tex-A
		
		textureSet = Tex-A
		textureSet = Tex-B
		textureSet = Tex-C
	}
	MODULE
	{
		name = SSTURecolorGUI
	}
}

KSP_TEXTURE_SET:NEEDS[TexturesUnlimited]
{
	name = Tex-A
	title = Squad
	recolorable = false
	
	MATERIAL
	{
		shader = KSP/Emissive/Bumped Specular
		
		mesh = ibeam2
		//mesh = structuralIBeam2
		
		texture = _MainTex,Squad/Parts/Structural/structuralIBeam200/model000
		texture = _BumpMap,Uohcnam-TU/000_PlaceholderTextures/Bump
		texture = _Emissive,Uohcnam-TU/000_PlaceholderTextures/Emis
	}
}

KSP_TEXTURE_SET:NEEDS[TexturesUnlimited]
{
	name = Tex-B
	title = Uohcnam
	recolorable = false
	
	MATERIAL
	{
		shader = TU/Metallic
		
		texture = _MainTex, Uohcnam_TU/Parts/Structural/structuralIBeam200/SIB200_DIFF
		texture = _MetallicGlossMap, Uohcnam_TU/Parts/Structural/structuralIBeam200/SIB200_MET
		
		mesh = ibeam2
	}
}

KSP_TEXTURE_SET:NEEDS[TexturesUnlimited]
{
	name = Tex-C
	title = Uohcnam TU
	recolorable = true
	
	MATERIAL
	{
		shader = TU/Metallic
		
		keyword = TU_RECOLOR
		
		mesh = ibeam2
		
		vector = _DiffuseNorm,0.4,0.74,0.74
		vector = _MetalNorm,0.2,0.5,0.5
		vector = _SmoothnessNorm,0.2,0.5,0.5
		
		texture = _MainTex,Squad/Parts/Structural/structuralIBeam200/model000
	}
	COLOR
	{
		mainColor = steel
		secondColor = silver
		detailColor = steel
	}
}

Thanks for your help ! :)

Link to comment
Share on other sites

9 hours ago, Uohcnam said:

I've got a problem, in game, i've the switching gui, then the recoloring box when the texture set is recolorable but when i switch / recolor my part, there is no effect, the material still the same.. i've no error in my KSP.log, the mod is fine loaded so ... i need the community help !

 

If you want the texture sets to be recolorable, you first need to set the 'recolorable' flag to 'true':

9 hours ago, Uohcnam said:

recolorable = false

 

You must also then provide a mask texture, such as can be seen below ('texture = _MaskTex,Texture/Path/And/Name'), add the 'keyword = TU_RECOLOR property to material blocks, and add the COLORS block to specify the default colors for the part:

KSP_TEXTURE_SET
{
	name = SSTU-SC-C-BPC-A
	title = Standard
    recolorable = true
	MATERIAL
	{
		shader = TU/Metallic
		excludeMesh = SC-B-BPC-FlagTransform
		texture = _MainTex, SSTU/Assets/SC-C-BPC-DIFF-A
		texture = _BumpMap, SSTU/Assets/SC-C-BPC-NRM
		texture = _MetallicGlossMap, SSTU/Assets/SC-C-BPC-MET
		texture = _AOMap, SSTU/Assets/SC-C-BPC-MET
		texture = _MaskTex, SSTU/Assets/SC-C-BPC-MASK-A
		keyword = TU_RECOLOR
		vector = _DiffuseNorm,0.5,0.5,0.5
		vector = _MetalNorm,0.5,0.5,0.5
		vector = _SmoothnessNorm,0.5,0.5,0.5
	}
	COLORS
	{
		mainColor = white
		secondColor = black
		detailColor = silver
	}
}

 

Looks like you have 'recolorable = true', so the GUI will show up.  You have the COLORS block, so your default colors are specified.  You've even specified the normalization parameters (which may not be correct, if you don't have a mask to use to calculate them).

What is missing?  The _MaskTex (mask texture) -- this is a texture that tells the recoloring system what portions of the original texture are effected by the 'main' 'second' and 'detail' selections in the recoloring GUI.  This mask texture should be RED in portions that will be recolored by the 'main' section, GREEN for 'second', and BLUE for 'detail', and BLACK in portions that are not recolorable.  As you have not provided a mask texture, the default is 'FULL BLACK' which means that you have specified that nothing is recolorable by leaving out that texture.

  An example of a mask texture can be seen here: (on the part)

1BCGPso.png

 

And here is a mask texture (viewed as a texture), this one is for the MK2 cockpit:

EW1E2mc.png

 

Yes, in order to make things recolorable you need to get your hands dirty and author textures; at least one per part.  The entire system was intended to be used by mod authors, for their own mods' parts, and as such they would already have access to their UV maps and existing textures, so mask creation would be simple.  Trying to do the same for stock parts though is... a bit of a pain.  Thankfully, @Manwith Noname has already done 99.9% of this work (creating masks and configs for stock parts; the SRB mask example above is from his work), which is available through the TURD thread (and likely has a config and mask for the exact part you are working on, could at least be used for examples for further learning): 

Please let me know if you needed any additional information on this;

 

Edited by Shadowmage
Link to comment
Share on other sites

On 11/11/2017 at 3:18 PM, Shadowmage said:

Back-lit Solar Panel Shader + PBR shaders (+EVE + Scatterer) (solar panels still using legacy backlit shader)

VbF1Usq.png4DUco5h.png

Reflection of surroundings; colored ambient light handling

YV9Xbl3.pngLkJkiEw.png  SJakqu2.png

How do you get these to work?

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