Jump to content

[Defunct] [1.3] WindowShine-v16 - Gold foil update (26 December 17)


HafCoJoe

Recommended Posts

is the reflective-ness value configurable?

Yes it is. The effect is more or less controlled by a module you need to place inside the part config (I added it at the very bottom). There's a line that reads: "colour = 0.5 0.5 0.5". The shader multiplies the color by those numbers before putting it out, so if you set it closer to 1 it will be more reflective, and opposite for if you set it lower. 1 would be perfect reflections

But modulemanager involves literally no coding, using MM is super easy, and always a safe bet.

I still have no clue how to write patches for it though :P

Edited by Avera9eJoe
Link to comment
Share on other sites

Really good stuff,

A note on the OpenGL issue, TR reflections does work for me on kerbals, and I'm on linux, so surely OpenGL.

Haven't tried the actual mod yet. Are those MM patches coming along?

Link to comment
Share on other sites

So, I checked the mod over to get an answer as to why it wasn't already set up with MM patches, and I couldn't find any reason. So, I rewrote the configs for use in MM. I also could find no point in any of the replacement textures, but if there was a point I would think you would continue to use TextureReplacer for that function instead of replacing the files directly considering your use of that mod for the reflections. Anyway, if you're having problems with the MM patch-writing process, here's what I came up with (and placed in the TextureReplacer root folder for lack of a better place):

@PART[solarPanels2]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = panel3 panel04 panel05 panel06 panel07 panel08
}
}
@PART[solarPanels4]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = solarPanel4panels panel2 panel3 panel4 pane5 panel6
}
}
@PART[solarPanels1]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = basepanel panel1 panel2 panel3 panel4 panel5
}
}
@PART[solarPanels3]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = basepanel panel1 panel2 panel3 panel4 panel5
}
}
@PART[cupola]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = obj_base
}
}
@PART[largeSolarPanel]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = panel
}
}
@PART[Large_Crewed_Lab]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = Lab
}
}
@PART[Mark1-2Pod]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = SideWindow FrontWindow
}
}
@PART[Mark1Cockpit]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = body
}
}
@PART[Mark2Cockpit]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = Cockpit
}
}
@PART[landerCabinSmall]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = obj_base
}
}
@PART[mk1pod]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = window
}
}
@PART[mk2Cockpit_Inline]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = Cockpit_inline
}
}
@PART[mk2Cockpit_Standard]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = COCKPIT
}
}
@PART[mk2LanderCabin]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = cabin
}
}
@PART[mk3Cockpit_Shuttle]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = cockpit
}
}
@PART[solarPanels5]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.2 0.2 0.2
%interval = 1
%meshes = panel
}
}

I used the % operator here which tells MM that, if it finds the module already present, it will simply update it with the values provided, but will otherwise add them if they do not exist in that specific part. I also didn't include one of the items (the file named "CREW.cfg") because it had no definitions in "meshes" which I took to mean it would possibly make the entire thing reflective, which is a bit overkill if you're only after window reflections.

Link to comment
Share on other sites

So, I checked the mod over to get an answer as to why it wasn't already set up with MM patches, and I couldn't find any reason. So, I rewrote the configs for use in MM. I also could find no point in any of the replacement textures, but if there was a point I would think you would continue to use TextureReplacer for that function instead of replacing the files directly considering your use of that mod for the reflections. Anyway, if you're having problems with the MM patch-writing process, here's what I came up with (and placed in the TextureReplacer root folder for lack of a better place):
@PART[solarPanels2]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = panel3 panel04 panel05 panel06 panel07 panel08
}
}
@PART[solarPanels4]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = solarPanel4panels panel2 panel3 panel4 pane5 panel6
}
}
@PART[solarPanels1]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = basepanel panel1 panel2 panel3 panel4 panel5
}
}
@PART[solarPanels3]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = basepanel panel1 panel2 panel3 panel4 panel5
}
}
@PART[cupola]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = obj_base
}
}
@PART[largeSolarPanel]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = panel
}
}
@PART[Large_Crewed_Lab]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = Lab
}
}
@PART[Mark1-2Pod]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = SideWindow FrontWindow
}
}
@PART[Mark1Cockpit]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = body
}
}
@PART[Mark2Cockpit]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = Cockpit
}
}
@PART[landerCabinSmall]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = obj_base
}
}
@PART[mk1pod]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = window
}
}
@PART[mk2Cockpit_Inline]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = Cockpit_inline
}
}
@PART[mk2Cockpit_Standard]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = COCKPIT
}
}
@PART[mk2LanderCabin]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = cabin
}
}
@PART[mk3Cockpit_Shuttle]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.5 0.5 0.5
%interval = 1
%meshes = cockpit
}
}
@PART[solarPanels5]
{
%MODULE[TRReflection]
{
%name = TRReflection
%shader = Reflective/Bumped Diffuse
%colour = 0.2 0.2 0.2
%interval = 1
%meshes = panel
}
}

I used the % operator here which tells MM that, if it finds the module already present, it will simply update it with the values provided, but will otherwise add them if they do not exist in that specific part. I also didn't include one of the items (the file named "CREW.cfg") because it had no definitions in "meshes" which I took to mean it would possibly make the entire thing reflective, which is a bit overkill if you're only after window reflections.

You are a god send. Thank you, I had no clue where to even start with making a ModuleManager config (see my last post on MM for proof). I get the format, now, and I'll be able to add additional parts if I add more (thinking about making the mainsail bell reflect too). As to editing the textures, it is EXTREMELY important xD. In a nutshell:

A good majority of the cockpits have two meshes: A "base texture for the whole part" mesh, and a "flag" mesh. The way TextureReplacer's reflections work is that the less transparent something is on the texture, the more reflective it is. I had to make all the main base textures almost completely transparent except for the windows, which I left visible. Technically the whole surface of a number of the parts are reflective. It just that they have about a 0.1% reflectiveness while the windows have 70%. I'll need to re-add the CREW.cfg module :P. There is no way around only making the whole thing reflective unless the devs specify more elaborate meshes.

Again, thank you. :). I'll add that to the download when I'm no longer on my phone.

Edited by Avera9eJoe
Link to comment
Share on other sites

@Avera9eJoe

Rockin on, just double checked and saw version 4 already. Cheers, gonna test them one immediately. (just checked and maybe I had a previous version)

By the way, I've posted back at the TR thread about Endraxials texture, check it out.

Edited by Gfurst
Link to comment
Share on other sites

@Avera9eJoe

Rockin on, just double checked and saw version 4 already. Cheers, gonna test them one immediately. (just checked and maybe I had a previous version)

By the way, I've posted back at the TR thread about Endraxials texture, check it out.

xD I'm about to upload V5 with TextureReplacer and ModuleManager integration. Gimme ten minutes.

As to Exandrials pack, I took the textures from there in the first place... huh. Hold on a sec I'll get a fresh download and compare resolutions.

EDIT: Just released v5. LOTS of changes, and no more deleting of stock items!

Edited by Avera9eJoe
Link to comment
Share on other sites

Great job. I do like the TR-Reflections now that they don't make things unclickable. Although, the Mk2 Crew Cabin doesn't seem to have glass windows, is this an improper installation, or are those windows just yet to be polished?

Link to comment
Share on other sites

You are a god send. Thank you, I had no clue where to even start with making a ModuleManager config (see my last post on MM for proof). I get the format, now, and I'll be able to add additional parts if I add more (thinking about making the mainsail bell reflect too). As to editing the textures, it is EXTREMELY important xD. In a nutshell:

A good majority of the cockpits have two meshes: A "base texture for the whole part" mesh, and a "flag" mesh. The way TextureReplacer's reflections work is that the less transparent something is on the texture, the more reflective it is. I had to make all the main base textures almost completely transparent except for the windows, which I left visible. Technically the whole surface of a number of the parts are reflective. It just that they have about a 0.1% reflectiveness while the windows have 70%. I'll need to re-add the CREW.cfg module :P. There is no way around only making the whole thing reflective unless the devs specify more elaborate meshes.

Again, thank you. :). I'll add that to the download when I'm no longer on my phone.

Ah, I think I get it. So, if the model does not have a specific object defined for the window part, then the entire texture needs to be altered to make only the window become reflective. Otherwise, just defining the object in the config would do the trick and you'd only want to modify the texture if the part where the window is located needs an adjustment to its reflectivity levels.

Seems to me a good alternative method would have been to allow the modder to specify an alternate texture to use as a mask for the reflectivity of that part. That would be a lot like how we used to have to mask out additive regions of red, blue, and green to mark areas of interest for KerbPaint to recolor the part (primary, secondary, and tertiary color, respective to red, green, and blue, and/or their resulting mix when additively overlayed onto each other.) This would allow for texture replacement without having to mark most of the texture transparent, which causes the default model texture (blank white) to bleed through, thus washing out the color scheme and making texture replacement a pain. It could simply be a white image with the non-transparent parts made completely transparent just like it is now with the main texture. This is all just concept right now of course, but it has inspired me to look at the TRReflection module code and see what I can come up with.

Thanks for setting me straight though. As for the MM configs, if you simply follow the pattern I provided it should work like a charm. Note the word "should" which absolves me of any responsibility if the claim turns out to be completely false. I'm pretty sure it's not false though. Yeah, almost totally positive that it's not a case of not being not false. Are you confused yet? Good, cause I sure am.

Link to comment
Share on other sites

Yes you are entirely correct on how the reflections work. I'm not sure how I would get KSP/TR to load a second "reflective overlay" texture, but doing so would help a ton with my OCD as well as taking better advantage of RAM/memory. Doing reflections by making the whole part reflect but only the windows reflecting visibly just seems like a shoddy way of doing it. Shoddy maybe, but also the only way haha. I actually went through the MM patch and reorganized everything into how they show sorted by title. Not too hard! Thanks again for starting that off.

Link to comment
Share on other sites

Yes you are entirely correct on how the reflections work. I'm not sure how I would get KSP/TR to load a second "reflective overlay" texture, but doing so would help a ton with my OCD as well as taking better advantage of RAM/memory. Doing reflections by making the whole part reflect but only the windows reflecting visibly just seems like a shoddy way of doing it. Shoddy maybe, but also the only way haha. I actually went through the MM patch and reorganized everything into how they show sorted by title. Not too hard! Thanks again for starting that off.

Actually, the idea is not to load it over the normal texture, but to simply use it as a reference mask. The old KerbPaint mod didn't even load the masks with the rest of the assets, and this was before we had anything like a custom asset loader (added before we left KSP beta) and simply used them to define where on a part you were allowed to recolor, and what level of coloring it would accept and/or mix.

I had a look at the TR code however and it looks like the texture is being referenced directly in the shader, but I'm no expert in C# so I'm not going to set that in stone just yet. At the moment, however, it looks like we're a bit stuck. The only other alternative would be to try and import the model into an editor and add an object in the place where the window should be which could be mapped to the same texture coordinates as the original window, but given a separate texture that would hold the modified window values.

It's all rather complicated. It might be easier for me to just take your texture and... err... no, that would still result in reflections bleeding into the non-reflective areas. No, to make this compatible with re-texture packages, we need to be able to reference the windows either as replacement objects in new models, or using a texture mask. I guess we're stuck until a more seasoned programmer can take a stab at it. Too bad KerbPaint totally died a while back... though there might still be some usable code in there... I must see if it's still available.

Link to comment
Share on other sites

Yes you are entirely correct on how the reflections work. I'm not sure how I would get KSP/TR to load a second "reflective overlay" texture, but doing so would help a ton with my OCD as well as taking better advantage of RAM/memory. Doing reflections by making the whole part reflect but only the windows reflecting visibly just seems like a shoddy way of doing it. Shoddy maybe, but also the only way haha. I actually went through the MM patch and reorganized everything into how they show sorted by title. Not too hard! Thanks again for starting that off.

Now only would it help with any OCD, it would stop the thumbnails from not showing any areas of the windowed parts that aren't windows. I think the other mods with TRReflection have the windows as separate meshes to avoid this, but the stock parts don't. This discussion is probably going to get very code-y, so I'll back away slowly.

Link to comment
Share on other sites

I presume this isn't compatible with Ven's Stock Revamp?

Edit: Nope, it isn't

Try commenting out the patches for stuff that's done in Ven's revamp. That's the Science Lab, the Mk1 Cockpit, all the lander cans, the Mk1 and Mk1-2 pods, the cupola, and all the solar panels in the WindowShine cfg. I did it, it worked!

Link to comment
Share on other sites

I found this on imgur recently and I must say it does look amazing. http://imgur.com/TbNFbAq

I do wonder though, is that thing using only WindowShine? Or are there other things enhancing the shadows and stuff? I'm pretty sure the planet at least is also heavily modded.

TbNFbAq.gif

(if the gif is too large or causing bandwith issues for the site, mods can edit it away)

Edited by PTNLemay
Link to comment
Share on other sites

I found this on imgur recently and I must say it does look amazing. http://imgur.com/TbNFbAq

I do wonder though, is that thing using only WindowShine? Or are there other things enhancing the shadows and stuff? I'm pretty sure the planet at least is also heavily modded.

EDIT:

If I embed a big beefy GIF like this: http://i.imgur.com/TbNFbAq.gif (with image tags so people can see it without having to click it) does it hurt the KSP forums website? Or is the hosting strain isolated to imgur?

That GIF was posted by one of the guys on the facebook page. From that picture I can see he's using Proot's Renaissance pack, old Environmental Visual Enhancements, Windowshine (or another form of TR reflections), and most important to that shot, a mod called GEM-FX. It adds more realistic lighting and blurring as well as a dirt/flare effect. There's an outdated and glitchy version of it on the forum but there was a copy posted on the forum (by the same guy) that I was lucky to get my hands on. It's not being openly distributed mainly because I don't think anyone knows who really "owns" the rights. If you ask on the FB page someone might get you the link.

EDIT: I don't think embedding would hurt the forum...

For some reason my panels aren't reflecting anything, but crew capsules are...

(i'm running on opengl)

http://i.imgur.com/QyVsiDt.png

TextureReplacer's reflections don't work with OpenGL so I'm surprised the cockpits work at all...

Edited by Avera9eJoe
Link to comment
Share on other sites

TextureReplacer's reflections don't work with OpenGL so I'm surprised the cockpits work at all...

Didn't know about that, i've used it in a long time and it has worked on the kerbal's helmets, the backgroud always is blue but it works mostly.

Btw, all the cockpits are working with the reflections

Link to comment
Share on other sites

I've been messing with mods for quite a while today. I've gotten basically everything to work but this mod. I even tried it on a clean install (except for the save file I was using) and still nothing. I'm not running OpenGL, TextureReplacer is 2.4.4, and WindowShine is TR-v5. Are there any settings I need to mess with?

Link to comment
Share on other sites

For some reason I can't get mine to work. I've tried a fresh install, and am not using OpenGL. The textures change, but there are no reflections. Any solutions?

Edited by Llama1017
Link to comment
Share on other sites

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