Jump to content

Recommended Posts

I see quite a lot of new shaders in new PartTools package. Can we get some detailed info on those? 

For example, why InternalSpace shaders are separate and what is the difference between InternalSpace/BumpedSpecular and InternalSpace/BumpedSpecular2 ? Or if there are possible textureless "just color" Speculars? 

Edited by Dr. Jet
Link to post
Share on other sites

The internalspace shader has some useful extras for IVA's, most notably lightmapping. There are two modes for this, "Single Colored" simply uses RGB of the lightmap as one colored emissive, "Multi Greyscale" uses R, G and B as seperate emissive masks, where R and G can be multiplied by a color input, and B is colored by ambient light. Both modes use Ambient Occlusion map in Alpha channel.
"Multi Greyscale" can be used for more complex stuff, the ambient color lightmap can be used to fake light comming in through the windows and will be green on jool, red on duna etc. The color inputs for the other two lightmaps could potentially be animated or manipulated from modules to switch off a light and such.
Fog is kinda experimental, might come in handy for large IVA's or to emphasize foreground objects. (Alpha of the color input controls fog density)

The version of this shader in PT isnt actually in the game yet tho, I will push it along with some other things in the next few days and let you know.
InternalSpace/BumpedSpecular2 shouldn't be in there too, I forgot to remove it, just ignore it for now.

I can give more detailed info, maybe a tutorial with pictures a bit later when I'm not so busy.

Link to post
Share on other sites

Ah, that clears things up regarding Internal Specular. 

One thing I noticed is many shaders have _MainTex tint multiplied with BurnColor; instead of MainColor as with most other shaders (KSP or otherwise). Is this intentional?

Rimcolor/falloff has been enabled, at last! :D. It's display in game seems a bit spotty though, they don't show in Editor Scenes; and in Flight scenes they seem to conflict a bit with part highlighting. 

KSP Standard shader looks tantalizing, but doesn't pass through PartTools. when do you expect that to get activated?

 

@Dr. Jet Some more specifics on the Internal Space shader.

 

Edited by nli2work
Link to post
Share on other sites

@Porkjet thank you for the detailled information about the IVA shader.

I have a quick question about the ambient occlusion map: Are there, besides the potential to reduduce texture size, visual benefits compared to baking the AO into the diffuse texture?  E.g. reduced AO when direct light hits an object or damped specular lighting for the occluded section of the objects?

Link to post
Share on other sites

There's a small visual benefit since AO is in the alpha channel which has much better compression quality than the RGB channels and gives you nice smooth gradients.

But the main benefit is simply usability since you can uitlize UV2 for AO and lightmaps and reuse a tile texture for the diffuse map.

Baking AO into diffuse requires a unique unwrap of everything and forces you to create the entire diffuse map from scratch for every cockpit

Edited by Porkjet
Link to post
Share on other sites
  • 5 weeks later...

At last the thread was moved to somewhere where it's open again... 

Let's continue:

/KSP/Alpha/Translucent_Additive - what's that? It looks very weird in Unity when set instead of /KSP/Alpha/Translucent

/KSP/Bumped_Specular_(Transparent) and /KSP/Specular_(Transparent) - they seem to neither use alpha channel, nor follow "opacity" setting for actual transparency. How to use them and what for? 

Porkjet's tutorial about proper usage of KSP/InternalSpace/* shaders is still eagerly anticipated. 

/KSP/FX/ScrollingUnlit - ???

/KSP/LightWrapped/Specular - ???

/KSP/Standard_Bumped - looks very promising. It even has "metallness" parameter! But it surely needs a thorough tutorial. Let's say we want WHOLE texture to look metallic and glossy - can we do it with just one texture without extra "mapping" textures?

/KSP/UnlitColor/ - At last! A simple textureless shader! But why Unlit only? DiffuseColorSpecularColor and EmissiveColor would be much more useful. 

 

BTW, not exactly 1.1 question, but... how to set shaders for decals (FlagTransform) so that they are invisible in part list (before flag texture even applies)? Setting no texture results in disgusting white rectangles, setting fully transparent substitute "texture"... it will work... but Squad parts don't use that.

Link to post
Share on other sites

Translucent_Additive - adds to whatever is under it, makes stuff brighter. most particle shaders do this.
Bumped_Specular_(Transparent)/Specular_(Transparent) - probably vestigial. these seem to be missing Specular term compared to KSP/Alpha versions

ScrollingUnlit - this is needed since it's practically impossible to animate UV offsets in Unity5 without code. You'd use this on pipes and the like to show stuff flowing through it. or scrolling lorem ipsum on IVA monitors, or magic space vacuum cleaner to clean up the asteroids... Screen Space and UV space toggle is excellent.
Standard_Bumped - dont' think it's activate in game yet. Exporting this will prevent MU loading in KSP. Give Lilleman's PBRShaderLoader a whirl for the time being.

Flag decals should use Alpha/Cutoff shader instead of Alpha/Translucent shaders.

Edited by nli2work
Link to post
Share on other sites

A new download with updated shaders will be posted any minute.

LightWrapped/Specular basically does what the name suggests, it uses a custom lighting model that "wraps" light further around an object. It was used on some new IVA props as a cheap way to simulate light bouncing in interiors, but I probably won't use it any further and lightmap props instead. Might be useful for other things tho. Other uses include fake subsurface scattering like on skin, or other slightly translucent or soft materials

fig16-02a.jpg

 

ScrollingUnlit and Standard_Bumped are experimental and nowhere used yet

 

25 minutes ago, Dr. Jet said:

BTW, not exactly 1.1 question, but... how to set shaders for decals (FlagTransform) so that they are invisible in part list (before flag texture even applies)? Setting no texture results in disgusting white rectangles, setting fully transparent substitute "texture"... it will work... but Squad parts don't use that.

Create a Tag "Icon_Hidden" and add it to the flag mesh

 

Link to post
Share on other sites
3 minutes ago, Porkjet said:

Create a Tag "Icon_Hidden" and add it to the flag mesh

Thanks! It was very... unsuspected. Are there any other useful KSP tags that weren't properly documented? 

Edited by Dr. Jet
Link to post
Share on other sites
  • 3 weeks later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

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