How to create planet like objects in distance

Is there a way to achieve something like this in HDRP using the default tools:


This one is a screenshot from this asset: Expanse - Volumetric Skies, Clouds, and Atmospheres in HDRP | Particles/Effects | Unity Asset Store

Currently I just a skybox in the space emission channel for PBS sky, but the obvious problem being that I can’t use Realtime Shaders for dynamic effects.

For some reason 3D meshes don’t receive atmospheric scattering results when using PBS sky in unity. This is what it looks like when trying to place an sphere pretty far away:

Any help is really appreciated

Might be overkill but there’s a procedural distant planet sample with shader graph in this repo GitHub - Unity-Technologies/FPSSample: A first person multiplayer shooter example project in Unity it was used on the main menu.

Well, it looks something like this:
7619698--947368--upload_2021-11-1_19-10-16.jpg

7619698--947371--upload_2021-11-1_19-13-13.jpg

7619698--947374--upload_2021-11-1_19-13-25.jpg

It does seem a bit too hacky to me right now, I really there would be a better way to do this though. Because I want to use asset from this: Space Graphics Planets | 3D Sci-Fi | Unity Asset Store and Next-Gen Planets | 3D Sci-Fi | Unity Asset Store
Which won’t be possible if I try using this method. :frowning:

Oh…if you want to use a 3d object how about using custom pass ? you should be able to specify which renderer/layers and inject at which point it will be rendered.

That the atmospheric scattering doesn’t apply to objects is really a big drawback of the PBS…
I really hope that Unity will implement it asap.

However you can kinda hack it in using fog that is as high as the planet’s atmosphere and it’s max distance twice as long.
This is what I was able to achieve;


…using these settings;
7624414--948385--settings.JPG

Fog of that height usually blocks almost all light, but there’s a way to avoid that behavior.
You have to install HDRP’s “Configuration Editable Package”, then navigate to it’s “Runtime” folder and add the following line into “ShaderConfig.cs.hlsl”

#define LIGHT_EVALUATION_NO_HEIGHT_FOG

I hope that helps a bit.
This solution is not really physically correct, but it’s better than nothing. :wink: