Jump to content

Shaders!


Recommended Posts

IIRC, the lighting model in Unity/KSP has trouble with the distances involved in KSP, making proper shadows and occlusion difficult to implement.

KSP doesn't actually render at the distances it is simulating. What is actually rendered is a shrunk down "scaled space". Celestial bodies are a few hundred metres across and move with the camera. The interplay between the scaled space and everything else is one of the difficulties in making shaders for KSP.

Link to comment
Share on other sites

Can't they just add some simple shaders instead of playing with something more elaborate like occlusion mapping?

For example:

1. Add a proper water instead of just flat texture - flat texture works from an orbital distance, but the closer you get - the worse it becomes. At some distances you can clearly see tiling, which is... horrible. Feels like a cheap game from '90s. It'd basically require 2 shaders - one for distant water (say: 1000m+) which will be basically a flat surface with little bit of mirroring (reflective diffuse?), and another for up-close water.

2. Add some god-rays - cheap, quick, makes game look much better, though it will look unnatural once the ship gets in a low sun orbit. But it'll still be much better than nothing.

3. Add some normal map specular shaders for certain, selected elements of a ship. Most obvious one being solar panels and a glass on electric lights but it'd work with parts covered in a golden foil - for example LV-909 Liquid Fuel Engine. Pure specular shader can also be applied to all of the windows - it'll give you an illusion that they're reflective under certain angles.

Of course - all of these should be purely optional.

Keep in mind that these are just stock shaders included in Unity and ideas for changes that require minimal amount of work.

For something more time-taking they could go for implementing cube maps that would depend on an orbit and based on that - create proper reflective surfaces. Add on top of that normal maps to all of the elements and suddenly KSP would make a huge leap forward in terms of visuals.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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