Jump to content

Electrocutor

Members
  • Posts

    699
  • Joined

  • Last visited

Everything posted by Electrocutor

  1. I don't want to reinstall unity right now to look at the shader code. What is the math for smoothness? _SpecMap.A * _Glossiness or something? Summary so Far: Stock reflection cubemap missing in Flight mode Stock PBR shader does not support emission (no pod/cabin lights unless on separate mesh) Reflection cubemap still renders top surface inverted in dx9 Reflection cubemap seems to use a quick-draw method that is less accurate than TU Did I miss anything? One side effect here is that people can now make models using this shader, then TU could just automatically replace that shader and pull from the same channels to add more functionality.
  2. Are they actually including the Standard shader includes and stuff? If so, and also selected the checkbox to include all variants, it should support other unused Unity features, like light sources from emission maps and what not.
  3. I added the cupola as a variant, and it just adds the animation button to all variants (but shows nothing happening when not set to the Ven model). I expect with the RCS effects, it would be the same: you would just have the effects on all variants. They've also adjusted some of the attach points in 1.5, so you may or may not need to include those in the variants.
  4. Reflection probe/cubemap missing during flight evidence: Part config (_SpecMap defaults to 100%): @PART[mk2Cockpit_Standard] { MODULE { name = ModulePartVariants baseVariant = White VARIANT { name = White displayName = #autoLOC_8007116 themeName = White primaryColor = #ffffff TEXTURE { shader=KSP/Bumped Specular (Mapped) _Shininess= 0.95 } } } }
  5. There is no reflection probe/map outside the VAB/SPH, so anything that uses the new shader is just blended with black right now during flight.
  6. There is a bug: the editor/VAB has a reflection probe or cubemap, but during runtime, anything that is 100% metal is solid black, anything that uses the new shader is darker (the % that is supposed to be reflection is black blended).
  7. It would appear that 'Bumped Specular (Mapped)' is a PBR shader. @PART[landerCabinSmall] { MODULE { name = ModulePartVariants baseVariant = White VARIANT { name = White displayName = #autoLOC_8007116 themeName = White primaryColor = #ffffff TEXTURE { shader=KSP/Bumped Specular (Mapped) _SpecMap= Squad/Parts/Command/mk1LanderCan/ksp_s_landerCan_psd_illum _Shininess= 0.95 } } } } The metallicy seems to be set via the _SpecMap, and the smoothness is fixed per material using _Shininess. I've not figured out the exacts yet though. This shader seems to not support lights. It defaults to 100% metal if you do not specify a _SpecMap. @PART[mk2Cockpit_Standard] { MODULE { name = ModulePartVariants baseVariant = White VARIANT { name = White displayName = #autoLOC_8007116 themeName = White primaryColor = #ffffff TEXTURE { shader=KSP/Bumped Specular (Mapped) _Shininess= 0.95 } } } }
  8. From the stay-put-nik, it appears there is a real reflection being used (at least visible in the VAB). It's tough to tell what all it renders though as it's not shiny enough to be a mirror. I'm a little surprised that they didn't use this new shader on the windows. If it is a true reflection, then you could just tap into that cubemap instead of rendering your own.
  9. @Ven @Kerbas_ad_astra Will you guys be editing the model files to use the new fancy KSP shader?
  10. I put an example of how to do it in my PartVariant guide, but no one seemed too enthusiastic on implementing it: I have worked on this in my own install as time allows, but not anywhere near done. @PART[mk1pod]:NEEDS[KSP-UnofficialPatch] { MODEL { model = VenStockRevamp/Squad/Parts/Command/CommandPods/MK1 } %MODULE[ModulePartVariants] { %name = ModulePartVariants %baseVariant = Basic %VARIANT[Basic] { %name = Basic %displayName = Basic %primaryColor = #ffffff %secondaryColor = #ffffff %GAMEOBJECTS { %Squad/Parts/Command/mk1pod/model(Clone) = true VenStockRevamp/Squad/Parts/Command/CommandPods/MK1(Clone) = false } } @VARIANT,* { @GAMEOBJECTS { %VenStockRevamp/Squad/Parts/Command/CommandPods/MK1(Clone) = false } } +VARIANT[Basic] { %name = Ven %displayName = Ven %GAMEOBJECTS { %Squad/Parts/Command/mk1pod/model(Clone) = false %VenStockRevamp/Squad/Parts/Command/CommandPods/MK1(Clone) = true } } } } *The UnofficialPatch listed as requirement is a mod I have locally that fixes stock things. In this case, it updates all the parts that still use the old mesh= into the new MODEL{model=}, which is needed to work with PartVariants.
  11. Does that mean you think the 1.4.5 version will be going full release or still waiting on that?
  12. I figured TakeTwo would just recompile the shader fix for dx11 like they did with OpenGL before for Mac/Linux, but I guess they really don't want people using dx11. I use -force-glcore because it seems to be the most stable and performance friendly (including the only officially supported dx9). This "fix" just drops the Textures Unlimited shader into the icons, so the credit is really for @Shadowmage As for your suggestion, I already created a thread and put that link into it.
  13. I feel really stupid now, sorry. It was in a different cfg, so finding tinting_mode would of course fail. just remove tinting_mode and the thing works fine.
  14. This is what I am saying... it should be 1.25 saturated to 1.0, which is 100%; but in-game it shows as about 50%.
  15. my point is that the mask map is 100%, the spec map is 75%, and the recolor selection is 100%; but the result is about 50%.
  16. I'll use his mk2 inline as an example on the painted part. I'm ignoring the RGB component because that works just fine. For specular: diffuse.RGBA is ignored mask.R is 255 mask.GBA is 0 spec.RGB is 192 spec.A is ignored recolor.A is 255 so: m = 1 - 1 - 0 - 0 = 0 user = 1 * 1 + 0 * 1 + 0 * 1 = 1 base = 0.75 * 0 = 0 detail = (0.75 - 0.5) * (1 - 0) = 0.25 smoothness = 1 + 0 + 0.25 = 1.25 = 1 except, it isn't 100%; instead it is somewhere around 50%
  17. Not main texture, sorry; mask texture... here is the actual shader part for smooth and metal, but I'm not sure exactly how it acts. fixed m = saturate(1 - (mask.r + mask.g + mask.b)); fixed3 userSpec = mask.r * _MaskColor1.a + mask.g * _MaskColor2.a + mask.b * _MaskColor3.a; fixed userMetallic = mask.r * _MaskMetallic.r + mask.g * _MaskMetallic.g + mask.b * _MaskMetallic.b; fixed3 baseSpec = spec.rgb * m; fixed baseMetallic = spec.a * m; fixed3 detailSpec = (spec.rgb - 0.5) * (1 - m); fixed detailMetallic = (spec.a - 0.5) * (1 - m); o.Smoothness = saturate(userSpec + baseSpec + detailSpec).r; o.Metallic = saturate(userMetallic + baseMetallic + detailMetallic); It only ever looks at the mask, the glossmap, and the user recolor.
  18. The smoothness has to get some value from the main texture alpha channel, some value from the recolor selection integer, and some value from the gloss/metal map red channel, right? Exactly how much are from which?
  19. The TINTING_MODE keyword will double the impact of the original RGBA from both the main texture and the glossmetal texture, though that would also negatively impact the selected color values form the GUI.
  20. @Manwith Noname Suggestion: redefine the list of preset colors that comes with TU as they don't match the stock color scheme and most don't have any metal/smooth set on them. (you can use an MM patch to remove the existing ones) ... it also just occurred to me that your mod is listed as turd... I apologize, but I had to laugh several times. @Shadowmage In order for the recolor GUI to make the surface 100% smooth, it requires 512 specular value; but the slider only goes to 255; why is this the case? His metal/gloss alpha values range between 20 and 75.
  21. @Nils277 Have you considered changing the default rotation of the parts to match with the SPH? For example, wheels and side VTOL thrusters always have to be rotated to attach them. Also, do you intend to sometime allow symmetric attachment for side mounts like how stock parts do with the bi-couplers (would require fixing the orientation too)? Also, the OP screenshots really don't do the current version justice; perhaps it would be worth updating them? After you added all the normal maps, metal, and such it has a lot more character.
  22. Does it not work to have the RGB map texture as one of the variants, then also add part recoloring?
  23. The IVA issue is because there are some meshes that need to be excluded that I forgot don't exist unless the IVA overlay is turned on. Originally, the porkjet config was much more complete whereas the original stock cfg was just a blanket for all the stock parts without much time or thought put in. At this point, you can ignore these because the stuff @Manwith Noname provides is a much more polished thing. Patch 1.5 is going to cause some havoc on all this stuff, so I'm not keen to work on this further until it's out. After which, I'll start working on some TU stuff again (this time with prior author permission).
  24. @alexus The alpha channel of a texture using the transparent pbr shader is opacity. The solar shader is complicated; I've not been able to properly figure out how it works, but @Shadowmage has examples in his SSTU mod. Aside from normals, the TU shaders also support occlusion and parallax textures, but I've not messed with them.
×
×
  • Create New...