Sign in to follow this  
acmarin

Is it possible to replace the materials used for kerbins surface.

Recommended Posts

(I am a beginner when it comes to modding KSP so i apologise if this is a stupid question) 

 

In short, is it possible to swap the materials used on kerbins surface (grass, rock etc) for materials which use unity standard shader. I was thinking maybe to use Textures Unlimited because it allows for the unity standard shader in ksp.

My idea was to create some new terrain materials using substance designer and then swap out the pretty dull default terrain materials for ones using unity standard shader.

Also tesselation?

 

Share this post


Link to post
Share on other sites

I've seen a few mods that provide different textures for the planets but I don't know if they use different shaders - as a start you might check them out.

Here's one of them:

 

Share this post


Link to post
Share on other sites
On 6/30/2019 at 9:59 AM, acmarin said:

(I am a beginner when it comes to modding KSP so i apologise if this is a stupid question) 

 

In short, is it possible to swap the materials used on kerbins surface (grass, rock etc) for materials which use unity standard shader. I was thinking maybe to use Textures Unlimited because it allows for the unity standard shader in ksp.

My idea was to create some new terrain materials using substance designer and then swap out the pretty dull default terrain materials for ones using unity standard shader.

Also tesselation?

 

TU doesn't directly allow for manipulation of non-part textures.  The system is based around PartModules, and as such, really only works with Parts.

The shaders themselves work fine when used for other purposes, but there is no built-in functionality in TU to use them for those purposes.  Certainly you could use TU to provide and load the shaders, but you would then need some additional code to apply the new shaders (and materials/textures) to the terrain and scenery/buildings.

The shaders -do- work for terrain.  Did quite a bit of experimentation when working through HDR and post-process effects, and one of the things I needed to 'fix' was that the stock terrain/scenery shaders had some odd rendering issues when HDR was enabled, so I put together some quick-and dirty prototype code that replaced all of the stock scenery shaders with the TU.

Notably I didn't continue down this route as the stock terrain shaders were authored with the diffuse workflow, and lack specular maps entirely, which would have required that I create and/or otherwise supply these textures for every material I was replacing; and as these were the stock terrain textures, there is no direct access to the source material for those (they are embedded in the KSP asset packs), so trying to make matching spec-maps was a futile endeavor.  Now, if you were intending to completely replace the stock terrain textures with PBR versions (with proper gloss/spec/metal maps) you really wouldn't encounter that specific issue.

Share this post


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

TU doesn't directly allow for manipulation of non-part textures.  The system is based around PartModules, and as such, really only works with Parts.

The shaders themselves work fine when used for other purposes, but there is no built-in functionality in TU to use them for those purposes.  Certainly you could use TU to provide and load the shaders, but you would then need some additional code to apply the new shaders (and materials/textures) to the terrain and scenery/buildings.

The shaders -do- work for terrain.  Did quite a bit of experimentation when working through HDR and post-process effects, and one of the things I needed to 'fix' was that the stock terrain/scenery shaders had some odd rendering issues when HDR was enabled, so I put together some quick-and dirty prototype code that replaced all of the stock scenery shaders with the TU.

Notably I didn't continue down this route as the stock terrain shaders were authored with the diffuse workflow, and lack specular maps entirely, which would have required that I create and/or otherwise supply these textures for every material I was replacing; and as these were the stock terrain textures, there is no direct access to the source material for those (they are embedded in the KSP asset packs), so trying to make matching spec-maps was a futile endeavor.  Now, if you were intending to completely replace the stock terrain textures with PBR versions (with proper gloss/spec/metal maps) you really wouldn't encounter that specific issue.

Thanks for the reply, I am however completely stuck on how on earth i would actually swap the terrain shaders, materials and textures. 

I'm new to ksp modding so i dont quite understand how i could code a plugin to do this without reverse engineering ksp. Any further help would be much appreciated. 

(I'm not very experienced in c# as i mostly create 3d models / textures. So complex plugins are likely beyond my level of expertise)

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.

Sign in to follow this