[RELEASED] Planet Generator Shader (With WEBGL Demo)

A shader that creates planets in real time, using physical parameters as inputs. See for yourself in web demo!

PM me if you want to use it, so I could give you a free copy.

WEBGL DEMO

Yeah, i know, i messed up store description. It should be fixed anytime soon. I hope.

2 Likes

Fixed some issues with scaling. Added liquid specularity slider. Added atmospheric emission toggle. Uploaded new version for review. Hope this is enough to bump my own thread

Just wanted to thank you for the big update with gas planets. They look amazing! Love the “flow” slider. And thanks for the ability to toggle sunset. Never had a wishlist come true that fast before!

I noticed that you mentioned you had also made planetary rings. However, I can’t seem find them in the 1.5.2 update. The prefab “Ring” has a purple “missing material”, so maybe something is missing? No worries though, I still have more than enough already.

Here are some screenshots from me playing around in 1.5.2:

Just saw your reply to my review. Thanks for already uploading a fix! I’m in love with this asset :smile:

Oh yeah, i have a thread for this thing! Forgot about that.

Hi, i have an issue with the shader. Here is a picture (the planet is the prefab into the package). Could you help me ?

Sorry, i was away. Does the problem still exist? Can you show me the material in that object? Also, there might be some problems with atmosphere shader if you using orthographic projection.

Hi!

Is there in-built C# API to generate planets based on planet type, seed etc? Think of using this asset in my space theme tbs.

What kind of backgrounds can be generated? Are there animated effects of comets, flares and other space staff?

Thanks in advance!

Backgrounds are just simple cube maps of stars and nebula. It’s just something i came up with at random and decided to include it. You can check my star generator for stars, but other than that you really better off with something that designed with it as its primary feature.
As about API. It’s just a material, you can instantiate planet of a type you want from a prefab and change seed float in the material, using material.SetFloat(“_RandomSeed”,Random.value*100) or something.
If you also want to generate volumetric atmosphere then you just need to clone your object for which you want to create atmosphere and apply atmosphere shader on it.

Ok, thank you! Will play with your asset and integrate it. :slight_smile:

Be sure to show me what you come up with. My planets are used in the Interstellar Space: Genesis, but i think they are going for minimalistic MoO2 approach and they could look better in your project.

Is there a way to get the planets to work with point lights instead of a directional light?

The planets or the atmosphere? Planets should work with point lights. There might be problems with PBR planet shader, so use nonPBR variant if something goes wrong. They look pretty much the same anyway. As for the atmosphere, i submitted updated atmosphere shader that can work with point lights. I’m gonna give it to you. Check your conversations

Nice job on this. Just wanted to know if it’s compatible with Unity 5.5.0? Thanks.

I checked and there seem to be problems with it. I hope i was on time.
Why do you use such old version anyway?

Does this work with 5.6.1f1? Looks awesome would love to try it.

Edit

Tested works perfectly.

Old? Lol. It’s less than a year old. About 9 months, actually… not exactly ancient.

Because I prioritize stability, and many of the premium assets in the asset store have only been confirmed/tested to work through 5.5.0. Most notably Gaia/Gena.

Also, because I loathe Unity’s new subscription model.

well, i created this shader in 5.6 and it still works fine with it, GhulamJewel confirmed it in PMs.
I checked it again in 5.5 and it seems that it works fine but you need to reassign all textures in example materials. I thought there were some problems with shader itself when i tested it for the first time because everything was gray. I will submit the version for 5.5 tomorrow and it should be up soon after that. PM me if you bought it already and i show you which map should be assigned where.

OK, thanks for the reply.

I’m having an issue where the desert planet is showing up as flat black if all there is in the scene is a point light. Create a new scene, drag the desert prefab into it. Looks fine. Create a point light and move it near to it, you can see its effect. Delete the scene’s default directional light, though, and the planet turns perfectly black.