Jump to content

[WIP][1.9.x-1.12.x] Scatterer-atmospheric scattering (0.0838 - 14/08/2022) Scattering improvements, in-game atmo generation and multi-sun support


blackrack

Recommended Posts

Just now, blackrack said:

From the looks of it this will take another 15 minutes as my internet is unbelievably slow in upload. Get a drink, clean up your KSP install and chill out while waiting.

Understood. Thanks for all the hard work, Blackrack!

Link to comment
Share on other sites

Agh. I hope my relationship survives this.

But if needed, I have a 247 part, 56000 tons, 350 meter aircraft carrier for ya, blackrack. You can fill that deck with a filthy amount of F14's. I also have a 260 meter battleship.

Link to comment
Share on other sites

It's up.

 

27 minutes ago, Azimech said:

Agh. I hope my relationship survives this.

But if needed, I have a 247 part, 56000 tons, 350 meter aircraft carrier for ya, blackrack. You can fill that deck with a filthy amount of F14's. I also have a 260 meter battleship.

I'm heading to bed now, but I need to find some screens of that when I wake up.

Link to comment
Share on other sites

8 minutes ago, blackrack said:

Well, this bit of code is called to create several meshes https://github.com/LGhassen/Scatterer/blob/ocean/scatterer/Ocean/OceanNode.cs#L239-L287

But I haven't really looked much into or what happens later inside the shader. I cared mostly about getting it running :P

Gotcha... Just quickly skimmed it... looks like they do some funky things in there that I honestly have no clue why they do it that way... In this case, they create a plane in front of the camera (much as I would expect... we do a cube for our purposes) but what is odd is the mesh... instead of a single quad with 4 vertices spanning the camera view, they make MANY quads with 1 vertex PER PIXEL. I can't think of a good reason that they would do this, unless they were doing this in Proland for another engine and the guy porting it to Unity didn't bother with any optimization.

At any rate, this explains why lights and shadows (and projectors) would not work... they simply can't. The geometry doesn't place them in the right location and there is no possible geometry to go off of. However I have a possible work-around though. Much like you've seen with the projectors with the ocean geometry, what we can do is create a large quad that moves around the craft that is transparent, and receives shadows and lights. We keep it at ocean level, and just rotate it to always be underneath the craft. It'd have to be somewhat large, but the performance should be pretty negligible (four vertexes only). We'd want to disable projectors on it though. 

As for projectors (and by extension cloud shadows), I'm not sure I have a good solution. I'm thinking I could create a companion shader that does something similar as your ocean shader (plane/cube in front of camera) but then in EVE, we need a method to detect that there is no ocean (or it is disabled) so EVE could do this. 

Link to comment
Share on other sites

Ok odd..... I don't know if this is because I'm super sampling my screenshots but the shader isn't showing up in screenshots taken within the game but thats why we have other ways. I don't even know how you did this in the slightest but I'm so grateful you did.

Spoiler

xkDMLvl.jpg

 

8 minutes ago, gkorgood said:

@Nhawks17 do you recommend using your custom configs for scatterer with the new release and SVE, or just @blackrack's standard atmo configs?

Not right now. I'm going to guess the configs have changed to accommodate the ocean stuff now so they probably won't work. Stick with the default stuff.

 

Edit: Nevermind, he implemented the configs separately. They should work fine 

Scratch that, I think I need to look into this more :P

Edited by Nhawks17
Link to comment
Share on other sites

6 minutes ago, Nhawks17 said:

Not right now. I'm going to guess the configs have changed to accommodate the ocean stuff now so they probably won't work. Stick with the default stuff.

 

Edit: Nevermind, he implemented the configs separately. They should work fine 

Scratch that, I think I need to look into this more :P

also, is it a bug that nice SVE textures don't show up in map view?

Link to comment
Share on other sites

Just now, gkorgood said:

also, is it a bug that nice SVE textures don't show up in map view?

SVE textures are showing up for me in map view.... Post screenshots of it in my thread if it continues. Don't clog Blackrack's thread with it :sticktongue:

Link to comment
Share on other sites

21 minutes ago, gkorgood said:

also @blackrack I think you forgot a folder. right now it goes \Scatterer-v0.021\GameData\Config

you usually make it \Scatterer-v0.021\GameData\scatterer\Config

This needs to be the right case for Linux so if it don't work change it to an lowercase c - edit

Edited by selfish_meme
Link to comment
Share on other sites

It seems you put the source of ReconstructedHeight in the zip file too

Haha, I'm out of memory, need to pull my box apart and add in a couple more sticks

[ERR 16:21:20.713] Could not allocate memory: System out of memory!
Trying to allocate: 65540B with 32 alignment. MemoryLabel: Texture
Allocation happend at: Line:411 in 
Memory overview


[ ALLOC_DEFAULT ] used: 344566591B | peak: 344609435B | reserved: 348892241B 

[ ALLOC_GAMEOBJECT ] used: 27186924B | peak: 29555965B | reserved: 28791996B 

[ ALLOC_GFX ] used: 426862298B | peak: 571404864B | reserved: 427097925B 

[ ALLOC_PROFILER ] used: 94356B | peak: 94356B | reserved: 112703B 


[ERR 16:21:20.713] Texture '' has no data

[ERR 16:21:20.713] No Texture memory available to upload

 

Link to comment
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.

×
×
  • Create New...