Jump to content

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


Shadowmage

Recommended Posts

@Electrocutor  Is there a way to find out what the mesh names are within a model? Trying to apply your cfg to some other mods, but not sure how to get to the correct mesh names out of the parts.

 

omg, if I get this working I'll have a week's worth of cfg files to make for all my mods :)

Edited by Jimbodiah
Link to comment
Share on other sites

18 hours ago, Jimbodiah said:

Upload it to my site and link it?

*snip drool worthy picture*

:0.0:

Near Future parts with TU look so amazing!!!! If you want any help throw me a PM and maybe we can split the Near Future packs between us? I'm an experienced config jockey but haven't messed with TU stuff yet so hopefully won't take me to long to figure out.

Link to comment
Share on other sites

Any help would be appreciated... Trying to look at NF Solar right now, then Electrical and others. Check out Electrocutors stock patch for examples. The NF Prop was pretty simple as it is all metallics, so no mesh names needed. Also planning doing some other mods like JX2 Antenna and DSEV.

Here is the NF Prop patch...  I'll check with Mage how best to proceed to bundle patches like this. Maybe @Electrocutor can add his  awesome work too?
 

Spoiler

@REFLECTION_CONFIG[default]
{
	%enabled = true
}


KSP_MODEL_SHADER:NEEDS[NearFuturePropulsion]
{
	name = Stock_FullMetal

    //Engines
	model = NearFuturePropulsion/Parts/Engines/mpdt-25/mpdt-25
	model = NearFuturePropulsion/Parts/Engines/mpdt-125/mpdt-125
	model = NearFuturePropulsion/Parts/Engines/mpdt-0625/mpdt-0625
	model = NearFuturePropulsion/Parts/Engines/pit-25/pit-25
	model = NearFuturePropulsion/Parts/Engines/pit-125/pit-125
	model = NearFuturePropulsion/Parts/Engines/pit-0625/pit-0625
	model = NearFuturePropulsion/Parts/Engines/vasimr-25/vasimr-25
	model = NearFuturePropulsion/Parts/Engines/vasimr-125/vasimr-125
	model = NearFuturePropulsion/Parts/Engines/vasimr-0625/vasimr-0625
	model = NearFuturePropulsion/Parts/Engines/ionArgon-0625/ionArgon-0625-1
	model = NearFuturePropulsion/Parts/Engines/ionArgon-0625/ionArgon-0625-2
	model = NearFuturePropulsion/Parts/Engines/ionArgon-0625/ionArgon-0625-3
	model = NearFuturePropulsion/Parts/Engines/ionXenon-0625/ionXenon-0625-1
	model = NearFuturePropulsion/Parts/Engines/ionXenon-0625/ionXenon-0625-2
	model = NearFuturePropulsion/Parts/Engines/ionXenon-0625/ionXenon-0625-3

    //RCS
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-gridded-01
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-hall-01
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-mpdt-quad-01
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-mpdt-quint-01
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-mpdt-single-01
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-mpdt-triple-01
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-pulsedplasma-01
    
    //Tanks
    model = NearFuturePropulsion/Parts/Argon/argon-25/argon-25-1
    model = NearFuturePropulsion/Parts/Argon/argon-25/argon-25-2
    model = NearFuturePropulsion/Parts/Argon/argon-25/argon-25-3
    model = NearFuturePropulsion/Parts/Argon/argon-125/argon-125-1
    model = NearFuturePropulsion/Parts/Argon/argon-125/argon-125-2
    model = NearFuturePropulsion/Parts/Argon/argon-125/argon-125-3
    model = NearFuturePropulsion/Parts/Argon/argon-0625/argon-0625-1
    model = NearFuturePropulsion/Parts/Argon/argon-0625/argon-0625-2
    model = NearFuturePropulsion/Parts/Argon/argon-0625/argon-0625-3
    model = NearFuturePropulsion/Parts/Lithium/lithium-25/lithium-125-1
    model = NearFuturePropulsion/Parts/Lithium/lithium-25/lithium-125-2
    model = NearFuturePropulsion/Parts/Lithium/lithium-25/lithium-125-3
    model = NearFuturePropulsion/Parts/Lithium/lithium-125/lithium-125-1
    model = NearFuturePropulsion/Parts/Lithium/lithium-125/lithium-125-2
    model = NearFuturePropulsion/Parts/Xenon/xenon-25/xenon-25-1
    model = NearFuturePropulsion/Parts/Xenon/xenon-25/xenon-25-2
    model = NearFuturePropulsion/Parts/Xenon/xenon-25/xenon-25-3
    model = NearFuturePropulsion/Parts/Xenon/xenon-125/xenon-125-1
    model = NearFuturePropulsion/Parts/Xenon/xenon-125/xenon-125-2
    model = NearFuturePropulsion/Parts/Xenon/xenon-125/xenon-125-3
    model = NearFuturePropulsion/Parts/Xenon/xenon-radial/xenon-radial-125-1




	TEXTURE // Metal
	{
		shader = SSTU/PBR/Metallic

		//mesh = MPDT25
		//mesh = MPDT_Main
		//mesh = Shroud

		excludeMesh = flagTransform
		excludeMesh = Flag

		PROPERTY
		{
			name = _Metal
			float = 0.75
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
	}

}

 

 

Edited by Jimbodiah
Link to comment
Share on other sites

5 minutes ago, Jimbodiah said:

Any help would be appreciated... Trying to look at NF Solar right now, then Electrical and others. Check out Electrocutors stock patch for examples. The NF Prop was pretty simple as it is all metallics, so no mesh names needed. Also planning doing some other mods like JX2 Antenna and DSEV.

Here is the NF Prop patch...  I'll check with Mage how best to proceed to bundle patches like this. Maybe @Electrocutor can add his  awesome work too?
 

  Reveal hidden contents


@REFLECTION_CONFIG[default]
{
	%enabled = true
}


KSP_MODEL_SHADER:NEEDS[NearFuturePropulsion]
{
	name = Stock_FullMetal

    //Engines
	model = NearFuturePropulsion/Parts/Engines/mpdt-25/mpdt-25
	model = NearFuturePropulsion/Parts/Engines/mpdt-125/mpdt-125
	model = NearFuturePropulsion/Parts/Engines/mpdt-0625/mpdt-0625
	model = NearFuturePropulsion/Parts/Engines/pit-25/pit-25
	model = NearFuturePropulsion/Parts/Engines/pit-125/pit-125
	model = NearFuturePropulsion/Parts/Engines/pit-0625/pit-0625
	model = NearFuturePropulsion/Parts/Engines/vasimr-25/vasimr-25
	model = NearFuturePropulsion/Parts/Engines/vasimr-125/vasimr-125
	model = NearFuturePropulsion/Parts/Engines/vasimr-0625/vasimr-0625
	model = NearFuturePropulsion/Parts/Engines/ionArgon-0625/ionArgon-0625-1
	model = NearFuturePropulsion/Parts/Engines/ionArgon-0625/ionArgon-0625-2
	model = NearFuturePropulsion/Parts/Engines/ionArgon-0625/ionArgon-0625-3
	model = NearFuturePropulsion/Parts/Engines/ionXenon-0625/ionXenon-0625-1
	model = NearFuturePropulsion/Parts/Engines/ionXenon-0625/ionXenon-0625-2
	model = NearFuturePropulsion/Parts/Engines/ionXenon-0625/ionXenon-0625-3

    //RCS
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-gridded-01
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-hall-01
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-mpdt-quad-01
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-mpdt-quint-01
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-mpdt-single-01
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-mpdt-triple-01
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-pulsedplasma-01
    
    //Tanks
    model = NearFuturePropulsion/Parts/Argon/argon-25/argon-25-1
    model = NearFuturePropulsion/Parts/Argon/argon-25/argon-25-2
    model = NearFuturePropulsion/Parts/Argon/argon-25/argon-25-3
    model = NearFuturePropulsion/Parts/Argon/argon-125/argon-125-1
    model = NearFuturePropulsion/Parts/Argon/argon-125/argon-125-2
    model = NearFuturePropulsion/Parts/Argon/argon-125/argon-125-3
    model = NearFuturePropulsion/Parts/Argon/argon-0625/argon-0625-1
    model = NearFuturePropulsion/Parts/Argon/argon-0625/argon-0625-2
    model = NearFuturePropulsion/Parts/Argon/argon-0625/argon-0625-3
    model = NearFuturePropulsion/Parts/Lithium/lithium-25/lithium-125-1
    model = NearFuturePropulsion/Parts/Lithium/lithium-25/lithium-125-2
    model = NearFuturePropulsion/Parts/Lithium/lithium-25/lithium-125-3
    model = NearFuturePropulsion/Parts/Lithium/lithium-125/lithium-125-1
    model = NearFuturePropulsion/Parts/Lithium/lithium-125/lithium-125-2
    model = NearFuturePropulsion/Parts/Xenon/xenon-25/xenon-25-1
    model = NearFuturePropulsion/Parts/Xenon/xenon-25/xenon-25-2
    model = NearFuturePropulsion/Parts/Xenon/xenon-25/xenon-25-3
    model = NearFuturePropulsion/Parts/Xenon/xenon-125/xenon-125-1
    model = NearFuturePropulsion/Parts/Xenon/xenon-125/xenon-125-2
    model = NearFuturePropulsion/Parts/Xenon/xenon-125/xenon-125-3
    model = NearFuturePropulsion/Parts/Xenon/xenon-radial/xenon-radial-125-1




	TEXTURE // Metal
	{
		shader = SSTU/PBR/Metallic

		//mesh = MPDT25
		//mesh = MPDT_Main
		//mesh = Shroud

		excludeMesh = flagTransform
		excludeMesh = Flag

		PROPERTY
		{
			name = _Metal
			float = 0.75
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
	}

}

 

 

Right on! I think I'll take a crack at the Far Future Tech in Nertea's dev thread when i get home.

Link to comment
Share on other sites

13 minutes ago, Jimbodiah said:

Any help would be appreciated... Trying to look at NF Solar right now, then Electrical and others. Check out Electrocutors stock patch for examples. The NF Prop was pretty simple as it is all metallics, so no mesh names needed. Also planning doing some other mods like JX2 Antenna and DSEV.

Here is the NF Prop patch...  I'll check with Mage how best to proceed to bundle patches like this. Maybe @Electrocutor can add his  awesome work too?
 

  Hide contents


@REFLECTION_CONFIG[default]
{
	%enabled = true
}


KSP_MODEL_SHADER:NEEDS[NearFuturePropulsion]
{
	name = Stock_FullMetal

    //Engines
	model = NearFuturePropulsion/Parts/Engines/mpdt-25/mpdt-25
	model = NearFuturePropulsion/Parts/Engines/mpdt-125/mpdt-125
	model = NearFuturePropulsion/Parts/Engines/mpdt-0625/mpdt-0625
	model = NearFuturePropulsion/Parts/Engines/pit-25/pit-25
	model = NearFuturePropulsion/Parts/Engines/pit-125/pit-125
	model = NearFuturePropulsion/Parts/Engines/pit-0625/pit-0625
	model = NearFuturePropulsion/Parts/Engines/vasimr-25/vasimr-25
	model = NearFuturePropulsion/Parts/Engines/vasimr-125/vasimr-125
	model = NearFuturePropulsion/Parts/Engines/vasimr-0625/vasimr-0625
	model = NearFuturePropulsion/Parts/Engines/ionArgon-0625/ionArgon-0625-1
	model = NearFuturePropulsion/Parts/Engines/ionArgon-0625/ionArgon-0625-2
	model = NearFuturePropulsion/Parts/Engines/ionArgon-0625/ionArgon-0625-3
	model = NearFuturePropulsion/Parts/Engines/ionXenon-0625/ionXenon-0625-1
	model = NearFuturePropulsion/Parts/Engines/ionXenon-0625/ionXenon-0625-2
	model = NearFuturePropulsion/Parts/Engines/ionXenon-0625/ionXenon-0625-3

    //RCS
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-gridded-01
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-hall-01
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-mpdt-quad-01
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-mpdt-quint-01
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-mpdt-single-01
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-mpdt-triple-01
    model = NearFuturePropulsion/Parts/RCS/rcsblock-electric/rcsblock-pulsedplasma-01
    
    //Tanks
    model = NearFuturePropulsion/Parts/Argon/argon-25/argon-25-1
    model = NearFuturePropulsion/Parts/Argon/argon-25/argon-25-2
    model = NearFuturePropulsion/Parts/Argon/argon-25/argon-25-3
    model = NearFuturePropulsion/Parts/Argon/argon-125/argon-125-1
    model = NearFuturePropulsion/Parts/Argon/argon-125/argon-125-2
    model = NearFuturePropulsion/Parts/Argon/argon-125/argon-125-3
    model = NearFuturePropulsion/Parts/Argon/argon-0625/argon-0625-1
    model = NearFuturePropulsion/Parts/Argon/argon-0625/argon-0625-2
    model = NearFuturePropulsion/Parts/Argon/argon-0625/argon-0625-3
    model = NearFuturePropulsion/Parts/Lithium/lithium-25/lithium-125-1
    model = NearFuturePropulsion/Parts/Lithium/lithium-25/lithium-125-2
    model = NearFuturePropulsion/Parts/Lithium/lithium-25/lithium-125-3
    model = NearFuturePropulsion/Parts/Lithium/lithium-125/lithium-125-1
    model = NearFuturePropulsion/Parts/Lithium/lithium-125/lithium-125-2
    model = NearFuturePropulsion/Parts/Xenon/xenon-25/xenon-25-1
    model = NearFuturePropulsion/Parts/Xenon/xenon-25/xenon-25-2
    model = NearFuturePropulsion/Parts/Xenon/xenon-25/xenon-25-3
    model = NearFuturePropulsion/Parts/Xenon/xenon-125/xenon-125-1
    model = NearFuturePropulsion/Parts/Xenon/xenon-125/xenon-125-2
    model = NearFuturePropulsion/Parts/Xenon/xenon-125/xenon-125-3
    model = NearFuturePropulsion/Parts/Xenon/xenon-radial/xenon-radial-125-1




	TEXTURE // Metal
	{
		shader = SSTU/PBR/Metallic

		//mesh = MPDT25
		//mesh = MPDT_Main
		//mesh = Shroud

		excludeMesh = flagTransform
		excludeMesh = Flag

		PROPERTY
		{
			name = _Metal
			float = 0.75
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
	}

}

 

 

Great Job !! but why use the  ( :NEEDS ) has there  ( model = ******** ) anyway ?

Link to comment
Share on other sites

You may consider thinking about what options you want available before pouring in your time.

KSP_MODEL_SHADER forces whatever you set to be the default.

You may have noticed that my newer cfgs are instead using the KSPTextureSwitch part module, because then the person can choose between default, having it be metallic, but using the built-in specular values, forcing it to be metallic, or custom painting. You can also create your own versions of textures/patterns and things like the B9 or Firespitter partmodules.

cGi8upK.jpg

Edited by Electrocutor
Link to comment
Share on other sites

This is beautiful.  Its a shame it requires DX11, because that means several other mods I use don't work properly.  Or to be more exact,  those mods use the deprecated (By Unity)  DX9, and need to be upgraded/updated.  I wish OpenGL looked the same but there are mods that apparently don't function well, or at all, with OGL.

"We will be removing support for DirectX 9 on the Windows platforms. ... we have come to the conclusion that continued support of the DirectX 9 API is no longer feasible and is working against us when it comes to developing new features in Unity. It has become increasingly difficult to support and maintain feature parity across several DirectX API version.  With Unity 2017.3 both the Unity Editor and the Standalone player will no longer support DirectX 9." Source: https://blogs.unity3d.com/2017/07/10/deprecating-directx-9/

 

Edited by Murdabenne
Link to comment
Share on other sites

4 minutes ago, Murdabenne said:

This is beautiful.  Its a shame it requires DX11, because that means several other mods I use don't work properly.  Or to be more exact,  those mods use the deprecated (By Unity)  DX9, and need to be upgraded/updated.  I wish OpenGL looked the same but there are mods that apparently don't function well, or at all, with OGL.

"We will be removing support for DirectX 9 on the Windows platforms. ... we have come to the conclusion that continued support of the DirectX 9 API is no longer feasible and is working against us when it comes to developing new features in Unity. It has become increasingly difficult to support and maintain feature parity across several DirectX API version.  With Unity 2017.3 both the Unity Editor and the Standalone player will no longer support DirectX 9." Source: https://blogs.unity3d.com/2017/07/10/deprecating-directx-9/

 

Which is probably why KSP 1.4 will only be using Unity 2017.2.

I know that scatterer is currently being worked on, but I'm not sure if dx11 is on his to-do list or not; which other mods do not support dx11?

I cannot tell if Kopernicus is or not because KSPRC terrain seems to like dx11 just fine, but SVT does not.

Link to comment
Share on other sites

Mores the pity they are sticking with a deprecated API. DX9 has more issues than do the newer APIs with some rendering things from what I have gathered on the forums.  Especailly compared to DX12 and its optimizations.  I see a big difference in my other games with my 1080TI, even with my ancient 780 SLI rig that I use for a heater on cold days.

They should just go ahead and rip off the bandaid, since the next versions will have to go to that.

Edited by Murdabenne
Link to comment
Share on other sites

3 minutes ago, Murdabenne said:

Mores the pity they are sticking with a deprecated API. DX9 has more issues than do the newer APIs with some rendering things from what I have gathered on the forums.  Especailly compared to DX12 and its optimizations.  I see a big difference in my other games with my 1080TI, even with my ancient 780 SLI rig that I use for a heater on cold days.

In all likelihood, stock KSP 1.4 will work perfectly fine in dx12 mode, just like the current version works fine in dx11. Unfortunately, that does not mean that all the mods will.

Link to comment
Share on other sites

@Shadowmage Thank you so much for this! I was updating my mods today to work with TU. This is so impressive. Figured out how to switch my reflective parts to work with TU and also fiddled around with the solar shader. Probably just scratched the surface of what your mod is capable of doing, but already added so much to the models!

The quality of the reflections is astonishing and exactly as i wanted them but could never get with TR. Looking forward to try the AOMap and the SPECMap.

Massive props to you mate. You have created truly great mods.

 

Link to comment
Share on other sites

2 hours ago, Electrocutor said:

You may consider thinking about what options you want available before pouring in your time.

KSP_MODEL_SHADER forces whatever you set to be the default.

You may have noticed that my newer cfgs are instead using the KSPTextureSwitch part module, because then the person can choose between default, having it be metallic, but using the built-in specular values, forcing it to be metallic, or custom painting. You can also create your own versions of textures/patterns and things like the B9 or Firespitter partmodules.

 

That is some next-level stuff there!!!!   I'll hold on until I can cheat with some examples of your's, if that is okay?

Link to comment
Share on other sites

9 minutes ago, Jimbodiah said:

That is some next-level stuff there!!!!   I'll hold on until I can cheat with some examples of your's, if that is okay?

The PorkjetStock and Porkjet Part Overhauls cfgs use this currently. Ven's will be the next to get this treatment (though Ven's has partial support already, excluding recoloring).

Edited by Electrocutor
Link to comment
Share on other sites

35 minutes ago, Electrocutor said:

In all likelihood, stock KSP 1.4 will work perfectly fine in dx12 mode, just like the current version works fine in dx11. Unfortunately, that does not mean that all the mods will.

Aye, and there's the problem.Maybe by the time 1.5 comes out, all the mods I really like will be updated to 1.4.1, kinda like how people are talking 1.4 when 1.3.1 is just now getting to where I feel comfortable moving my long running career game forward. 

Link to comment
Share on other sites

Daum, with the invention of TU I might resume my modelling endeavors. I was really struggling with native KSP translucent shaders flickering and cancelling each other that I stopped modelling altogether. TU removes those limits.

@Shadowmage Love you, man! Your work really gives a new life to KSP!

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