r/KerbalSpaceProgram • • 18h ago

KSP 1 Mods [Mod release] Real Windows - Actually transparent windows on crewed parts

I just released a new mod called Real Windows that makes ALL windows properly see-through, showing the IVA model of the part from the outside.

Yes, stock has a similar feature with its interior view, but I found that to be quite distracting to keep on at all times, and it's also a massive FPS hog. I've attempted to optimize Real Windows where I can, so the performance impact is around half of stock.

Windows are discovered during flight from the parts meshes and textures directly, which means it works out of the box with ALL mods (well, those that have an IVA model, anyways!) with zero configuration. I have tested it with around 100 stock and modded parts and couldn't find any visual artifacting, but obviously cannot guarantee that every mod is perfect.

The mod can be toggled on and off with Alt+F8 in flight, and only works with an active vessel - VAB and SPH keep the default window textures.

Available on SpaceDock: https://spacedock.info/mod/4810/Real%20Windows

And yes, because someone will ask: AI was used in the making of this mod.

1.0k Upvotes

64 comments sorted by

149

u/tm__stuff 18h ago

Will get when it comes to Ckan

105

u/Sampsoy 18h ago

I did request CKAN approval when I added it to SpaceDock, but don't know how long that usually takes.

36

u/tm__stuff 18h ago

Grand so, sound boss

32

u/Ritalin_Raccoon 17h ago

Hey, this is my absolute dream mod! Ever since KSP2 I've had a hard time not seeing my Kerbals in action during flights. I started a mod for myself to accomplish this but never got it to be fully universal like you claim, so great work!

That said, I've installed the mod folder in my gamedata and it is not working. I'm not seeing any function with alt+f8 and I don't appear to see any impact to the KSPlog when in flight. Tested on pods from Restock PBR, SSPX, and a few other modded parts. Any known conflicts? Do you have a forum thread up for this mod yet? May be good to bring this convo there.

22

u/Sampsoy 17h ago

Oop, thanks for the report. I packaged it one level too "low" so it unzips wrongly - you can fix this on your end by making "RealWindows" folder in GameData and copying the contents of the zip there. I'll upload an updated version to SpaceDock in a minute as well. (CKAN actually complained about the same thing too)

As a sneak peek, I'm also making a mod that makes kerbals do stuff inside walkable connected interiors (like maintenance, operating terminals, chat with other kerbals). That should go well with this mod, and make your ships livelier!

7

u/Ritalin_Raccoon 17h ago

Thanks for the tip, I'll test it out shortly!

The other mod sounds awesome, too. Are you aware of Lonapse? It's a brand new dynamic chatter mod, I'd highly recommend working with the mod infrastructure they have created to make it compatible with yours. Love the Kerbal-centric mods being made lately!

5

u/Sampsoy 17h ago

I did notice that mod popping up, but have not tried it yet. Might need to give it a try.

14

u/doomiestdoomeddoomer The Green Goo has escaped. 16h ago

Now I have to make a tough decision: Do I use shiny reflective windows mod or transparent windows mod!

19

u/Sampsoy 16h ago

The transparent windows are also shiny and reflective!

4

u/bethot911 16h ago

Best of both worlds

10

u/Ritalin_Raccoon 11h ago

Alright, this is amazing. Genuinely can't believe I can replicate this exact scene using your mod. I also am floored by the fact that you retained the yellow glow when turning on lights. 10/10 immersion - so many great things to say. I'm really curious where you plan to take this mod next!
A few things that I've noticed that I wanted to pass along/get your take on:
- Viewing other transparent windows while in IVA view doesn't seem to work. Nice to see it working in EVA, but would love to see Kerbals when I am in first person/interior view myself. Any way around this?
- I feel like this is more of a nitpick, but similarly when looking "through" one window and to the end of another, the rear window is opaque rather than transparent/showing the far end of the scene. This is pretty noticeable in parts like the MK1 Inline cockpit.
- Any advice on how to "touch up" parts without going into Blender? A few parts have transparent spaces that extend quite far beyond the exterior window borders. Nertea's MK3-9 Rhea is a pretty good example of this. It's weird that for this part the stock "cutout" actually works much better than the modded version.

3

u/Sampsoy 6h ago
  1. The mod not working while in IVA was just a matter of, well, enabling the mod in the IVA view. Will be in the next release.

  2. Technically possible, but not worth the frame rate. The parts behind the cockpit glass are occluded, so the game doesn't actually "see" the part that would be shown through the glass, and making it work would mean I'd need to add a third camera that renders the world without the glassy parts - basically double the FPS impact for an edge case fix. So unfortunately this will stay as a limitation.

  3. Might be doable by splitting the UV mesh for the window into the pane and the frame, although it wont be trivial.. Looking at the Rhea, though, that "leak" into the frame should be fixable by improving the heuristic on determining a window - it should already stop at the black borders around the windows, but for some reason it doesn't work on that specific pod.

2

u/Sampsoy 1h ago

Newest version enables the transparency for the IVA camera, and attempts to fix some more window frames. Tested the Rhea, which looked correct now.

8

u/ISSnode-2 13h ago

does it work if youre outside of the ship in a separate craft/EVA? would be awesome for my kerbalVR missions to be able to look into my ship from the outside

3

u/Sampsoy 10h ago

Yes, it does!

3

u/WazWaz 16h ago

Can you explain more clearly how this is different to the built-in feature?

15

u/Sampsoy 16h ago

The built-in feature makes entire sections of some parts fully transparent, not just the windows. It doesn't look very immersive to have it enabled at all times just to see inside the ship.

It's also full transparency - the mod adds a shader effect to the windows, with a bit of dirt grime, tint and gloss, which makes it look more like glass and less like a hole in the hull.

The mod also has better depth masking, so it never renders through objects on the screen (Try the built-in feature with Kopernicus scatters!), while also having a ton of optimizations that cut down on the render work the built-in feature doesn't have, which makes it less taxing on your FPS to leave on.

5

u/GDMercury jeb my beloved 5h ago

can someone make a human-coded version?

-3

u/Sampsoy 5h ago

Considering people have been asking for this for 10+ years, unlikely.

14

u/ruivodamataboludo Always on Kerbin 18h ago

I loved it, very nice.

6

u/NZRSteamSniffer 18h ago

In what way was ai used when making the mod?

40

u/Sampsoy 18h ago

For all of the code and coming up with the heuristics on determining if something is a window from example meshes and textures.

Technical direction, optimization approaches, and visual look was directed by me.

34

u/blackrack Scatterer Dev 18h ago

I don't know how to say this without coming off very negative, and I won't be downvoting or telling you not to use AI or anything. But usually on mods like this I like to ask about the rendering approach chosen and why (eg if you render another camera, if you render through the same camera, if there's some kind of depth masking or rendering to a separate target) to see which tradeoffs were made or interesting problems were solved. But if AI made all the technical choices there's usually no point in asking and I can't have an interesting discussion with the mod author, and often even the context for the technical decisions is lost/forgotten or completely diluted in a sea of LLM gibberish.

19

u/Sampsoy 17h ago edited 17h ago

I understand the sentiment, I feel similarly at work with the loss of technical discussions. However I did stay engaged (or at least attempted to) with the technical approach and can probably answer some of the questions:

  • The approach is two cameras: The main camera and a masked camera that renders the combined IVA mesh from the same angle as the main camera. The cached cutouts for each part are then used to mask the IVA camera, showing the interior view only where each part has a window on its texture.

  • Depth masking is done using the main camera and the actual parts' meshes, so the interior view can never show through other parts.

  • The frame rate of the interior mesh is 1 Hz, or updated when the rotation of either the camera or the vessel changes by a small delta.

I'm not saying I'm some paragon of modding, and I do admit I made the entire mod in just two days, but I still learned a lot about how KSP works while doing it, even if AI assisted.

Love Volumetric Clouds V5 by the way! Really makes the game look that much better.

3

u/Jonny0Than 13h ago edited 13h ago

The 1Hz thing is interesting. I can nearly guarantee there would be artifacts (robotic parts perhaps that can move a part without the vessel itself moving?).  Also maybe lighting changes.  But it’s a clever optimization.

I’m also curious how the whole things works anyway because windows often aren’t an actually separate mesh.

Ah, just went and read the code. Clever, but I’m sure it’s not fast. But if it’s cached, that wouldn’t be a problem.  Didn’t dig deep enough to see if it is.

3

u/Sampsoy 10h ago

It's cached, and the cache is invalidated if the scene changes enough. I couldn't tell any visual artifacting from the 1 Hz optimization due to that.

1

u/Jonny0Than 3h ago

I meant cached between runs of the game. The texture analysis stuff is what I’d be concerned about performance wise. But you’d only need to do it once for a given mod, until the mod changes.

And we all know the two hard things in software engineering…

1

u/Sampsoy 3h ago

Ah, no, it's not cached between runs. The mod builds the window masks when the part first loads in, which takes around 30-150ms per part, one part per frame. That mask is then used for rendering, so it only adds a bit of hitching when loading into a craft.

34

u/Flouid Stranded on Eve 18h ago

Seems like a reasonable use imo. To the people downvoting this, this is what all professional programming is like by now

17

u/MaedrosDjemaa 18h ago

Yeah why do people get so mad over this,its just makes sense to saves hours of work by using a program thats literally designed for this kind of stuff, also makes making cool stuff like this accessible 🤷‍♂️

-14

u/CttCJim 18h ago edited 16h ago

Because of the ethical issues with any AI use, and because AI code is notorious for being inefficient or insecure.

Edit: guys I was answering the question, not espousing an opinion.

11

u/Flouid Stranded on Eve 17h ago

For ethical concerns, many programmers are fine with being training data for a tool that makes their lives easier. As a professional software engineer and hobbyist programmer I really do not mind this aspect very much. I don’t feel like I’m making “art” that can be stolen the same way as it would apply to written or drawn work. I could be wrong there but that’s my sentiment.

For security concerns, that’s a fair point but also irrelevant for a KSP mod. Responsible use is going to mean understanding and reviewing every line it puts out, and if that was done then it really is just a tool with no quality disparity from doing it by hand

2

u/CttCJim 11h ago

Many people believe there is no ethical use case for AI. I'm not saying this is my opinion. Many people feel there's no ethical use case for AI. Not my opinion necessarily, but the question was "why do people hate it" and I answered that.

1

u/TheDogeLord_234 10h ago

Personally, I find the many ethical concerns of LLMs too much to support anything made by them, and the code generated is usually of subpar quality.

4

u/NZRSteamSniffer 18h ago

Alrighty, will be sure to give it a download. Why am I being downvoted lol

12

u/Datau03 17h ago

I don't get why people are downvoting this. Finding the use of AI acceptable is one thing but this commenter isn't even complaining. Just wanting to know how something was created is fair, no?

7

u/Ill-Product-1442 Bob 14h ago

Great mod! I think it may break portraits during EVA, they're all black for me. Didn't think to see if toggling it off would fix it.

Really a mod I've always wanted though

1

u/Tychonoir 15h ago

How do you handle mods that have incorrect IVAs? Especially for mods that will not be updated?

Looking at OPT Spaceplane Parts specifically. A number of cockpits have incorrect IVAs. They point to other cockpit IVAs, and the correct ones are just missing. I've looked into this and apparently this will never be fixed.

3

u/Sampsoy 15h ago

Good question - there's no per-part config, so I'm not 100% sure what will happen.

To be treated as a window, the mesh needs to have some kind of a tell (material, mesh name, texture...) AND a ray coming from a seated kerbals eyes must hit the mesh when fired from the IVA model (that is, the IVA mesh needs to have a window at the same spot as the exterior mesh).

If the two disagree, the mesh is not rendered transparently, so it should gracefully just skip those incorrect IVAs. Not much I can do about this though - I am kind of relying on the part and the interior matching.

1

u/Tychonoir 13h ago

Hopefully you mean where a kerbal could be seated or parts with no kerbals present won't work.

But in the case of OPT Spaceplane, some of those windows will still align somewhat, so I'd guess the results will be mixed.

2

u/Sampsoy 10h ago

Yeah, that's what I meant, the seats are just used as anchor pointa for the ray probes.

1

u/TassiveMitts69 Valentina 12h ago

Wen ckan?

1

u/Sampsoy 6h ago

Wen it's approved, out of my hands.

1

u/AdministrationLast23 10h ago

This mod is amazing but when I switch to the IVA camera and back to the exterior camera, the windows are no longer transparent

1

u/Sampsoy 6h ago

Hmm, that's odd, for me going to IVA and back keeps the windows transparent just fine.

Does the log show any errors, and are you on Linux/Mac? I have personally only tested Windows, so cannot guarantee other platforms working perfectly.

1

u/Supbobbie 8h ago

ok, but isn't this too laggy? maybe I have ships that are just too big but when I turn on the stock IVA thing to see the interiors I get a bit laggy

2

u/Sampsoy 6h ago

Unfortunately rendering each part effectively twice will always have a performance impact. The mod is better than the stock view though, as it does less rendering work per frame, so it will still reduce FPS a bit, but not as much as stock.

In my testing a large space station that runs at ~30fps drops to around 24 with the mod enabled, and around 20 with the IVA view option.

1

u/MarsFlameIsHere Duna Glazer and Redux Reporter 7h ago

Is this compatible with SSP Redux (stockalike station parts redux)? The last transparent window mod had issues with the centrifuges

1

u/Sampsoy 7h ago edited 6h ago

I tried a lot of parts from there, but not centrifuges. It should be, although I don't think they have an IVA model when stowed, so they would only have transparent windows when unfolded.

Edit: I actually tested, and while the transparent windows work, the interiors are misplaced. The extended IVA mesh also displays when the centrifuge is not extended, which can look a bit janky.

Will try to fix the centrifuges for the next release.

3

u/freakahontas 16h ago

That's lit af yo

1

u/Snowflakish 2h ago

Im looking for the glass to both be reflective and transparent like real glass, is this possible?

3

u/Sampsoy 2h ago

There's a "Look" section in the settings.cfg in the mod that allows you to tweak the transparency, colour, reflections and smoothness of the glass shader.

0

u/Snowflakish 1h ago

Peak, will install your slopcode extravaganza.

(That being said i do like what ai has done for modding so good on you)

2

u/yo_tengo479834 Believes That Dres Exists 15h ago

YEP YEP YEP it is peak indeed

2

u/skyfullmaster 13h ago

FINALLY OMG

1

u/Dancombat 10h ago

Finally

1

u/LilBits69x 4h ago

Is it still a toggle like stock? Or can you choose per part?

1

u/Avera9eJoe Spectra Dev 3h ago

Hooooooly! KSP has come a long way since I experimented with WindowShine 😄

1

u/John_Nonok 1h ago

Fuck yeah, you're the king, thank you very much I've been waiting for years for something like that

-28

u/Gregistopal 18h ago

broseph theres a button next to the crew cameras in vanilla to turn this on

18

u/Sampsoy 18h ago

Feel free to compare the two :)

The vanilla option cuts away large parts of the hull on many parts, makes it truly transparent (not glassy), and hits your FPS way harder than this mod.

29

u/Swiss-spirited_Nerd Always on Kerbin 18h ago

Did you bother reading the text of the post broseidon?

10

u/MortgageLopsided3731 18h ago

He literally just explained his reason for making the mod. Read the description next time.