Planets 1.4.1 Meet new PBR shaders, multiple lights, environment. Amplify Shader Editor support!

** New! UPDATE 1.4 **

Its the biggest so far retouching all majority of its shaders. Meet all new PBR features Unity has to offer, multiple lights, and environment support. Easily customizeable with Amplify Shader Editor.

Planets Update 1.4 in now available

Planets in the Asset Store

Whats new:
• Custom vertex/fragment lighting system removed in favor of Unity’s lighting
• Multiple lights support: Directional, Point. Added Reflection Probe support
• All planet prefabs have been recreated from the ground up using new shader framework
• PRB Surface (Specular) shaders built with Amplify Shader Editor v1.4.5
• Out of the box shader compatibility across all platforms (SM 3.0+)
• Linear Color prefabs (Gamma color prefabs not included)

Screenshots:


Click to reveal more

Key features:
• 38 Ready to use prefabs
• 9 templates: Sun, Moon, Terrestrial, Oceanic, Lava, Ice, Gas, Sandstorm and Thunderstorm
• Up to 4096 texture resolution
• Animated cloud and distortion flow maps
• City lights maps

Planets are naturally wrapped around PBR Specular work-flow available in Unity Editor, and will require Shader Model 3.0+ hardware to run. The update also makes Planets capable running on high-end mobile devices supporting SM 3.0. Sun corona billboards require Soft Particles enabled.

Planets Update 1.4 in now available

Planets in the Asset Store


BE THE FIRST TO KNOW WHATS COMING
Swing by our forum and help us build the community! We also highly encourage you to subscribe to our mailing list for the latest updates and the development progress straight from the farthest corners of the galaxy!

REACH US OUT
Found a bug?
Please submit a case in the Bug Report thread, and we will squash the bug away!

Want to share your thoughts?
We sincerely appreciate your time to give us comments and ideas. There are always things that we could do better. Please share them in the Feedback and Suggestions thread.

Have a question or need help?
For a non-urgent matter, please submit in the Technical Support thread. You can also use our Contact Form to communicate to us directly. We’ll give you a prompt a thorough response.

1 Like

Just picked this up. Wow. I’m replacing all of the planets in my current game with these immediately. So good.

Had a question. I currently have my game structured so that there are a small number of “background” scenes that each contain a skybox, a light source, and some other stuff that’s background specific. The idea is that the sun in each background scene is always in the same position. Specific locations have things like space stations and planets.

I had been using a planet shader with a light component that works similarly to F3DSun where it’s a special light source just for planets. I’ve put in the F3DSun light source into a background scene as a test. The problem is that since the planets are in scenes loaded on top of that, they doesn’t get seen by F3DSun. I can hit the Refresh button in the inspector while the game is running and then it’ll kick in, but I haven’t come up with a way to programmatically do that. I tried putting this in F3DSun:

    void OnLevelWasLoaded()
    {
        Planets = FindObjectsOfType<F3DPlanet>();
    }

…since that’s all the Refresh button in the editor seems to do, but that didn’t work.

Any ideas?

Thanks!

Seems like you are loading additively so the sun is always kept in the scene. Any difference with Unity - Scripting API: Application.LoadLevelAdditiveAsync when you might want to check right after that Debug.Log() call?

public class ExampleClass : MonoBehaviour {
    IEnumerator Start() {
        AsyncOperation async = Application.LoadLevelAdditiveAsync("MyAddLevel");
        yield return async;
        Debug.Log("Loading complete");

        Planets = FindObjectsOfType<F3DPlanet>();
    }
}

Heres a few examples on how to check if the additive / async finished loading:

Looks like the check you are doing with OnLevelWasLoaded fires when the initial level is loaded, but produces no results since the objects still keep loading in the background additively. Anyway, it’s just a guess so let me know if that sample makes any difference for you. Thanks

Thanks for the reply! I’m actually doing a regular synchronous LoadLevelAdditive on the second scene, and it looked like my code was getting executed after everything loaded.

But I went ahead and made my directional lights (with F3DSun children) into prefabs and I’ll just drag those into each individual “foreground” scene. (in fact, I’m rethinking the whole background scene idea anyway) So everything’s working fine with that, with the added benefit that I can now preview the lighting on planets and other objects.

A comment and another question:

  1. On the moon shader, I seem to be getting little “sparkle” rendering artifacts just outside the planet surface.
  2. How important is it to keep the SphereColliders on planets? I’d like to remove those if possible.
  1. Open Assets/FORGE3D/Planets/Shaders/Atmosphere.shader and go to line 30. Replace Cull Off with Cull Back

  2. SphereColliders needed only if you have soft shadows enabled on the sun. So feel free to remove them if you dont use planetary soft shadowing in your game.

Let me know if that helps. Thanks

  1. My atmosphere shader already has “Cull Back” on line 30.
  2. Awesome. I don’t have soft shadows enabled, so I’ve removed those.

Thats interesting. For a moment I thought I forgot to switch the culling but seems like it’s not the case. Removing atmosphere fixes the issue? And could you attach a screenshot of the game view showing the artifacts if possible please? Thanks

Yes, removing the atmosphere removes the artifacts.

I wasn’t able to capture the artifacts in a screenshot. It seems like things have to be moving; my screenshots didn’t catch the right frames.

So I did a very short video. It’s a bit hard to make out, but if you go full screen 1080p and look at just above the moon, you should be able to see them.

Update: I guess it’d help if I included the link:

https://www.youtube.com/watch?v=pVUb3D8L4x4

Thanks for the update. I have reproduced this on my end (http://screencloud.net/v/rLOu notice a few tiny white dots) and the flickering on the edges could be eliminated by lowering Scattering Offset to a negative on the particular atmosphere material. Just in case make sure ZWrite is set to Off in the atmosphere shader on one of the following lines next to Cull Back.

Hmm, I think I’ve already got both of those things like that.

  1. The one I noticed the issue on (from the video) is Moon_06. Its atmosphere uses the AtmosphereMoon_06 material, which has ScatteringOffset set to -2.15 out of the box. Should I try an even lower number?

  2. Looks like I’ve already got “ZWrite Off” two lines below “Cull Back” in Atmosphere.shader.

Yes. Lower it until the dots dissapear. Something between -2.5 to -2.8 should be close enough to keep the glowing edge intact.

What is the scale for the moon you are using? Does it produces the same artifacts in the demo scene? You can try changing the atmosphere material to a different one and see if it helps.

The shader related stuff is just to make sure we got the same code since I changed a few lines on my end after the asset were published.

I tried -2.65 and then -30 and it didn’t seem to make any difference. What I might do is make a copy of Moon_06 that has the atmosphere removed, since it isn’t needed in that case.

The one from the video is scaled to 1200. I have the same moon in another scene scaled to 5000 (it takes up more than the full screen) and the artifacts are not noticeable on that one. It could be because on that one I have a busy and colorful skybox. I did not notice the artifacts on the web player demo scenes. I haven’t run them in Unity; for reason Unity crashes when I try to open them.

I did try swapping out the atmosphere with all of the moon ones and even a few planet ones, but they all had the same artifacts. I could be that the particular one I’m seeing the “sparkles” on is just more noticeable at that scale and against a solid dark area of the skybox. I could try running a build on another machine I suppose.

I was able to snag a screenshot. It’s not nearly as noticeable in a static image as it is in motion with a sparkly effect at random locations along the atmosphere edge.

I’ve tried most of the options that could break it while trying to reproduce the issue but unfortunately with no luck so far.

I would like to ask you to create a new project and add components from you main project to isolate and indentify the issue. Make sure to keep the minimal amount of assets required. For example, a moon, atmosphere, project settings and scene could be enough to start seeing the flickering on the edge. If its not, then keep adding assets until you see the artifact appear. Save and close Unity. Go to your project folder and remove everything except ‘Assets’ and ‘ProjectSettings’. Compress what is left and upload to a private storage so you can provide me a download link via PM.

Also make sure to specify your Unity version and hardware configutation.
Thanks

OK, PM sent. It wasn’t hard to reproduce (on my machine anyway). I’ll try running a build on some other machines to see if it looks any different.

UPDATE: I tried a standalone build on four different Windows machines. The results were the same, except for one that was a little darker. I took screenshots so that I could view them all on the same monitor. I turns out that the big monitor I use as my main display is very bright, which exaggerates the artifacts quite a bit. On other displays, the dots were either hard to see or essentially invisible.

ANOTHER UPDATE: I noticed that in Unity, the artifacts are quite a bit brighter than in the build. So a lot of it is a combination of being brighter in Unity and sitting close to a bright 27" monitor.

Thanks for the update. I have checked both demo and the project you sent and it didnt take long to identify the reason. In your project you are using Forward rendering path with Anti Aliasing set in Quality Settings which in fact produces the artifacts.

Seems like its not the only case as there are more related reports on a similar problem:
http://forum.unity3d.com/threads/fireflies-anti-aliasing.82887/page-2

The solution in your case is to disable AA and use camera based Image Effect Anti-Aliasing Script. This will also allow you to switch to Defferred Lighting and start using HDR.

Huh, I thought I had tried it with AA off. Guess not!

Early on I played with post AA, but it blurred out my detailed skyboxes and my text overlays. If I could figure out a way around that, yeah, I would love to turn on HDR. I’m not sure deferred lighting would buy me much though.

I been playing around with the shader code to see if I can do something about it to make it work with the AA, but unfortunately no progress so far. Hopefully this will change with Unity 5 and I might give it a try with a current beta. Will let you know if things get changed.

OK, thanks for taking a look! It’s actually no big deal. The only place I saw the dots was a place where I wanted a moon with no atmosphere anyway. I’ve plugged 8-10 of the planets into my game so and they look GREAT. I especially love the ones with the animated atmosphere effects (I’m using one of the planets that has the animated effects in addition to storms). Amazing. The planets look so good at every lighting angle.

Planets version 1.1 is now available!

Whats new:
The asset is now Unity 4.6 and 5.0 compatible.

  • New sun shader fixes soft particles issue while running in DirectX 11 mode.
  • Added 3 new sun prefabs and Sun_Example demo scene.
  • Various planet and atmosphere shader improvements to ensure Unity 5.0 compatibility.

Planets version 1.2 is now available!
Whats new in 1.2:

  • This asset is now Unity Free ready!
  • Added gamma color space prefabs for planets and sun.
  • Added gamma color example scenes.
  • Added modified sun shader to be used with gamma color space.
  • The atmosphere offset should no longer break when scaling.