Jump to content

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


HafCoJoe

Recommended Posts

Think you Chubby Hampster for continuing WindowShine!

deEBSgI.png

Logo courtesy of @Teflon_Mike
 
BqsHWSf.png

TbNFbAq.gif

Gif with GemFX and KSPRC v2 courtesy of @cobbman11

Video (-v2)

This mod takes advantage of the TextureReplacerReplaced reflective module pared with re-texturing to make all stock windowed pieces reflective; meaning they mirror any object, planet, kerbal, or thing that gets in front of it. Pure Eye candy.

Pictures: Album on imgurGif in VAB

 

Downloads: 
 
WindowShine is dependent on TextureReplacerReplaced managed by @HaArLiNsH (TextureReplacer maintained by @RangeMachine for 1.2x) and ModuleManager maintained by @sarbian. Make sure to install them both first.
 
KSP 1.3+

 

KSP 1.2-

 

Mod Support packs (for KSP 1.3+) Thank you @miromed!

Mod support pack installation:

  1. Check the Dropbox folder and make sure your mod is supported
  2. Install your mod
  3. Install WindowShine
  4. Install the mod support pack
 
License: Link

 

Shameless plug: If you've enjoyed this mod you might also like the other stuff in my signature!
 
 
- I hope you enjoy. :)
Edited by HafCoJoe
Update to v16
Link to comment
Share on other sites

blackrack said:
Do the windows reflect everything? Sky, planets etc..?

Yes they do :). Anything that is in front of them. From looking into the small lander can, it looks like it draws a cube on the "inside" of the window and maps the textures/faces of what it "sees" on the sides of the cube. I'm not the creator of this effect obviously... :P. I'm the texture and config editor. I had to retexture all the capsules, locate the meshes, and add the reflector module into their configs. Well, it's 2:06 AM where I am so... I'll check on this in the morning. Later!

Edited by Avera9eJoe
Link to comment
Share on other sites

Yes they do :). Anything that is in front of them. Best part about it, no noticeable lag. From looking into the small lander can, it looks like it draws a cube on the "inside" of the window and maps the textures/faces of what it "sees" on the sides of the cube. I'm not the creator of this effect obviously... XD. I had to retexture all the capsules, locate the meshes, and add the reflector module into their configs. Well, it's 2:06 AM where I am so... I'll check on this in the morning. Later!

Yeah I think I saw that effect before, anyway, it's nice to see you actively participating in the modding scene.

Link to comment
Share on other sites

I like this!

Though im always hesitant to replace stock files :(

There should be a way to do this via Module Manager id imagine (adding the TRReflection, and re-assigning the texture should be easy). Course that would mean a double up on said textures in memory :P

If nothing else, may i recommend a .bat file or something of the like. Similar to what Ven uses in the stockpart revamp. for easy adding and removal.

Edited by rabidninjawombat
Link to comment
Share on other sites

I like this!

Though im always hesitant to replace stock files :(

There should be a way to do this via Module Manager id imagine (adding the TRReflection, and re-assigning the texture should be easy). Course that would mean a double up on said textures in memory :P

If nothing else, may i recommend a .bat file or something of the like. Similar to what Ven uses in the stockpart revamp. for easy adding and removal.

I'd need someone to make it for me haha. I can edit textures and mess with config files like no one's business, but coding... I'm no good at. :P

Link to comment
Share on other sites

Did you edit the images you include, or is your work just in the cfgs? I will make this into a MM patch for you I just need to know if the images have been changed.

Yes the images have been changed. The reflections and image opacity are tied closely together, so I had to make all the textures have opacity of 1% (almost invisible), and leave the windows at full visibility.

I'm planning on making a tutorial so other modders can add reflections to their parts. It's fairly simple with practice. :)

EDIT: How easy would it be to add additional reflective parts to your patch? Could you make a config file that lets you add additional parts? I'm planning on making solar panels reflective too and I'd hate for you (or someone) to have to update the patch every time I make more reflective parts. It could also be useful for other modders.

Edited by Avera9eJoe
Link to comment
Share on other sites

Looking amazing, I check it out too, though the replacing of stock files as bit no-no, will too check on if we can make a MM patches, and I guess TR can replace the texture just by having the complete file path inside TR itself.

Link to comment
Share on other sites

blackrack said:
Post a pic of these reflective solar panels in orbit (with scatterer+eve :P)

Hahaha one sec!

- Note that I'm using old EVE with my custom cloud pack. I've had errors with Scatterer before so I haven't been using it in my main save. I've still got it tho ;).

Edited by Avera9eJoe
Link to comment
Share on other sites

This looks awesome! I can't wait to try it out when I get my new laptop.

Any progress on a tutorial for modders? I would like to incorporate this into my solar panels for the various mods I'm in the process of doing.

Link to comment
Share on other sites

-ctn- said:
This looks awesome! I can't wait to try it out when I get my new laptop.

Any progress on a tutorial for modders? I would like to incorporate this into my solar panels for the various mods I'm in the process of doing.

I was going to do a video on it but in the mean time you can read about it on the first page of TextureReplacer. Basically:

 

1. If your part has a flag on it download the most recent version of DebugStuff. This mod can show the internal meshnames of parts, which you will need to find to prevent the flags transparency from turning black. More on this below.

 

2. Make a ModuleManager .cfg for your parts. It's very simple to set up so I'll explain here. Create a text document and rename the file extension from ".txt" to ".cfg", then paste this config inside:

@PART[~~~part name~~~]:HAS[!MODULE[TRR_Reflection]]:NEEDS[TextureReplacerReplaced]
{
	%MODULE[TRR_Reflection]
	{
%name = TRR_Reflection
%shader = ShaderNG/TR_Reflective_Emissive_Alpha
%colour = 0.5 0.5 0.5
%interval = 4
%meshes = 
	}
}

Replace ~~~part name~~~ on the first line with the internal part name of the part you are adding reflections to. Example - the Mk1 Lander Cabin is referred to as "landerCabinSmall" by the game, as seen on the third line after "name = ".

After adding and editing your ModuleManager part Module, save it as a .cfg file with whatever name you want the users to see. Personally I'd suggest following the naming convention used in the other mod packs. Copy/save this .cfg file to the TextureReplacer main folder (Location inside of GameData shouldn't actually matter but it's most sensible in TextureReplacer).

 

3. Boot up KSP and load the parts you added a config to. If your .cfg file is correct then most of the part should be reflective. If your part has a flag on it you will also notice that any transparency in the texture will show up as black. We'll fix both of these issues in a second.

 

4. SKIP THIS STEP IF YOUR PART HAS NO FLAG DECAL. If you leave the line "%meshes = " blank then the reflection plugin will apply reflections to every "part" of the part including the flag. This is perfectly fine if you don't have a flag but since reflections make any transparency in the flag turn black, you will need to find the mesh names* you want reflective and list them on this line. Example:

The Mk1 Lander Cabin's window and main body is called "obj_base", and in this screenshot you can see I simply pasted the mesh name that included the window on the line in my config file:

mj9IOxa.png

If you did this correctly, then the areas you want to be reflective should be reflective, and the flag transparency should now look correct. Everything from here is just touching up part textures!

 

5. Edit your part texture so only the parts of the texture you want to be reflective are showing. Everything else should have an opacity of 1%. Dig through the original mods folders until you find the texture pertaining to the part you're adding reflections to, and then open it in an editing software. I use paint.net with a alpha removal plugin, but any editor that can create layers and remove transparency should work.

Like in the second image, your texture will look like a clear background with only window textures/solar showing. If you are converting between PNG and DDS images note that DDS images need to be flipped vertically when saved. If you are using paint.net, these are the best settings:

IXUVM3l.png

Courtesy of @InsanePlumber

6. Take the texture you've edited/created and recreate it's file path from the GameData folder. After you've done this place the texture in it's part folder, and place the stack of folders inside TextureReplacer/Default/ so that it should look like "TextureReplacer/Default/[original mod folder]/[part category folder?]/[part folder]/[your texture]" - use any one of the other mod downloads as an example if you're having trouble with this.

7. ...

8. Profit

Edited by Avera9eJoe
cleared up code
Link to comment
Share on other sites

You should probably mention the OP under Known Issues that it's not compatible with OpenGL mode (as TR's reflection isn't).

Doing so know. Thanks :).

EDIT: New release. Added Mk3 crew cabin (for some reason the files are located in fuel tanks), and made missed windows on the Mk2 pods reflective.

Edited by Avera9eJoe
Link to comment
Share on other sites

So how are the reflections rendered exactly? Is this a feature of texture replacer? How does the shader work?

texture replacer has the function but its default settings are not good but i fu tweak u can get just like that gif.

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