Jump to content

[1.12.x] Parallax - PBR Terrain and Surface Objects [2.0.2]


Gameslinx

Recommended Posts

2 hours ago, JonnyOThan said:

There’s a performance segment in the troubleshooting section of the OP.

I'll give it a go, it was added after the last time I took a good look at the OP.

However I have 70+ fps. What I mention isn't frame rate (as mentioned in op) but frame pacing - overall frame rate is high but there are a lot of frames that hitch. Some people don't notice it very much. Unfortunately, I notice it and it is distracting. If the settings shown don't give me an improvement I'll make an issue on GitHub and dive into the source.

Link to comment
Share on other sites

4 minutes ago, Moose said:

but there are a lot of frames that hitch

Out of curiousity can you set your terrain shader quality to High? I am under the assumption that you have it set to Ultra right now. On high, let me know if those hitches are better.

Secondly, there is some hitching in the unmodded game, and Kopernicus adds a small amount since it does some extra stuff on the physics tick. If you can describe the hitching in more detail (how frequent, does it happen on the ground, or in space? Only with scatters enabled?) I can try and improve the performance of what may be causing it.

Also please let me know your CPU so I can work out its clock speed and determine whether what works well for me might become noticeable for you

Edited by Gameslinx
Link to comment
Share on other sites

@Gameslinx when I finish my work I'll test more, with shaders first then onwards. I do indeed have it set to Ultra right now. I'm aware of Kopernicus and Stock hitching but this is very new in comparison.

As for general performance, I notice it mostly when on Kerbin. If I disable grass scatters the improvement is substantial, and I do see noticeable improvement if I increase (thus reduce) culling interval to 2.0. I've been using the in game performance graph plus external toolsa nd at one point the TimeControl mod because it thankfully has an FPS counter.

I have a 5950X at stock speeds with PBO disabled - though I am only using 8 of its cores when not doing production workloads by disabling a CCD. Typically under KSP's load I'm around 4.5 to 4.7ghz. Temperatures are nominal there. GPU is more than enough, as well - full specs. I will attempt the shader settings etc as dictated in OP (including terrain to high) when I'm done working and will get back to you.

Sorry, I'm genuinely not trying to be a pain. Just want to help where I can.

Edited by Moose
Link to comment
Share on other sites

So turns out it's Windows being an amazing person @Gameslinx

Specifically, even with terrain set to high, framerate was being oddly specifically crap. 

Then it dawned on me, I hadn't run the game in true Fullscreen. I rely on Windowed mode (and borderless) for various reasons (streaming primarily). So in fullscreen? Runs fine. Better than fine. 90fps at 5120x1440 with double the draw distance fine.

Windows has this nasty habit of not handling loads properly when running games in windowed mode. This has been an ongoing problem since Windows 8 and still haunts the OS all the way to the latest release of 11. My solution? Give KSP high CPU core priority. Screw you windows. Can now run at my target resolution at Woomerang (it's a real stress test!) at a comfortable framerate while (test) streaming too. It's not ideal but with Windows being a pain with CPU handling (and Parallax is genuinely pretty well optimised, I never doubted that) there isn't much more I can do here.

Edited by Moose
Link to comment
Share on other sites

35 minutes ago, Moose said:

So turns out it's Windows being an amazing person @Gameslinx

Specifically, even with terrain set to high, framerate was being oddly specifically crap. 

Then it dawned on me, I hadn't run the game in true Fullscreen. I rely on Windowed mode (and borderless) for various reasons (streaming primarily). So in fullscreen? Runs fine. Better than fine. 90fps at 5120x1440 with double the draw distance fine.

Windows has this nasty habit of not handling loads properly when running games in windowed mode. This has been an ongoing problem since Windows 8 and still haunts the OS all the way to the latest release of 11. My solution? Give KSP high CPU core priority. Screw you windows. Can now run at my target resolution at Woomerang (it's a real stress test!) at a comfortable framerate while (test) streaming too. It's not ideal but with Windows being a pain with CPU handling (and Parallax is genuinely pretty well optimised, I never doubted that) there isn't much more I can do here.

If you have doubled the draw distance, I recommend halving the LOD distance. Increasing the scatter range also pushes out the range at which LODs change because it's percentage-based internally. This should benefit a pretty significant performance boost if your GPU is being maxed out. That being said, I don't think a 4090 will struggle with the GPU side of Parallax at all, lol.

Glad you got it sorted. Yeah, fullscreen all the way. It is criminal how badly Windows handles borderless/windowed modes. Glad you got it sorted and let me know if you encounter any issues down the line :) 

Link to comment
Share on other sites

47 minutes ago, Gameslinx said:

That being said, I don't think a 4090 will struggle with the GPU side of Parallax at all, lol.

I promise you that doubling the range barely touches it :P

I agree with you with how Windows handles anything outside of fullscreen. Unfortunate penalty we have to live with.

Link to comment
Share on other sites

On 9/20/2020 at 7:22 PM, Gameslinx said:

 

68747470733a2f2f692e696d6775722e636f6d2f

ryuQJUV.png

Parallax

Parallax completely recreates the surfaces of the planets, from the environment all the way down to the terrain detail. It combines a tessellation and displacement terrain shader as well as a completely new scatter system to vastly improve the planet surfaces. Parallax uses GPU instancing for surface objects in order to render massive amounts of geometry at amazing performance.

See Installation Instructions below. Also see the Troubleshooting section below, and direct users here if things are not working!

Watch the new trailer here:

Features Overview

Parallax completely replaces the terrain shader used in the normal game as well as its scatter system for placing thousands of objects over great distances. Here are some of the key features of this mod:

  • High quality terrain tessellation shader, like in No Man's Sky
  • Trees, grass and many other types of foliage
  • Procedural rocks and objects
  • Collisions with surface objects
  • Self shadowing
  • Completely new planetary surface textures

Improvements

ivygYOs.png

The shader that Squad uses for Kerbal Space Program's terrain is extremely limited. Parallax's original feature was a brand new terrain shader, but the scope has expanded to surface objects as well.

Parallax improves upon the stock shader in a number of ways, for example:

  • Normal mapped lighting is accurate and faces the right way on a surface at any angle
  • Tessellation allows surfaces to have much more complexity, allowing for the creation of lifelike planet surfaces
  • No lines/artifacts, unlike the stock shader

The scatter system is also a massive improvement over Squad's implementation:

  • Millions of objects can be generated almost instantly using compute shaders
  • Each object is drawn using GPU instancing, meaning there are significantly less draw calls. This improves rendering performance massively
  • Frustum culling for each object
  • Objects are collideable
  • On-demand loading

Availability

OjlJ7kH.png

System Requirements:

Minimum - Scatters disabled:

  • CPU: Parallax does not have much of a CPU impact, so this isn't really a concern
  • GPU: Must support shader model 3.0,
  • RAM: 4GB (With scatter objects disabled)

Minimum - Scatters enabled

  • GPU: Must support shader model 5.0
  • Renderer: Recommended to use DX11, but OpenGL is supported. Due to limitations, Mac OSX is not supported since Apple dropped support for OpenGL. Linux works running OpenGL.
    • Must support Async GPU Readback (if you do not know what this is, do not worry)
  • RAM: 6GB

Recommended:

  • GPU: DirectX 11, Shader Model 5.0
  • RAM: 8GB

You can follow Parallax's development here: https://github.com/Gameslinx/Tessellation/

Installation

Instructions for installing Parallax and its scatters:

  1. Download Parallax, Parallax_StockTextures and Parallax_ScatterTextures from the GitHub release page.
  2. Download and install Kopernicus. Minimum version release 139 or later.
  3. Open the Parallax zip and move the Parallax Folder to GameData.
  4. Open the Parallax_StockTextures zip and move the Parallax_StockTextures folder to GameData.
  5. Open the Parallax_ScatterTextures.zip and move the Parallax_StockTextures folder to GameData, merging it with the existing folder. Yes, they are named the same. This is intentional. Do not miss this step.
  6. Launch the game, and set your terrain quality to High. Set your terrain shader quality to High or Ultra. Ultra will enable tessellation.

Optional: This patch will disable the bubbles / life on Eve: https://drive.google.com/file/d/16-nTUbRgQescq4ajQtka1cJnaOzPcgPy/view

Need a video? Check below

  Reveal hidden contents

 

Troubleshooting

Did installation not go as planned? Expand this spoiler to see common errors when installing and how to resolve them.

  Reveal hidden contents

I'm getting a Kopernicus error on the main menu!

  Reveal hidden contents

You have likely failed to install the two textures folders correctly. You must merge the two Parallax_StockTextures folders from both zip files into GameData. Once you've done this, the Parallax_StockTextures folder in GameData should look like this:

BZo1Oy1.png

I'm getting an infinite loading screen - the planets in the bottom right corner are moving freely and nothing is happening!

  Reveal hidden contents

This is usually due to a bad Kopernicus install, but in some cases can be due to a bad KSP install.

  • First, try reinstalling Kopernicus. You need version 139 or later, and must also have the Harmony folder in GameData.
  • If that doesn't work, reinstall KSP 1.12.3. Some files may have become corrupted or changed over time after previous mods. This is the best way to ensure the mod runs.

There are no trees or grass in the Space Center view!

  Reveal hidden contents

This is intentional. Right now, scatters don't work in the space center view, and I've not yet figured out how to get them to show.

You will see trees and grass in Flight.

Performance is really bad, my FPS has tanked!

  Reveal hidden contents

This has been reported to help massively boost framerates, and I advise you share these steps with anyone suffering from the same problem. These are the settings I use to ensure the game runs smoothly:

Step 1 - Update your NVIDIA graphics drivers

Step 2 - Replace the settings.cfg in your Kerbal Space Program folder with this: https://mega.nz/file/JEEgTZ5a#BDhp8Vm8WvcbYd3lO2VCIg_3_8xr1I4ns8-He8pQ_PY

Step 3 - Use these NVIDIA settings:

  • Right click on your desktop
  • If on Windows 11, choose "show more options", otherwise see next step
  • Click "NVIDIA Control Panel",
  • Click "Manage 3D Settings".
  • Click on the "Program Settings" tab
  • Find, or add, the KSP_x64.exe in your Kerbal Space Program folder
  • Use the following settings. Not all of these settings will appear for you, but that is fine

 rSKeh3q.png

I'm seeing weird flashing artifacts that look like Z-fighting on the ground, how do I fix that?

  Reveal hidden contents

There are two things that cause this.

  1. City lights are not compatible with Parallax at the moment. Delete the city lights config from the visual pack that provides them.
  2. If city lights are not causing this, Scatterer might. In the scatterer config, make sure "merge depth pre pass" is set to false. If this does not fix it, a reinstall of Scatterer will.

I have a planet mod installed, but Parallax isn't working and/or I'm getting a Kopernicus error on the main menu!

  Reveal hidden contents

If this planet mod supports Parallax 1.3.1, it will not support Parallax 2.0.0.

You will need to remove the Parallax configs for those planet mods until they are updated.

 

FAQ

x9il9dR.png

Right now, there are a few frequently asked questions. I hope I can answer some of them here:

  1. What is the performance impact?
    • You can expect to run Parallax fairly well on a GT 960M or better.
  2. Is this for stock?
    • Yes! This also works on planet mods that support it.
  3. Why are lots of lights laggy?
    • For some reason, KSP uses Unity's "Forward Rendering" path instead of the "Deferred Rendering" path. This means that for every pixel light in the scene, the tessellation is re-calculated. With lots of lights, this can add up very quickly. Until KSP moves to the Deferred rendering path, there is nothing I can do about this.
  4. Do I need a NASA Supercomputer?
    • No
  5. Does this work with EVE and Scatterer?
    • Yes. Parallax was developed alongside Scatterer, so I recommend for the best results you use them both together.
  6. Can I change the settings?
    • There is a config within the GameData/Parallax folder. This controls the quality of the terrain shader as well as options for the scatter system
  7. Will you release documentation for modders?
    • Yes, documentation is in the works and will be updated frequently on the github wiki.
  8. Does this work with Rescale / Sigma Dimensions?
    • Yes, but check for configs as some values must be adjusted for things to look correct.
  9. Can I use textures from Parallax_StockTextures in my own configs?
    • While the license does allow you to use them, I would much prefer if you don't. The stock textures are to improve the stock game. I don't want to see loads of config packs using those textures because it takes away the uniqueness of the ones I created for the stock planets. Please - Don't be lazy, make your own.

Download

2k4WTZy.png

You can download Parallax for KSP 1.12.x here:

If you are reporting a bug, if applicable, please let me know the steps to reproduce the error. This is extremely useful.

Donations

igK0JkV.png

If you would like to donate to show thanks for the mod or to support its development, there is a link to my Patreon below. You unlock some cool perks by donating too!

Donations are by no means asked for, but are greatly appreciated. Thank you for downloading the mod or if you're a long time supporter, thank you for sticking with it throughout its development :)

 Patreon Logo by laprasking on DeviantArt

Licensing

HzBCiSJ.png

Parallax is licensed under Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).

This means that you are free to share, copy and redistribute the material in any medium or format under the following conditions:

  1. Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  2. NonCommercial — You may not use the material for commercial purposes.
  3. NoDerivatives — If you remix, transform, or build upon the material, you may not distribute the modified material.

From: https://creativecommons.org/licenses/by-nc-nd/4.0

I am wondering can i run Parallax 2.0 on this specs:

i3-3110M 2.4GHz

RAM 4GB

GeForce GT 620M

 

Link to comment
Share on other sites

First: love this mod.  It's a must-have for me now.

Second: may have discovered a minor bug.  Couldn't find it mentioned anywhere, so if you're already aware, apologies.

If you crash a rocket into the VAB just after takeoff (for testing purposes, I swear), the ground scatter suddenly gets redrawn at the height of the rocket when it crashed.  See images here: https://imgur.com/4eI0Z4Q and here: https://imgur.com/4vcdZLZ

Both images are from a 1.12.3 install, 2nd image with only Parallax (and its dependencies) installed.

KSP log

Player log

This is a very minor bug, easily lived with, but thought you'd like to know, regardless.

Edited by wreckreation
update imgur url
Link to comment
Share on other sites

21 minutes ago, wreckreation said:

First: love this mod.  It's a must-have for me now.

Second: may have discovered a minor bug.  Couldn't find it mentioned anywhere, so if you're already aware, apologies.

If you crash a rocket into the VAB just after takeoff (for testing purposes, I swear), the ground scatter suddenly gets redrawn at the height of the rocket when it crashed.  See images here: https://imgur.com/4eI0Z4Q and here: https://imgur.com/4vcdZLZ

Both images are from a 1.12.3 install, 2nd image with only Parallax (and its dependencies) installed.

KSP log

Player log

This is a very minor bug, easily lived with, but thought you'd like to know, regardless.

Thanks for this, there are a few other cases why this happens:

  • Ship is destroyed
  • C pressed when there is no crew, or Kerbals are in a command seat and have no IVA
  • The key to switch vessels is pressed when there are no nearby crafts

This all happens because internally the Terrain Shader Offset parameter that is influenced by the floating origin resetting to the vessel origin after ~6km is changed when these conditions occur. In my code I catch all of the cases and regenerate the scatters when it happens except for the above 3 cases.

Sadly it's not so easy to catch these last cases, because there is also code that resets this origin every frame and calls the only method that does it. This method does have a useful event I could tie everything to, but the event is called every frame (at times) as well.

really wish that these events that reset the floating origin offset called a separate method which had the same function, since these are edge cases where the origin needs to be recalculated:

  • Camera mode change
  • Vessel switch
  • Kerbal EVA
  • IVA switch
  • Vessel destroyed

But that's the root problem behind this and why I've not put out an update yet - I'd like to get this fixed if possible

Link to comment
Share on other sites

14 hours ago, septemberWaves said:

What kind of skill set is needed to make a Parallax config for a planet pack (specifically for JNSQ)?

I would love to play JNSQ with Parallax. And if I had the knowledge and skills I'd be working on it already. I'm patiently waiting for a good samaritan within the community to do it instead to be honest.

Parallax is so good that at the moment I only contemplate on playing planet packs that have configs for it.

On 11/22/2022 at 4:44 PM, xendelaar said:

Pardon me if this is a dumb question. But I've seen pictures floating about the internet where KSRSS and Parallax are combined. Is it possible for a mere mortal like me to install this wonderful mod as well in my KSRSS  install?

I currently got an install of KSRSS Reborn and it has configs for Parallax 2.0, so I guess if you are using Reborn, it should work.

 

Link to comment
Share on other sites

2 hours ago, Gameslinx said:

Thanks for this, there are a few other cases why this happens:

  • Ship is destroyed
  • C pressed when there is no crew, or Kerbals are in a command seat and have no IVA
  • The key to switch vessels is pressed when there are no nearby crafts

This all happens because internally the Terrain Shader Offset parameter that is influenced by the floating origin resetting to the vessel origin after ~6km is changed when these conditions occur. In my code I catch all of the cases and regenerate the scatters when it happens except for the above 3 cases.

Sadly it's not so easy to catch these last cases, because there is also code that resets this origin every frame and calls the only method that does it. This method does have a useful event I could tie everything to, but the event is called every frame (at times) as well.

really wish that these events that reset the floating origin offset called a separate method which had the same function, since these are edge cases where the origin needs to be recalculated:

  • Camera mode change
  • Vessel switch
  • Kerbal EVA
  • IVA switch
  • Vessel destroyed

But that's the root problem behind this and why I've not put out an update yet - I'd like to get this fixed if possible

Have you looked into Harmony? It’s surprisingly easy to use.

Link to comment
Share on other sites

2 hours ago, Gameslinx said:

Thanks for this, there are a few other cases why this happens:

  • Ship is destroyed
  • C pressed when there is no crew, or Kerbals are in a command seat and have no IVA
  • The key to switch vessels is pressed when there are no nearby crafts

This all happens because internally the Terrain Shader Offset parameter that is influenced by the floating origin resetting to the vessel origin after ~6km is changed when these conditions occur. In my code I catch all of the cases and regenerate the scatters when it happens except for the above 3 cases.

Sadly it's not so easy to catch these last cases, because there is also code that resets this origin every frame and calls the only method that does it. This method does have a useful event I could tie everything to, but the event is called every frame (at times) as well.

really wish that these events that reset the floating origin offset called a separate method which had the same function, since these are edge cases where the origin needs to be recalculated:

  • Camera mode change
  • Vessel switch
  • Kerbal EVA
  • IVA switch
  • Vessel destroyed

But that's the root problem behind this and why I've not put out an update yet - I'd like to get this fixed if possible

No worries, and no hurry.  I'm a (retired) developer, and I know what a headache dealing with edge cases can be.

This is easily lived with, and kind of amusing, actually.  :)

Link to comment
Share on other sites

I have an issue that I've searched the thread for and I'm puzzled how it's been missed so I've probably done something wrong. I have a conflict between this mod and the Field Contracts mod. I don't think this is a log issue but I can provide one if provided.

Specifically, the Cold Ocean biome which I believe this mod applies (I traced it in the config patch) overwrites some of the biome waypoints in Field Contracts. Basically you land in the cold ocean at the contract waypoint and the contract doesn't recognize the "water" biome.

I did some searching but couldn't find anything in either threads but I might have missed something. I can supply the waypoints and I think the same issue may have a knock on effect for Waypoint Manager and ScanSAT if the Cold Ocean biome is new.

Is there an easy way to revert this to the "water" biome?

Thanks the mod and hopefully I've done something stupid and this is easy to fix.

 

Link to comment
Share on other sites

4 hours ago, CaptSmollett said:

I have a conflict between this mod and the Field Contracts mod

It may be that your issue is related to the Contract Configurator BiomeDataDefault.cfg file. This defines the rare data locations for Stock Kerbin. If you install a mod that alters Kerbin's Biomes then this data is out of sync. 

You should be able to get Contract Configurator to  regenerate a valid file for the new biomes by deleting the BiomeDataDefault.cfg and any BiomeData.cfg that may also exist. On a reload of your career save more accurate files will be generated. 

You can read mode details in the is post; 

 

Link to comment
Share on other sites

7 hours ago, JonnyOThan said:

Have you looked into Harmony? It’s surprisingly easy to use.

Yep, I use Harmony for a few things in Parallax. I did try and use it for this at one point, but it turns out this is one of those impossible methods to patch. I can't recall why

Link to comment
Share on other sites

8 hours ago, Caerfinon said:

It may be that your issue is related to the Contract Configurator BiomeDataDefault.cfg file.

Thanks, this did the trick! I was focused on a particular issue and didn't think to check the more generic new biome instructions for Contract Configurator.

I had to return the contract and then restart the game before Field Contracts would restart the contract. It led me to some other spot on Kerbin which did fulfill the contract.

I also checked the new BiomeData.cfg (which I did not have previously) and it properly references the Cold Ocean biome so hopefully that should solve future issues as well.

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