-
Posts
2,719 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by rbray89
-
How to disable the ocean: public class OceanDisable : PQSMod { public void Apply(CelestialBody cb) { PQS pqs = null; if (cb != null && cb.pqsController != null) { pqs = cb.pqsController; PQSMaterial = pqs.surfaceMaterial; } else { KSPLog.print("No PQS!"); } if (pqs != null) { this.sphere = pqs; this.transform.parent = pqs.transform; this.requirements = PQS.ModiferRequirements.Default; this.modEnabled = true; this.order += 10; this.transform.localPosition = Vector3.zero; this.transform.localRotation = Quaternion.identity; this.transform.localScale = Vector3.one; } } public override void OnSphereActive() { //This is the ocean if(sphere.ChildSpheres != null && sphere.ChildSpheres.Length > 0) { sphere.ChildSpheres[0].isFakeBuild = true; } } public void Remove() { this.sphere = null; this.enabled = false; this.transform.parent = null; } }
-
Hmmm... that actually makes sense... it's quite brilliant actually. You could place them at whatever depth you need them to be at this way. You still get geometry then. I understand why upside-down views wouldn't work though. I think a quick-fix may be to invert the camera matrix and pixel mesh, in certain cases. Why would it not work for arial views? I'm thinking about a quad that is between 500m-1km wide/tall.
-
I think you may have missed my post in all the noise... I have a way to make craft shadows and lights appear, but not sure about cloud shadows. 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.
-
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.
-
Beautiful! Glad to see that sphere-intersection code came in handy. Curious... Do you get a small FPS bump by disabling the stock Ocean? I also think I may have come up with a solution do disable it on the fly as well. I'll test it and let you know. This will be an optional thing. I think what I'll do in the future going forward is release packs (lights, clouds, shadows, terrain, oceans, etc.)
-
[1.1.2][1-1-2] May 13-2016 EnvironmentalVisualEnhancements
rbray89 replied to rbray89's topic in KSP1 Mod Releases
Since the Overhaul, I've tried to push as much "stuff" to the GPU as possible. This means I no longer read textures on the CPU after load, and I try to minimize vertex calculations. That being said, it will likely reduce your framecount by 2-10FPS depending on your machine. In my case with an i7 4700HQ and GT 750M I'll get around an average of 20FPS when on terrain. Without EVE I will get about 26FPS. I'm still working on optimization, so these numbers may come down. -
[1.1.2][1-1-2] May 13-2016 EnvironmentalVisualEnhancements
rbray89 replied to rbray89's topic in KSP1 Mod Releases
I'll think about it... -
[1.1.2][1-1-2] May 13-2016 EnvironmentalVisualEnhancements
rbray89 replied to rbray89's topic in KSP1 Mod Releases
If you want help, please read the OP and follow instructions. Yes, that is intended. I use default values instead of populating the configs with tons of default parameters when possible. In this case, the default changed to be something appropriate for the shader changes. -
[1.1.2][1-1-2] May 13-2016 EnvironmentalVisualEnhancements
rbray89 replied to rbray89's topic in KSP1 Mod Releases
Hmmm... I'd like to hear others chime in on this as well... -
[1.1.2][1-1-2] May 13-2016 EnvironmentalVisualEnhancements
rbray89 replied to rbray89's topic in KSP1 Mod Releases
Was previous EVE as bad? If so, I'm thinking of creating a "downgrade" option for those who still want some of the features. -
[1.1.2][1-1-2] May 13-2016 EnvironmentalVisualEnhancements
rbray89 replied to rbray89's topic in KSP1 Mod Releases
Nope... Should be the same amount of coverage. -
[1.1.2][1-1-2] May 13-2016 EnvironmentalVisualEnhancements
rbray89 replied to rbray89's topic in KSP1 Mod Releases
ALT+0 -
WIP - Environmental Visual Enhancements Development
rbray89 replied to rbray89's topic in KSP1 Mod Development
No worries. At one point that link was for that, but at the moment it is slightly broken. One of the "Joys" of working with bleeding edge -
WIP - Environmental Visual Enhancements Development
rbray89 replied to rbray89's topic in KSP1 Mod Development
You should read the release notes: x86-Configs-Release.zip Not in working state. Comminting to preserve work. 11 hours ago x86-EVE-Release.zip Not in working state. Comminting to preserve work. 11 hours ago -
WIP - Environmental Visual Enhancements Development
rbray89 replied to rbray89's topic in KSP1 Mod Development
What version did you upgrade to? -
WIP - Environmental Visual Enhancements Development
rbray89 replied to rbray89's topic in KSP1 Mod Development
I have no idea... you'll have to try it out. -
WIP - Environmental Visual Enhancements Development
rbray89 replied to rbray89's topic in KSP1 Mod Development
No such thing anymore. Overhaul has been merged into mainline. -
WIP - Environmental Visual Enhancements Development
rbray89 replied to rbray89's topic in KSP1 Mod Development
I'll look into it, but I'm not quite sure at the moment.