Shadowmage

[WIP][1.7.x] SSTULabs - Low Part Count Solutions (Orbiters, Landers, Lifters) - Dev Thread [11-18-18]

Recommended Posts

Heh, is shadowmage pushing boundaries again?

I wonder what the performance impact is, though.

Share this post


Link to post
Share on other sites
1 hour ago, Temeter said:

Heh, is shadowmage pushing boundaries again?

I wonder what the performance impact is, though.

Possibly a bit on the memory front but otherwise it shouldn't slow down rendering. Considering the insanely low number of polys being rendered at their highest LOD in any KSP scene, the rendering pipeline has to be a minority fraction of the time being taken to render frames.

Share this post


Link to post
Share on other sites

Lol. Does that make us space hipsters?

Share this post


Link to post
Share on other sites
11 hours ago, Temeter said:

Heh, is shadowmage pushing boundaries again?

I wonder what the performance impact is, though.

Who, me?  I would never....

10 hours ago, vossiewulf said:

Possibly a bit on the memory front but otherwise it shouldn't slow down rendering. Considering the insanely low number of polys being rendered at their highest LOD in any KSP scene, the rendering pipeline has to be a minority fraction of the time being taken to render frames.

 

Indeed, performance impact should be minimal / negligible.  This is the Unity 'Standard' shader after all -- it is intended to work even on mobile (though with fewer features/simpler rendering); even now the models used in KSP are relatively simple, and the textures fairly low resolution.  The only bit that is being done...outside..the normal Unity graphics pipeline is the reflection probe updates, and those have to be updated one way or another. 

However one thing that I will be doing before I officially change over to the new shader is some mass-testing / performance limit testing.  Find out exactly how it compares to the recoloring shader, and how they both compare vs. the simple KSP shaders;  both with and without Scatterer/etc.  Another thing that I'll likely implement is some in-game settings to control the quality of the reflections / frequency of updates, including an option for 'static' (so there should be no run-time impact for reflection updates).


On the Scatterer note -- still not quite working well with it yet.  Scatterer does some... strange... things regarding rendering of its special features;  it renders them in screen-space as a post-processing effect.  Which is all good and fine... until you change the camera you are rendering from (for updating reflections), without updating the camera-basis transform for the screen-space translation.  So my reflection camera ends up rendering the ocean/sky effects in the position they would be if the refl camera was the main KSP camera.  Except the skybox/atmosphere... that is rendered traditionally.

Bit of a mess... but I'm pretty sure I'll be able to sort it out to at least disable the extra renders during reflection updating.  -Ideally- I would be able to link into scatterer and update its screen-space transforms/matrix on a per-reflection-cube face basis, and render the scatterer ocean and etc directly into the reflections.  If I was a bit more familiar with the low-level rendering hacks that are in use it would be done already.  Will be taking it up in the Scatterer thread to see if anyone there has any ideas / see if the author has a minute to chat (last I checked though he was MIA from the forums).

Hmm... looks like there is some hard-coded support for fixing reflections for TextureReplacer.  (https://github.com/LGhassen/Scatterer/commit/dea51546c8fb58e97ddc2d10860a0301cb5a5110) I can probably hook into those and make it all work simply by naming my camera 'TRReflectionCamera'.   (WTB proper inter-mod API capability)  Will have to talk to blackrack about getting a proper API-based/mod-agnostic setup for that function.  Seems like there should be a very simple toggle to turn the post-processing on/off via external code (well... technically... scatterrer should check what camera is being rendered before applying post-processing; and this whole issue would be a non-issue).  And ideally, there would be the option to include the ocean and other effects into the reflections (though I can see that being expensive; as it is done as a post-processing effect, the entire setup would have to be redone for each face of the reflection cube).  Perhaps that can be a long-term integration goal.

 

Up next will be looking at EVE clouds.  Really not sure where to begin on that one.  As with scatterer, I'll have to do a bit of digging into the code to see how best to handle it.  I'm really hoping that it is done in a bit of a more traditional rendering setup (e.g. using meshes/particles/objects/whatever), as I'm already familiar with how to handle those types of setups.

 

 

Share this post


Link to post
Share on other sites

Neat to hear! Idk about performance, so I was wondering about draw calls 'n trash 'n stuff...

But crazy to think about it. With Unreal 2 I was shocked how round those rooms were, now I'm getting told those neat, physics based shaders are cheap mobile stuff :D

 

When you got an UI and wanna performance testing, you could also give us a test git-fork version so we'd report back issues if that's helpful^^

Edited by Temeter

Share this post


Link to post
Share on other sites

Scatterer works with the bit of a hack I posted above.  Only works from in-atmo; while in-orbit the atmosphere scatter is not rendered.  Due to how scatterer works, it would require support on the scatterer end of things (re-setup and re-render the scene from the 6 directions, adjusting the screen-space setup accordingly).  Will look into it further after more research on if the system itself will be viable and something that I'm going to use.  The important part is that it is generally artifact-free -- most things will not be very reflective or have rougher reflections where minor imperfections in the environment map will not be visible.

Scatterer sunrise, in reflection (also with some eve clouds...):

AlCZ846.png

Also got the local-space EVE cloud reflections all figured out (removed the ugly terrain 'shadows').

Jq1RN6h.png

So in-atmo effects are working quite well.  Apparently scaled-space / on-orbit views are going to be a bit more difficult, but what is already working is quite nice.

 

Still a bit more work to determine if all of this will even be viable in the long term.  Need to do some code cleanup/optimization, try out more textures/materials, and lots and lots of testing (performance, edge-case, etc).

Share this post


Link to post
Share on other sites

I tend not to use scatterer anymore as it borks up more than it enhances. Misty skies would be nice if half the sky was not glitching as hell, or the ocean disappearing etc. And I've not seen any hints at fixing this stuff for ages, a real shame as together with EVE this was the most awesome visual enhancement in the game.

Edited by Jimbodiah

Share this post


Link to post
Share on other sites

Hey guys, I was building a space station and I realized the docking ports are not cls compatible. I can put one of those hub endings, but the docking ports I attach to it are not compatible. 

 

My quick fix, I just went to the general structure parts cfgs, found port 1 and added the cls module making it passable and attachable too, I guess. 

Anyway,  it worked perfectly after that, so I thought i would leave you a heads up. And maybe you might want to add that to that part at least on the next update.

If you need any more details on what I did, (but I doubt that cause you guys are clearly more in the know than I am) i could post the config file I changed somewhere for your appreciation. 

Cheers. And this mod is great btw.

Allows me to do great things in ksp and keep my part count ridiculously low.

Thanks a lot.

Share this post


Link to post
Share on other sites
19 hours ago, Jimbodiah said:

I tend not to use scatterer anymore as it borks up more than it enhances. Misty skies would be nice if half the sky was not glitching as hell, or the ocean disappearing etc. And I've not seen any hints at fixing this stuff for ages, a real shame as together with EVE this was the most awesome visual enhancement in the game.

If I had a bit more time on my hands I would highly consider it.  The fundamentals of both mods are pretty simple; the implementations a bit of a mess though.  The atmo bit of Scatterer is pretty much screen-space fog, using some special functions to calculate the color and depth (the ocean stuff is a bit more complex).  Eve clouds are essentially just a textured sphere overlaid onto the planet (more to it than that, but that is the base of it).  Those two bits I could probably replicate and get working without too much difficulty.  The other functions though would require a bit more effort to get functional.

Even as it stands I'll likely be putting in some PRs to both in order to accomplish better (higher performance, better looking) integration with the reflection rendering.  Nothing major, just a few accessibility changes, but should make everything run smoother.

 

Today I'm starting work on setting up the 'optimized' reflection handling code.  This will be a single central class that is responsible for updating the reflection textures for all parts/vessels on a scene, handling changes in functionality due to config options (update frequency, texture size), and managing the camera update functions.  Once this is in place and working, I'll look into doing some performance testing to see how it all lines up compared to existing KSP and SSTU shaders.  Will be doing testing on both my desktop for high-spec test (GTX970, 24g ram, i5@4.5ghz), and on my laptop for a low-spec test (GTX940MX, 8g ram, dual core i5@3.2ghz).  If this all goes well, I will see about putting together a performance testing pack to make available for download, and try to get some performance data from whomever is interested in helping to test it.

Initially I'm going to set the reflections up to be on a 'per-vessel' basis, and reflect only the surrounding scenery (no other vessels / parts).  Updating of the reflection texture will likely be done once per-second (~60 frames); when used as an environment map, that will be plenty for most materials (mirror-like materials could benefit from up-to real-time updating, if the system is capable of it). 

Currently I have the reflections updating in real-time (every frame), and there is no noticeable performance drop on my desktop from updating of the reflection cubemap when testing on very simple craft at low/medium cube resolution (256x) (even with Eve/Scatterer in place, steady 60fps).  I would imagine that the performance hit will be minor, and that performance will still be far more limited by part-count and collider-complexity than it is by the rendering pipeline (even if you double the rendering time, it will still be minor compared to the physics update time).

 

General development news:

Not much.  Have been playing with shaders too much the last week to accomplish much else.  There were a couple new issues opened on GitHub this week though, and I'm going to try to find time to get those fixed up.  Continuing deliberations on how to clean up the career mode progression and might have a few more tech-tree updates coming as well.

 

19 hours ago, Kuldaralagh said:

Hey guys, I was building a space station and I realized the docking ports are not cls compatible. I can put one of those hub endings, but the docking ports I attach to it are not compatible. 

 

My quick fix, I just went to the general structure parts cfgs, found port 1 and added the cls module making it passable and attachable too, I guess. 

Anyway,  it worked perfectly after that, so I thought i would leave you a heads up. And maybe you might want to add that to that part at least on the next update.

If you need any more details on what I did, (but I doubt that cause you guys are clearly more in the know than I am) i could post the config file I changed somewhere for your appreciation. 

Cheers. And this mod is great btw.

Allows me to do great things in ksp and keep my part count ridiculously low.

Thanks a lot.

Please open up an issue ticket on the subject, or preferably a PR with the necessary changes in place.

As I don't personally use CLS it is not going to be a very high priority, so if you would like a fix sooner-rather-than-later, a PR would be the way to go.

Edited by Shadowmage

Share this post


Link to post
Share on other sites

Sketchfab embed testing....

Sketchfab

 

Shows up in the text-box fine....

But disappears after I hit 'post'

Edited by Shadowmage

Share this post


Link to post
Share on other sites

You gotta love when linked stuff does that.

The link below doesn't work, though. Looks like a generic popup thing:

https://sketchfab.com/?utm_medium=embed&utm_source=website&utm_campain=share-popup

 

Share this post


Link to post
Share on other sites
Just now, Temeter said:

You gotta love when linked stuff does that.

The link below doesn't work, though. Looks like a generic popup thing:


https://sketchfab.com/?utm_medium=embed&utm_source=website&utm_campain=share-popup

 

Yeah, that is some link added by the forum software; not sure what it is supposed to be.

Sadly, looks like I'll have to take this problem back to the devs to see if they have any input on it.  Was supposedly fixed up late last week, but I haven't had a chance to test it until just now.

Share this post


Link to post
Share on other sites
4 minutes ago, Bottle Rocketeer 500 said:
 

Sketchfab

Working just fine for me, @Shadowmage


Strange, not showing up for me in the browser at all.  Note, my post showed up for me fine while in the post-editor, but disappears after I hit 'submit'.

Hmm... trying a different browser now....

Edit:  No difference when trying IE (normally use Firefox).  Have already tagged a dev on it to see if they have any ideas.  The dev who got the feature working successfully added his to a post, so I'm not sure what is going on.

Edited by Shadowmage

Share this post


Link to post
Share on other sites
8 hours ago, Shadowmage said:

Please open up an issue ticket on the subject, or preferably a PR with the necessary changes in place.

As I don't personally use CLS it is not going to be a very high priority, so if you would like a fix sooner-rather-than-later, a PR would be the way to go.

I will try, though I have to say I am a bit of a noob when it comes to these things internety.

I do have a github account though, but i don't use it at all except for downloading mod files.

well, this seems like a good time to learn it. 

EDIT: I've just realized my level is Bottle Rocketeer, and I happen to actually be a bottle rocketeer.  spot on.

EDIT 2: btw, about that noob thing. Is a PR a Pull Request?

Edited by Kuldaralagh

Share this post


Link to post
Share on other sites
6 minutes ago, Kuldaralagh said:

I will try, though I have to say I am a bit of a noob when it comes to these things internety.

I do have a github account though, but i don't use it at all except for downloading mod files.

well, this seems like a good time to learn it. 

EDIT: I've just realized my level is Bottle Rocketeer, and I happen to actually be a bottle rocketeer.  spot on.

EDIT 2: btw, about that noob thing. Is a PR a Pull Request?

Sorry, yes, PR = Pull Request.

If you aren't already familiar with the PR process, I would suggest simply filing an issue ticket.  Simple issues like that I tend to knock out during downtime at work, so chances are it will be done for the next release.

Share this post


Link to post
Share on other sites

@Shadowmage Having a few problems with the LR81 engine. No sounds and seems to be ignited throughout the flight (see pic)

Running SSTU and Jimbodiah's Patches.

https://i.imgur.com/hVP5S06.png

 

Edit: :/ Reinstalled RealPlume again and everything seems fine. Very strange.

 

Love the mod :)

 

Edited by Kalidor

Share this post


Link to post
Share on other sites

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.