Jump to content

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


Gameslinx

Recommended Posts

It's been a few months since I've given an update on Parallax's development, and while there are meaty changes already, they're not all ready to show. I wanted to show off the first in-game testing of a custom shadow implementation I've written for the planets from orbit. Since the main feature of the next Parallax Continued release is an overhaul of the scaled planets, I've been investigating ways to enable shadows in the tracking station and from orbit. Unfortunately it's not as simple as flicking a switch and enabling shadow casting on the sun for the scaled scene so I've implemented simple and cheap raymarched shadows which is what I wanted to show off today :)

You also get to see Minmus' remastered look in-game, which completely matches its surface. The transition from scaled to terrain views is much more pleasant now.

 

In the video I'm showing off hard shadows (shadows with a hard edge/cutoff). Soft shadows are in the works, but not quite ready yet. I'm going with a simple technique that approximates soft shadows based on the distance the occluded light ray would have travelled had it reached the surface.

Edited by Gameslinx
Link to comment
Share on other sites

Absolutely amazing!! Really glad to hear soft shadows are possible for a more stylistic experience. I just can't tell you how long this has been on my "wishlist" so I am really, really happy to hear development is making progress. Best of luck, I look forward to supporting the next release!

Link to comment
Share on other sites

On 9/20/2020 at 11:22 AM, Gameslinx said:

 

ryuQJUV.png

Parallax

Parallax is currently undergoing a rewrite.

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.

  Hide 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 :)

 Digital-Patreon-Logo_Black.svg

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 know this doesn't support mac, but I don't see this mentioned anywhere on the page. A little heads up could be nice for those who don't know it doesn't work for the os

Link to comment
Share on other sites

9 hours ago, BeethovenFM said:

When I came back to play, I couldn't update the mod. Can anyone help me?

Have you checked that you don't have another mod that's incompatible with Parallax?  Check the Relationships (Relacionamento) tab.  I'm pretty sure that you need to update Parallax - Stock Planet Textures to v2.0.8.

Edited by Brigadier
Better answer.
Link to comment
Share on other sites

15 hours ago, Brigadier said:

Have you checked that you don't have another mod that's incompatible with Parallax?  Check the Relationships (Relacionamento) tab.  I'm pretty sure that you need to update Parallax - Stock Planet Textures to v2.0.8.

I've always used these two, but a few months ago it started to become incompatible. And I can't install this other mod either, as shown in the image.

If I uninstall the mods, which mods do I need to install to get it working again? And thanks for the answer!

ziTPg3o.png

7eqrOv1.png

 

i7s2bia.png

Edited by BeethovenFM
Link to comment
Share on other sites

What do you see on the Versions tab when you select Parallax?

A possible solution is to completely remove Parallax and associated mods, such as Parallax - Stock xxx stuff, in CKAN.  Then go into GameData and manually delete the Parallax and Parallax_Stock Textures folders.  Restart CKAN and reinstall the latest versions.

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