Pixel Planet Generator
About
A showcase of some shader code for Godot game engine. Currently there are 8 types of planets, also generates black holes, galaxies, stars and asteroids. Each type has a lot of possible variations. Also allows you to export any planets you like in either a png , gif or a spritesheet.
Drag your mouse around the planet to change the lighting.
If you want to use this for yourself you can download the source for the shader code. Lots more options for variations are available in the source.
This project is completely free to use and will stay free, but donations are very appreciated, thanks!
FAQ
- Q: Can i use this in my game, tutorial, project, etc. ?
- A: Yes, it's completely free, use it however you want. Credit is appreciated but not required.
- Q: Is this available in Unity, etc?
- A: The only official version is this one, but here are some ports other people have made:
- Monogame: MonoGame-Pixel-Planets by EnthusiastGuy
- Unity: UniPixelPlanet by hmc
- Defold: defold-pixel-planets by selimanac
- Q: On the downloadable version, where do I find the exported files?
- A: On Windows and Linux, in the same folder the program is. On MacOS under "
~/Library/ApplicationSupport/Godot/
- Q: How do I use spritesheets?
- A: Determine how many frames you want for an entire rotation. Set this amount of frames for the width (or height). If this exceeds the file width limit, try increasing the other dimension (width/height) for more frames. And of course whatever tool you use to display animations has to support spritesheets.
- Q: How do I use color import / export
- A: Paste in a list of html color codes separated by newlines. Keep in mind that using the copy/paste from clipboard requires browser permissions. Also clipboard access seems to be disabled in firefox.
- Feel free to ask me anything if something isn't clear, cheers!
Source
Source on Github: https://github.com/Deep-Fold/PixelPlanets
Available under MIT license. Credit is appreciated, but not required.
Download
Click download now to get access to the following files:
Development log
- Update to Godot 4Mar 29, 2024
- color importing & exportingMar 18, 2023
- Layers!Jul 10, 2022
- Quality of life stuffFeb 27, 2022
- Galaxies & More PixelsDec 24, 2021
- GIF ExportsSep 07, 2021
- Dither togglingJul 03, 2021
- Random color palettesJun 06, 2021
Comments
Log in with itch.io to leave a comment.
EDIT: Just noticed the dev logs - will look at those :)
seriously impressive work - I wanted to try do something similar but find dealing with shaders very difficult - don't suppose you have any advice on learning what's required to do something like this?
I'm an engineer so understand the fundamentals just cannae ken shaders
Thanks for these! they are great!
This is awesome. Using it for the Indie Galactic Space Jam 2024.
Nice, glad you like it and well done on making a game!
This is so cool, i wish i had a use for it haha
Haha, glad you enjoy. Just enjoying looking at it is also a good use
I call this planet Oeie :>
add more galaxy shapes!
Any suggestions? You can also adjust a lot more of the shapes and properties of planets and galaxies by using the source in godot.
I used it to make a few planets for my menu: https://iamsul.itch.io/starshooter
Its freaking awesome thanks!
Wow, amazing game! I love the retro look and feel of it, and a lot of fun to play also. Awesome job!
Looks amazing! Would you mind sharing some technical details? Is it using geometry? What procedural generation techniques did you use?
Thanks! This is using only a fragment/pixel shader to generate the planets, using a form of fractal brownian motion to generate noise.
I made a post on reddit some time ago that goes into a lot more detail in how the generator is built up, which you can find here: https://www.reddit.com/r/godot/comments/mobhb5
Unreal! Absolutely love it. Plans to make similar generators in the future?
Thank you! Glad you like it. I have some ideas for other generators but just need to find some time to actually make those.
this is so sick. great job
Thank you, glad you like it
i wanna see custom made moons n stuff
Thank for the suggestion, but this program is really about procedural generation. There's almost certain a lot of custom moon and other planet sprites on itch and other sites
This is one of the coolest art generation tools I've come across. Will definitely be using this and citing you in my spaceship building game!
Awesome, glad you like it and would love to see what you can do with it!
Hey, it’s a really cool tool you’ve created! What’s the license for the generated sprites? Am I allowed to use them in a complete game template and sell it on a marketplace like the Unity Asset Store? I’ll make sure to give proper credit if needed. Thanks!
Thank you, glad you like it. You own the sprites you generate, so feel free to do with that as you wish. Credit would definitely be appreciated if you want, and thank you for asking permission!
Thank you so much for clarifying! I really appreciate it. I’ll definitely give credit to you in the template to show my appreciation for the awesome tool. Thanks again for your work and for being so open about usage!
Hey, I made a game using your generator.
It's called Dr.Planet :D
Thank you, this helped a lot.
Awesome! Nice job on creating a game and getting it on Steam! Hope the launch is doing well and thanks for sharing.
Nice, can you make our Solar System as a pack with this exact theme?
Thanks, I'm not really planning on making a pack out of this, but feel free to generate whatever solar system stuff you need.
Aww, though I wanted a nice Venus, Earth, Mars, Jupiter & Saturn, Uranus & Neptune :( I’m also making a game, 2D Space Engine. Bye :D
Oh, that sounds awesome! Would love to see that at some point
Can u make a port for Game Maker Studio 2 ??? Please
Thanks for the interest, but I don't know game maker studio at all, so that would be way too much work for me.
what i've been doing is downloading the png and importing into gamemaker. btw absolutely amazing program Deep-Fold, this has been a literal lifesaver for my project and you are going at the top of my credits.
Awesome to hear! Glad it's useful and hope you can make something nice with it.
id love to see a randomize all button which randomizes the colors, planet type, seed, and rotation. also where the rings can be their own color too. the game so far is amazing and id love to see more of it.
Love this, it's delightful!
I thought you should know there's a bug when you export the black hole as a spritesheet or gif here on itch. The accretion disk wobbles back and forth for some reason when the frames are assembled. The hole is stationary completely but the accretion disk wobbles about some invisible axis.
Thank you!
The wobbling is something I intentionally left in the code at some point for some reason, but now that I look at it again, it looks a little silly. Thanks for mentioning, I'll probably remove it in a future update.
No problem! Once again, thank you for this amazing tool!
Can I export the planet as an HTML file and still keep its rotating effects?
I'm not sure what you mean exactly? A html file is just some text, while the exports only export as some image.
This is an amazing tool! I will be using this for some game assets and will make sure to include credit. Thank you!
Glad you like it! I hope it comes in useful, and thanks for the credit!
This is perfect for my space game project, I was wondering if there was a way to change or remove the light focus/direction on the planets.
Awesome, glad it's useful! If you're on desktop you can change the light direction simply by holding down the mouse and moving the light where you want it.
Damn, this is cool as hell, it would be nice if there was a setting with Earth in it though
Yeah lots of people have asked for earth already lol. I don't know if there is a seed out there that makes it look really earth-like, but I'm don't really plan on adding an earth shaped planet myself.
Super cool Asset!
Thank you!
One of the most amazing tools on the site! Absolutely love this and the Space Background generator. I've used some images from them in my latest jam game, and it couldn't be easier with the way you set it up. Really fantastic work, thank you very much for putting it out there for everyone.
Thank you! Nice job on making a game in such a short time, good luck in the votings!
Great tool, I'd love a way to change the rings on gas giant 2, or just add rings to different planets either way
Thanks! Yeah, that's a good suggestion, I'll probably add it in the next version.
Hi :) Love this. I found it a year ago and keep coming back to mess around with it. I was just wondering if this can apply a texture onto a sphere or is it only for 2d?
Hi, glad you like it. It's purely a 2d project, so no 3d stuff unfortunately.
how do i find where i exported it. spritesheet wise
On the web it should just go to your downloads, if you use the downloaded program it should be in the same folder as the program.
Hey Deep-Fold, awesome, awesome tool!
It gives me inpiration to work on a game, and I'm reusing your planet scenes directly from a fork of your github repo, as I love the flexibility compared to just using sprite sheets. Thank you for sharing!
Your code is very clean, and it's easy to just instanciate a planet and benefit from its methods; but I noticed a thing that annoyed me: I don't know if it is intentional or not but Asteroid scene and NotAtmosphere scene have a 'custom_minimum_size' of (100,100) instead of (0,0) for the other scenes. No impact on your tool, but for people trying to generate several planets on a screen and resize them, it makes it harder to align correctly compared to the other scenes.
Another tiny thing that can help is also to set all shader materials 'local_to_scene' to allow several different planets of the same type on the screen. I did it programmatically (I hate the UI) within the _ready() func of planet.gd with:
'for c in get_children():
c.material.resource_local_to_scene = true'
Anyway, once more: Thank you for this tool, thank you for the github repo, I hope I will be able to share an exciting demo someday with you :)
Hey, thanks for the good suggestions! I'll make sure to have that changed in the next version.
Glad you like the tool, and would love to see what you're able to make with it. Good luck!
Is there any way to generate more frames with higher resolution? Becasuse when i generate less than 60 frames, star rotates way too fast. Is there any feature to generate more frames, maybe by parts?
Do you mean for the spritesheet? At default resolution you can have thousands of frames. But yeah, if the pixel size is very large then the frames are limited by what the engine can handle.
There currently isn't a way to do an export in multiple parts, but if you need a lot of frames in a high resolution, I recommend just using the shaders directly.
Absolutely love this! Just used it for my latest video, and will definitely be coming back!
Nice! Glad the generator was helpful.
Trying to match the amazing aesthetic of the stars your generator can make is tricky, but I'm getting there :) Here's one of them with a ring world!
Wow, your game looks really cool! Love the UI and the ring. Good luck!
Simply wonderful. I kinda wish I was making a space game now :-D
I assume there is now way to make it resemble earth, right? (I mean with the approximate size, location and shape of the continents).
Thank you for sharing this in any case. I absolutely love the look of the planets this tool generates.
Thank you, glad you like it so much! There might be a seed out there that makes it look roughly like earth, although I haven't found it yet, who knows.
This is amazing... thank you for sharing with everyone!
Thank you! You're very welcome.
Hey there :) Wanted to let you know I'm using this for a title I'm working on:
Cosmic Cosmonaut
I will definitely include you in the credit section on release.
Looks awesome, I'll definitely keep an eye on it. Good luck with the release!
Amazing! Something you should add is rotation sliders for all axes, or some way to rotate the planet in the gif the same way the "rotation" slider works in the editor. Overall this is really cool and ill be using it and the space background generator for a game mod im working on.
Thank you! And thanks for the suggestions. I can't really implement a rotation for all axes because this is just a 2d image simulating a planet. But rotating the image like that in an animation should be doable, I'll consider adding that.
Good luck on the mod! Would love to see it when it's done.
This is awesome! Will definitely be using this. One oddity I noticed is the No Atmosphere planet has a random square on it. Any chance that could be fixed?
Thank you! Glad you enjoy. I don't see any random squares on the no atmosphere planet myself, but I might know what causes it.
Unfortunately I updated the app to Godot 4.x some time ago, but their web exports are a little broken right now, so I can't update it until they fix that. But once that is fixed, I'll definitely try and tackle that bug.
This is EXACTLY what I need for my up coming space game. Thank you! this is an amazing tool
Awesome, you're very welcome! Would love to see what you're able to make with it.
https://microstudio.io/SynKrown/darkmatter/MWFZFY9H/
if the link works for you, I am working on an open world space game. Still in very early stages, but the planet generator has already come in very handy for the planets in the overworld. The planets have a gravity pull to make the travel around the overworld more interesting
Looks nice! I always love those open world type space games, so pretty excited to see where it goes. I'll definitely keep an eye out.
So great! 🤩
I do have some Features you could potentially add:
Thank you!
The gif and spritesheet export does actually record a full rotation of the planet.
And I'm not really sure what you mean by population. Just a number, or something visual?
City lights would be great
I used it for my game, that is in it's early stages now
https://sossinaydev.github.io/games/starforge
(The website is ugly ik)
And also for Starfleet commander
Awesome, good luck with the game! I'll look into how doable some city light planet is.
idk why do you need a login screen on your game menu, bro!
It's multiplayer, some cyber security is needed...
This is Amazing ! And for Godot!
Thank you, glad you like it!
Do you plan on doing an update for RPG Maker MV or MZ?
Hey, I currently have no plans for anything like that.
Ok, just asking. I'll try to make it work it out some way.
No worries, hope it works out!
It did, I just had to pick how many frames would fit in the game, and also I used your space background generator also. HUGE THANKS to you, because I really did need something for a beginning scene and the space background really came in handy. I will for sure credit you and let you know when the project is done so you can check it out if your interested in looking at a few stuff I used from you.
Awesome! Glad it all worked out. Looking forward to seeing your game when it's all done! Definitely share a link here or something.