Shadowmage

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

Recommended Posts

It does use PartVariants and is working fine in the recolour project but I switched from "black listing" to "white listing" meshes a while back due to chasing tales of other mods that "replace" stock parts.

Spoiler

5821961C70E972CF704194F9F2859B5D9D1E4F75

Bottom 3 are stock, middle 3 are TU Metallic, Top 2 are recoloured.

 

Share this post


Link to post
Share on other sites
1 hour ago, Shadowmage said:

Have a config that you wouldn't mind sharing?

Sure, here's the relevant section of the config. I left out the definition for Roverbody_VSR as it doesn't seem to matter here.

KSP_TEXTURE_SET
{
	name = Roverbody_White
	MATERIAL        
	{
		shader = TU/Metallic
		PROPERTY
		{
			name = _Metal
			float = 0.7
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.97
		}
		excludeMesh = Flag
		keyword = TU_STOCK_SPEC
		texture = _MainTex, Squad/Parts/Command/probeCoreCube/QBE_New_diffuse
		texture = _BumpMap, Squad/Parts/Command/probeCoreCube/QBE_New_NRM
	}
}

@PART[roverBody]:FOR[TU_VSR]:NEEDS[VenStockRevamp]
{
	MODULE
	{
		name = KSPTextureSwitch
		textureSet = Roverbody_VSR
	}
}

@PART[roverBody_v2|ChopShop_RoverXL]:FOR[TU_VSR]:NEEDS[VenStockRevamp]
{
	@MODULE[ModulePartVariants]
	{
		@VARIANT[VSRGrayAndBlack]
		{
			EXTRA_INFO
			{
				textureSet = Roverbody_VSR
			}
		}
		@VARIANT[White]
		{
			EXTRA_INFO
			{
				textureSet = Roverbody_White
			}
		}
	}
	MODULE
	{
		name = TUPartVariant
	}
}

I figured I wouldn't have to patch Gold and Silver because they already are reflective. White is patched because it's the only stock variant with normal shaders applied.

Edited by Delay

Share this post


Link to post
Share on other sites
2 hours ago, Manwith Noname said:

you'll want to setup each variant to use Texture Sets.

I don't want to modify any of those variants. I'm happy with them the way they are. Heck, I'm only modifying the stock (even though with Ven's installed there's no need to) merely to keep things consistent*.

*Well, @Shadowmage and I know of one Ven's part that can't be patched. Rest assured, though: As far as I can tell the Skipper is the only part that behaves strangely.

Share this post


Link to post
Share on other sites
1 hour ago, Delay said:

I don't want to modify any of those variants.

Essentially, you don't alter them, you create a texture set that mimics them so TU can deal with them appropriately.

Share this post


Link to post
Share on other sites
On 10/19/2019 at 4:41 AM, Manwith Noname said:

Essentially, you don't alter them, you create a texture set that mimics them so TU can deal with them appropriately.

What would be the best way to do that? Guessing?

Share this post


Link to post
Share on other sites

@Delay

No need to guess anything for those rover body probe cores, it's all there in the part config, the shader, the mesh names, values for shader input...

Spoiler

VARIANT
		{
			name = Silver
			displayName = #autoLOC_6005005
			themeName = Silver
			primaryColor = #cecece
			TEXTURE
			{
				shader=KSP/Bumped Specular (Mapped)
				mainTextureURL = Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_silver_diffuse
				color = #ffffff
				_BumpMap= Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_silver_NRM
				_SpecMap= Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_silver_specular
				_Shininess= 0.82
				_Opacity= 1.0
				_RimFalloff= 2.0
				_AmbientMultiplier= 0.3
			}
			GAMEOBJECTS
			{
				bodyWhite = false
				bodyFoil = true
			}
		}
		VARIANT
		{
			name = Gold
			displayName = #autoLOC_8007118
			themeName = Gold
			primaryColor = #fccb0a
			TEXTURE
			{
				shader=KSP/Bumped Specular (Mapped)
				mainTextureURL = Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_gold_diffuse
				color = #efe38b
				_BumpMap= Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_gold_NRM
				_SpecMap= Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_gold_specular
				_Shininess= 0.82
				_Opacity= 1.0
				_RimFalloff= 2.0
				_AmbientMultiplier= 0.8
			}
			GAMEOBJECTS
			{
				bodyWhite = false
				bodyFoil = true
			}
		}

 

At most, for other parts you might have to guess at the shader in use but you can very much make an informed choice as there aren't that many part shaders used by Stock parts, though this might change somewhat with new releases perhaps but they'll probably end up just using two or three. Most new parts use a form of bumped spec, for example. Even then, I suspect you could probably import the models to blender or part tools and extract the information more accurately but I've never felt the need to go that far. Some shaders you might find useful...

Spoiler

KSP/Alpha/Cutoff
KSP/Alpha/Cutoff Bumped
KSP/Bumped
KSP/Bumped Specular
KSP/Diffuse
KSP/Emissive/Bumped Specular
KSP/Emissive/Diffuse
KSP/Emissive/Specular

KSP/Bumped Specular (Mapped)

 

Utility mods like DebugStuff and Object Inspector are at your disposal too for unearthing hidden secrets.

Edited by Manwith Noname

Share this post


Link to post
Share on other sites
On 9/9/2019 at 3:11 PM, Shadowmage said:

Shouldn't be any breakage on the config end of things either -- as far as I know at this time, nothing should really be broken by the update.

Well I hate to be the bearer of bad news and it is most certainly not your fault. Might not even be fixable on your end? But it looks like TU is totally screwed up under GLCore for Linux users. Shaders   work fine under Windows Dx11 as do all my old configs. But installing just TU under GLCore without even config files kills all the native shaders. And config files oversaturate everything they touch. Not asking for anything just a heads up and wondering if anyone else on Linux GLCore is reporting problems?

Edited by Delbrutis

Share this post


Link to post
Share on other sites
On 10/20/2019 at 8:31 PM, Manwith Noname said:

No need to guess anything for those rover body probe cores, it's all there in the part config, the shader, the mesh names, values for shader input...

So... I just tried this and now I can't get color to any of the maps. They're just white.
What's confusing me most is what name I should give to each map - the TU names (_MainTex, _MetallicGlossMap, etc)? Or the KSP names?
The gold diffuse actually has the color in it, so my conclusion is it doesn't load the map. But it loads the specular just fine, same with the bump map?

Share this post


Link to post
Share on other sites

@Delay

Texture assignment follows the same conventions but for this particular shader you want to point with _SpecMap rather than _MetallicGlossMap.

I did take a look and compare my sets with the default stock look in 1.8 and it's not exactly spot on with the same shader values applied. It's noticeably less shiny but then I remembered a previous conversation on this when the shader was first introduced. I'll dig back through the thread and link it in a bit.

 

Edit: Essentially, start here. Though, that test I think was applying TU metal shaders with stock files as opposed to applying the stock shader through TU texture sets.

Edited by Manwith Noname

Share this post


Link to post
Share on other sites
13 hours ago, Manwith Noname said:

_SpecMap

I tried using _SpecMap, the result was having no specular map...

As I've said, using TU names everything sans main texture (and with that the model's color) appears to work just fine. I have nice lines of different shades and different specularities, but a perfectly white part when it should be gold.

Share this post


Link to post
Share on other sites

@Delay

Here's my texture sets...

Spoiler

+KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited&!Restock]
{
    @name = Stock_Default_roverBody_v2_Silver
    @MATERIAL
    {
        @shader = KSP/Bumped Specular (Mapped)
        
        PROPERTY
        {
        name = _Color
        color = #ffffff
        }
        PROPERTY
        {
        name = _Shininess
        float = 0.82
        }
        PROPERTY
        {
        name = _Opacity
        float = 1.0
        }
        PROPERTY
        {
        name = _RimFalloff
        float = 2.0
        }
        PROPERTY
        {
        name = _AmbientMultiplier
        float = 0.3
        }
        
        
        // color = #ffffff
        // _Shininess= 0.82
        // _Opacity= 1.0
        // _RimFalloff= 2.0
        // _AmbientMultiplier= 0.3
        
        mesh = bodyFoil
        
        texture = _MainTex,Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_silver_diffuse
        texture = _BumpMap,Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_silver_NRM
        texture = _Emissive,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Emis
        // texture = _AOMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Occ
        texture = _SpecMap,Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_silver_specular
    }
}
+KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited&!Restock]
{
    @name = Stock_Default_roverBody_v2_Gold
    @MATERIAL
    {
        @shader = KSP/Bumped Specular (Mapped)
        
        PROPERTY
        {
        name = _Color
        color = #efe38b
        }
        // PROPERTY
        // {
        // name = _Shininess
        // float = 0.82
        // }
        // PROPERTY
        // {
        // name = _Opacity
        // float = 1.0
        // }
        // PROPERTY
        // {
        // name = _RimFalloff
        // float = 2.0
        // }
        // PROPERTY
        // {
        // name = _AmbientMultiplier
        // float = 0.8
        // }
        
        // color = #efe38b
        // float = _Shininess,0.82
        float = _Shininess,0.9
        float = _Opacity,1.0
        float = _RimFalloff,2.0
        float = _AmbientMultiplier,0.8
        
        mesh = bodyFoil
        
        texture = _MainTex,Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_gold_diffuse
        texture = _BumpMap,Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_gold_NRM
        texture = _Emissive,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Emis
        // texture = _AOMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Occ
        texture = _SpecMap,Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_gold_specular
    }
}

Yes, those texture sets might look odd and different but the end result is the same, I was just testing what works and if results change. I've been meaning to do more testing to make sure the fields are actually being applied but given the end result is pretty close to Stock and without any of them, the result was way off, I kinda moved on with the intention to go back once I had other things I wanted to address sorted.

 

You could of course build your pack to utilise the standardised switching and follow the concept of adding extra sets with all the heavy lifting already in place. That was mainly the point of the permissive license and structure taken within TURD. The Standardised Switching and placeholder textures was to enable everyone making packs to play in the same sandpit and not waste others time and hard work. I've also toyed with the idea of bundling fixed version of the problematic emissive textures in here. I just never got round to uploading it as a separate download outside of the recolour pack because Squad keep changing everything (which they've done again with all the nose cones) and it was one less download to keep updating. This is also why the "Extras" pack, which contained a generic "make things shiny" set has been bundled back in the main recolour download. The real idea behind that metallic file was a "stop gap" and to give a template that anyone making metallicglossmaps could simply change the texture set names, change the [FOR] number for ordering and point to their textures without needing to write the entire config from scratch.

Share this post


Link to post
Share on other sites

@Manwith Noname I copied over the _Color for the gold foil and sure enough, the color is back!

However, the flag mesh, or at least it seems to be the flag mesh, is still messed up. I also went over to whitelisting this part rather than blacklisting, so Flag shouldn't even be affected!
sSECvYr.png

Share this post


Link to post
Share on other sites

@Delay

Given what you've just done, first thing that springs to mind, make sure it's "mesh" and not "Mesh", case is important. Though, this is kinda back to square one anyway so it's probably not that. Are you using the latest release of Textures Unlimited? I'm off out but it might be an idea to open up the module manager cache file and look at how the patch ends up. Search for roverBody_v2, check out the entire part and that it looks like you intend. Maybe copy that here along with how the texture sets appear. You'll have something like this...

Spoiler

UrlConfig
{
	parentUrl = Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2.cfg
	PART
	{
		name = roverBody_v2
		module = Part
		author = AlexanderM
		rescaleFactor = 1
		node_stack_right = 0.510226, 0, 0, 1, 0, 0, 0
		node_stack_left = -0.510226, 0, 0, -1, 0, 0, 0
		node_stack_back = 0, 0, 0.22407, 0, 0, 1, 1
		node_stack_front = 0, 0, -0.22407, 0, 0, -1, 1
		node_stack_bottom = 0.0, -0.746285, 0.0, 0.0, -1.0, 0.0, 0
		node_stack_top = 0.0, 0.746285, 0.0, 0.0, 1.0, 0.0, 0
		TechRequired = fieldScience
		entryCost = 6200
		cost = 800
		category = Pods
		subcategory = 0
		title = Probodobodyne RoveMate
		manufacturer = Probodobodyne Inc
		description = A sturdy housing for a robust probe and battery system - no assembly required! Though intended as the body for surface rovers, we've been told by our most day-dreaming of engineers that the possibilities are endless! While it has a Stability Assistance System, the RoveMate lacks reaction wheels so bring some along if you want to hold that attitude.
		attachRules = 1,0,1,1,0
		mass = 0.15
		dragModelType = default
		maximum_drag = 0.2
		minimum_drag = 0.15
		angularDrag = 1.5
		crashTolerance = 12
		maxTemp = 1200
		explosionPotential = 0
		vesselType = Probe
		bulkheadProfiles = size1
		tags = command control (core kerbnet probe rover sas space steer
		MODEL
		{
			model = Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2
			texture = QBE_New_diffuse, Squad/Parts/Command/probeCoreCube/QBE_New_diffuse
			texture = QBE_New_NRM, Squad/Parts/Command/probeCoreCube/QBE_New_NRM
		}
		MODULE
		{
			name = ModuleCommand
			minimumCrew = 0
			hasHibernation = True
			hibernationMultiplier = 0.25
			defaultControlPointDisplayName = Forward
			RESOURCE
			{
				name = ElectricCharge
				rate = 0.04
			}
			CONTROLPOINT
			{
				name = up
				displayName = Up
				orientation = -90,0,0
			}
			CONTROLPOINT
			{
				name = reverse
				displayName = Reversed
				orientation = 0,0,180
			}
		}
		RESOURCE
		{
			name = ElectricCharge
			amount = 120
			maxAmount = 120
		}
		MODULE
		{
			name = ModuleSAS
		}
		MODULE
		{
			name = ModuleKerbNetAccess
			EnhancedSituationMask = 7
			EnhancedMinimumFoV = 160
			EnhancedMaximumFoV = 179.5
			MinimumFoV = 5
			MaximumFoV = 10
			AnomalyDetection = 1
			DISPLAY_MODES
			{
				Mode = Biome,#autoLOC_438890
				Mode = Terrain,#autoLOC_438839
			}
		}
		MODULE
		{
			name = ModuleDataTransmitter
			antennaType = INTERNAL
			packetInterval = 1.0
			packetSize = 2
			packetResourceCost = 12.0
			requiredResource = ElectricCharge
			antennaPower = 5000
			optimumRange = 2500
			packetFloor = .1
			packetCeiling = 5
		}
		MODULE
		{
			name = FlagDecal
			textureQuadName = Flag
		}
		MODULE
		{
			name = ModulePartVariants
			baseVariant = White
			VARIANT
			{
				name = White
				displayName = White
				themeName = White
				primaryColor = #ffffff
				GAMEOBJECTS
				{
					bodyWhite = true
					bodyFoil = false
				}
				EXTRA_INFO
				{
					textureSet = Stock_Default_roverBody_v2_White
				}
			}
			VARIANT
			{
				name = Silver
				displayName = Silver
				themeName = Silver
				primaryColor = #cecece
				GAMEOBJECTS
				{
					bodyWhite = false
					bodyFoil = true
				}
				EXTRA_INFO
				{
					textureSet = Stock_Default_roverBody_v2_Silver
				}
			}
			VARIANT
			{
				name = Gold
				displayName = Gold
				themeName = Gold
				primaryColor = #fccb0a
				GAMEOBJECTS
				{
					bodyWhite = false
					bodyFoil = true
				}
				EXTRA_INFO
				{
					textureSet = Stock_Default_roverBody_v2_Gold
				}
			}
			VARIANT
			{
				name = roverBody_v2_Metallic_White
				themeName = Shiny_White
				displayName = It's all shiny!
				primaryColor = #d0d0d0
				secondaryColor = #d0d0d0
				GAMEOBJECTS
				{
					bodyWhite = true
					bodyFoil = false
				}
				EXTRA_INFO
				{
					textureSet = Alternate_Stock_Metallic_roverBody_v2_White
				}
			}
			VARIANT
			{
				name = roverBody_v2_Metallic_Silver
				themeName = Shiny_Silver
				displayName = It's all shiny!
				primaryColor = #d0d0d0
				secondaryColor = #d0d0d0
				GAMEOBJECTS
				{
					bodyWhite = false
					bodyFoil = true
				}
				EXTRA_INFO
				{
					textureSet = Alternate_Stock_Metallic_roverBody_v2_Silver
				}
			}
			VARIANT
			{
				name = roverBody_v2_Metallic_Gold
				themeName = Shiny_Gold
				displayName = It's all shiny!
				primaryColor = #d0d0d0
				secondaryColor = #d0d0d0
				GAMEOBJECTS
				{
					bodyWhite = false
					bodyFoil = true
				}
				EXTRA_INFO
				{
					textureSet = Alternate_Stock_Metallic_roverBody_v2_Gold
				}
			}
			VARIANT
			{
				name = roverBody_v2_Recolour_Normal
				themeName = Bob_Ross_1
				displayName = Bob Ross Normal
				primaryColor = #ff0000
				secondaryColor = #00ff00
				GAMEOBJECTS
				{
					bodyWhite = true
					bodyFoil = false
				}
				EXTRA_INFO
				{
					textureSet = MWNN_Stock_Paint_roverBody_v2_Normal
				}
			}
			VARIANT
			{
				name = roverBody_v2_Recolour_Foil
				themeName = Bob_Ross_Foil
				displayName = Bob Ross Foil
				primaryColor = #ff0000
				secondaryColor = #00ff00
				GAMEOBJECTS
				{
					bodyWhite = false
					bodyFoil = true
				}
				EXTRA_INFO
				{
					textureSet = MWNN_Stock_Paint_roverBody_v2_Foil
				}
			}
		}
		MODULE
		{
			name = TweakScale
			type = free
			TWEAKSCALEEXPONENTS
			{
				name = TweakScale
				DryCost = -1.5
				mass = 2
			}
		}
		MODULE
		{
			name = TUPartVariant
		}
		MODULE
		{
			name = SSTURecolorGUI
		}
	}
}

UrlConfig
{
	parentUrl = TURD/TU_Standardised_Switching/173_Standardised_TextureSets.cfg
	KSP_TEXTURE_SET
	{
		name = Stock_Default_roverBody_v2_White
		title = Squad
		recolorable = false
		MATERIAL
		{
			shader = KSP/Emissive/Bumped Specular
			mesh = bodyWhite
			texture = _MainTex,Squad/Parts/Command/probeCoreCube/QBE_New_diffuse
			texture = _BumpMap,Squad/Parts/Command/probeCoreCube/QBE_New_NRM
			texture = _Emissive,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Emis
		}
	}
}

UrlConfig
{
	parentUrl = TURD/TU_Standardised_Switching/173_Standardised_TextureSets.cfg
	KSP_TEXTURE_SET
	{
		name = Stock_Default_roverBody_v2_Silver
		title = Squad
		recolorable = false
		MATERIAL
		{
			shader = KSP/Bumped Specular (Mapped)
			mesh = bodyFoil
			texture = _MainTex,Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_silver_diffuse
			texture = _BumpMap,Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_silver_NRM
			texture = _Emissive,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Emis
			texture = _SpecMap,Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_silver_specular
			PROPERTY
			{
				name = _Color
				color = #ffffff
			}
			PROPERTY
			{
				name = _Shininess
				float = 0.82
			}
			PROPERTY
			{
				name = _Opacity
				float = 1.0
			}
			PROPERTY
			{
				name = _RimFalloff
				float = 2.0
			}
			PROPERTY
			{
				name = _AmbientMultiplier
				float = 0.3
			}
		}
	}
}

UrlConfig
{
	parentUrl = TURD/TU_Standardised_Switching/173_Standardised_TextureSets.cfg
	KSP_TEXTURE_SET
	{
		name = Stock_Default_roverBody_v2_Gold
		title = Squad
		recolorable = false
		MATERIAL
		{
			shader = KSP/Bumped Specular (Mapped)
			float = _Shininess,0.82
			float = _Opacity,1.0
			float = _RimFalloff,2.0
			float = _AmbientMultiplier,0.8
			mesh = bodyFoil
			texture = _MainTex,Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_gold_diffuse
			texture = _BumpMap,Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_gold_NRM
			texture = _Emissive,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Emis
			texture = _SpecMap,Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_gold_specular
			PROPERTY
			{
				name = _Color
				color = #efe38b
			}
		}
	}
}

 

I didn't put all my texture sets in because I'm pushed for time but you get the idea. As previously, this is working for me in 1.7.3 with TU 1.5.8.23. In fact, it also works in 1.8 surprisingly though there are some things not quite right underneath. Mainly icon and GUI related but I didn't expect it to wok at all.

Share this post


Link to post
Share on other sites

Oh... This is what the section looks like for me.

VARIANT
{
	name = Silver
	displayName = Silver
	themeName = Silver
	primaryColor = #cecece
	TEXTURE
	{
		shader = KSP/Bumped Specular (Mapped)
		mainTextureURL = Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_silver_diffuse
		color = #ffffff
		_BumpMap = Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_silver_NRM
		_SpecMap = Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2_silver_specular
		_Shininess = 0.82
		_Opacity = 1.0
		_RimFalloff = 2.0
		_AmbientMultiplier = 0.3
	}
	GAMEOBJECTS
	{
		bodyWhite = false
		bodyFoil = true
		Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2(Clone) = true
		VenStockRevamp/Squad/Parts/Command/ProbeCores/RoverProbe(Clone) = false
	}
	EXTRA_INFO
	{
		textureSet = Roverbody_Silver
	}
}

Not sure that's right...

Share this post


Link to post
Share on other sites

Ok. Something I noticed earlier when you posted your patch config and checked on my end, so you can do this or not as it didn't cause me issues but might be worth doing just for the sake of it, the default TEXTURE section can be deleted when TU is handling everything. I suspect it either gets ignored or overridden when "TUPartVariant" is present. Essentially I commented that part out of my patches to check at the time and I didn't get any issues with the flag mesh. It's just a small line in the setup though, example patch...

Spoiler

@VARIANT[Silver]
		{
			!TEXTURE,*{}
			EXTRA_INFO
			{
				textureSet = Stock_Default_roverBody_v2_Silver
			}
		}

 

What does look like it could cause issues but might not and could be worth checking is the extra line in "GAMEOBJECTS". I get you have that because you are adding Ven's probe core in here but without seeing the rest of the part setup or looking in to adding other models to a single item and selecting them through variants, I would test commenting out those lines so for stock probe core variants, just use standard meshes as found in the config. So it would end up something like this...

Spoiler

GAMEOBJECTS
	{
		bodyWhite = false
		bodyFoil = true
		VenStockRevamp/Squad/Parts/Command/ProbeCores/RoverProbe(Clone) = false
	}

 

...or even without the Ven's pointer too. Then, in your Ven's sets, set it up so you do disable everything Stock (this might need the stock path with false) but have Ven's model path as true. I can kinda test this idea without installing Ven's so I'll do that in a minute. I'm not sure if enabled objects in other variants stay on or disabled when switching variant.

 

Edit:

 

Hmm, well, I was able to add that line without any ill effects. I kinda expected it might cause duplicate model loading and show signs of z fighting.

 

Another Edit: Oh, I just had another thought. Do you have any TU config files you've downloaded installed? Like perhaps the one that appeared on SpaceDock that blanket applies TU shaders via MODEL_SHADER? I'm smelling a conflict of some sort. Probably best to remove any configs other than what you are creating. You really want a clean install with only the specific things you are working on installed, then you'll know if you've messed up, or someone else. Perhaps, remove only your configs and see if the part behaves the same with everything else still installed.

Edited by Manwith Noname

Share this post


Link to post
Share on other sites
5 hours ago, Manwith Noname said:

Do you have any TU config files you've downloaded installed? Like perhaps the one that appeared on SpaceDock that blanket applies TU shaders via MODEL_SHADER? I'm smelling a conflict of some sort.

The only configs that mention TU in my install are mine and the sample Shadowmage gave me as a start. I don't have any other TU configs installed.

 

While we're discussing this problem, I should also mention that I've run into similar issues with probe cores. Kerbas left the Squad revamps available as a part variant, and switching the variant to Squad's directly on the mesh retains the Ven's textures, which looks.... interesting. Different UVs and all.

Switching the variant in the part selection however and then adding the Squad part into the scene causes absolutely no problems, everything behaves fine. Switch to Ven's and back and things look odd again.

Edited by Delay

Share this post


Link to post
Share on other sites

question where can I find the patch for fixing Textured Unlimited part icons under DirectX11?

Share this post


Link to post
Share on other sites
1 hour ago, FreeThinker said:

question where can I find the patch for fixing Textured Unlimited part icons under DirectX11?

Already there. You don't even need a config for that - just copy the folder into GameData like every other mod.

Share this post


Link to post
Share on other sites

@Delay

Right, fun for today. I installed VSR and without doing anything other than that...

Spoiler

7CE10F3185E2C39F77E7184D0A15610B0A7D3A6E

So, I setup VSR parts to use TU...

Spoiler

3BB2115FC8AF03C511EE6826FAB04355D9F99606

...and I scratch my head for a bit because it works. Then, on a hunch, I remove the whitelisting in the VSR texturesets, the one thing I haven't seen relevant to this discussion...

Spoiler

9D1555145675143E96F395C8CE3809CF55E2F457

Strangely, I get the stock normal map overlaid rather than a gold foil texture.

TL:DR, whitelist your texture sets correctly.

Share this post


Link to post
Share on other sites

No comment.
9aH4CcJ.png

That explains the whacky textures on the probe cores as well.

Sorry!

Share this post


Link to post
Share on other sites

There's certainly a case to be made that something isn't behaving right in TUPartVariants mind you. It's weird that not defining the mesh in the VSR core set, breaks the definitions within other sets which are technically set up right. This is however perhaps "not intended usage" of both Stock variants and TU in my mind, even if it can be made to work.

Share this post


Link to post
Share on other sites
38 minutes ago, Manwith Noname said:

It's weird that not defining the mesh in the VSR core set, breaks the definitions within other sets which are technically set up right.

What puzzles me is that at the very beginning I wasn't even applying a patch to the Silver and Gold variants. After that I did have the material definition and now after whitelisting VSR the part works just fine without one!

Share this post


Link to post
Share on other sites

Hi, this looks great! I know this is probably a really stupid question, but does it work with Restock?

Thanks :D

Share this post


Link to post
Share on other sites

Is it possible to reuse parts of a textureSet for different variants?
Right now I'm redefining the same things over and over again because one thing is different for each variant. That's not only annoying because if I change one thing I have to change it everywhere, it also blows up file length and makes things less readable.

Ven's uses part variants to make different attachment sizes possible. The Ant (what I'm patching right now) can fit onto size 0 and size 1 this way, and it would be nice if I could use the same code for the nozzle without having to rewrite it.

 

Edit: Okay, in this case I can handle everything through just one material. The adapter is only enabled in on of them anyways.
Edit2: No I cannot. The textures for the  adapter don't show up, instead the engine texture does. Applying separate materials to the variants solves that.

Edited by Delay

Share this post


Link to post
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.