It´s really awesome! any chances of getting a tutorial of how it works/ how it was made? I´m really interested in getting into godot shaders, this kind of wizardry is really awesome, loved it
Pixel Planet Generator
A showcase of some shader code for Godot game engine. Currently there are 8 types of planets and 3 others available, 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!
- 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:
- 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.
Source on Github: https://github.com/Deep-Fold/PixelPlanets
Available under MIT license. Credit is appreciated, but not required.
Click download now to get access to the following files:
Log in with itch.io to leave a comment.
Love it! I'm making a space RPG and it's perfect for it. Thank you!
This is perfect for my new project, thank you for the creation. :)
I love It! It's super cool, it's amazing!
You are a wild person, this looks unbelievable!
I was so impressed by this, that I was showing it all my Game-Dev friends :D. You are a god at writing shaders, I wouldn't even be able to draw circles with a shader. Keep it up, good work! :)))))
Thanks! Hope your friends liked it also. I get you on the shaders haha, took me a while before I really understood how to write them. Glad you enjoy!
Hi, I am a student, and i wanted to use this and the space background generator, i will fully credit in the beginning of the game and and at the end of the game and also in the presentation, so can you please allow me to use the planets and space background generated by the your itch.io project please. Thank you so much for putting it on GitHub also.
Hey! Yeah you can use it however you want. Good luck with your game and presentation!
Since I can't find a way to private message you, I'm just gonna comment on your most recent comment. Sign up for Patreon, I will subscribe to you for about $10 a month. It ain't much, but I am sure other people would too.
Yeah patreon sounds very interesting, I don't really have anything to consistently post though, would have to think about it. Also If you want to message me there are some contact details on my profile page.
Is there a way to integrate the code (not the generated spritesheet) to run with Game Maker Studio 2?
I don't think so. GMS2 shaders are written very different from these ones, so you would have to rewrite them all.
Hello. This is absolutely amazing. Is it okay if I embed some of your shader code in my game so that I can generate random planets (and others) at runtime, instead of generating huge sprite sheets? If so, I will make sure to credit you.
Hey, glad you like it! And yes that's okay. Post a link or something if you make something with it, would like to see it!
Deep-Fold is it ok if I use some planets that I generated for my RPG, Supernova, so long as I credit you?
on even numbers for circle size there is an extra pixel on the top and left hand side, which is probably a product of the circle generator measuring distance from the top-left of a pixel instead of the center. Although this is likely being generated via a sphere. Great stuff though, really like it!
have a way to integrate this with Game Maker Studio 2 ?
This is so cool.
this is awesome. any chance of a unity port? :D
Hi Deep Fold Nice tool i wanted to ask can you add to export it as a GIF it would be awesome if you could do that...
But it remains the coolest thing i have seen in a while
Hey! Yes that's a cool idea, I'll look into it.
Glad you like it!
Hey, took a bit, but gifs should be working now. hope you like it!
This is SO awesome. I'm very interested in learning this kind of code. You're using Godot's shader language based on GLSL, yes? Do you have any suggestions for resources and/or projects to start learning that?
Also, any plans for including other kinds of stellar objects with slightly different shapes? Stuff like black holes with smaller or different accretion disks, or different planets and/or gas giants with different rings, or even stuff like neutron stars or white dwarfs with polar jets? I'd offer my full support to develop those, but I'm clueless in shaders.
Hi! Glad you like it!
Yeah it's pretty much GLSL with maybe some small differences. For learning that i recommend the book of shaders. Also take a look at this video, it's a bit older but holds up pretty well. If you understand the idea behind shaders it should be pretty easy to convert to godot using this guide.
I do want to add more stuff to the generator at some point. Those are good suggestions, but don't want to riddle it with too many options. I like the polar jet idea, might be coming at some point. And if you make some cool shaders I'll definitely consider adding them!
where is the folder where the images are being exported? can i change it?
On Mac it should be in: "~/Library/Application Support/Godot/PixelPlanets". On Windows it should save in the same folder where the program is located.
You currently can't change where it's exported to,
it looks verrry nice can i put those in my game?
This is super awesome! Just found a bug in the web build though, when you try to input a seed that is longer than the ones the program creates, it stretches the ui past the limit of the window and you can't use all of it.
Glad you like! Thanks for the bug report, I'll post an update somewhere this weekend for a bug fix.
Man this is so cool! is it fine if i use this in my game? ill credit you for sure
So this generator works only with dither, eliminating 75 percent of use cases. It would be amazing if you could do this without the dither .
Well I don't know about 75%, but sure, I'll add an option to remove the dither.
Hey! Should be possible to remove the dither now, hope you enjoy!
Wow this is awesome, I want to thank you for this generator, I'm using it for my astronomy school project. I just wanted to suggest you to add a "moon" option that adds an orbiting object on the planets.
Glad you like it, sounds like a really cool project!
Thanks for the suggestion, but I don't really want to add that, doesn't quite fit with the rest of the generator. I'm not sure what program you are using, can you not add an animation of something orbiting in that?
Holy smokes this looks awesome!
Hey Deep - Just wanted to update you on my progress. I took your shader code and mutated it horrifically and made my own thing.
Later in the week I'll be releasing a video and some code.
Honestly the Pixel Planet Generator was a gigantic inspiration. These shaders are going to go into a game I been writing for the last 3 months.
Hey. Those look amazing, thanks for the link! Glad I could inspire you, I think you should be very proud of what you've made.
For some of the listings like the Gas Giant 2 and some other like stars its showing as a square. But coolest project nevertheless
Ah, that pesky bug keeps creeping up on me. Should be fixed for those 2 now, let me know if something is still broken though.
any way to get the rotation png? or do you eport it a bunch of times at different rotations?
im new to this.
Hi. With "rotation png" do you mean a single image of a rotated planet? In that case you can just change the rotation slider and under export click "png".
If you want a animation of the rotation you can instead choose "spritesheet" and it will automatically generate a spritesheet with the animation for a single entire rotation. You then have to use a game engine or some other tool to splice the sheet and display it as an animation.
Hope that helps!
Really enjoying your planet/space generators. May I ask if it's possible to support importing colour palettes, such as from the website; https://lospec.com/palette-list
Supporting palettes would help speed up development when by matching colours between the planet and space generator, plus the game engine.
Glad you like it! Importing palettes could be possible, but not sure what that would look like. Would it select some colors from the palette and apply those to the colors for that planet? I don't think that would look good.
I do like the idea, just gonna have to think of how to execute it. Thanks for the feedback!
Thanks for considering! I'd say, if you were to execute palette import, the .HEX format looks super straight forward, as it's simply colour hex codes separated by a line break. I guess you could set a hard limit of the first dozen colours (or 9 for Space Gen, and 10 for Planet Gen - or perhaps standardise the two?)
Thanks again, such a cool app.
Oh this is awesome!
A random button for the pallet would be really nice addition :3
so cool though. i'm loving all the generators you've made <3
Thanks! Random palettes would be really cool, just gonna have to figure out how to make them look good.
Glad you like all the generators, I like making em.
Perhaps you could get some inspiration from the coolors.co tool? I'm sure some research around there might help with that! Or even creating some base palettes like a list of 10-20 to randomly pick from.
Ah thanks for the link, it's some good inspiration, unfortunately I don't think they explain how they generated those colors. I do have a decent way of generating colors and that should be implemented fairly soon. Expect an update somewhere in the weekend I think.
Thanks for sharing.😁
Thats so cool!!!! Thank you!!!
I absolutely love this! This is such a handy tool! Great work!
Thank you, glad you like it! Glad you could pick up some stuff from the code. Your project is really nice, left a comment there also.
I was just wondering if I could use this for commercial use and what the default fps is. This is totally awesome
In his source code it says that it's available for commercial use.
Yep as llimpopo says, it's available under the MIT license, so just use however you want.
Default fps is 60fps, but if you update the time variable at a different interval, the shader fps will change.
Very cool. I am working on a solar system generator and I am using this as the visuals. It would be cool if you added some more things though. Like black holes, neutron stars, etc.
Cool to hear! Nice suggestions, I do want to add some more types at some point, but might be a while though.
Fantastic and buttyfull. Someone found seed for earth ?? ;)
This is really awesome! Great work! I do have a suggestion, not sure how hard the feature would be to implement. An undo button, with the ability to undo a few times.
Thanks for the suggestion. Do you mean undo some color changes? Or undo the seed generation? Never really did a feature like that so no idea how hard that would be.
I meant color changes, but seed generation would be neat too. Or maybe a button to revert to the original color palette, if that would be easier to implement than color undo. I was playing with the color a bit on some planets last night and thought it would be a useful feature to suggest.
Yeah, it would be a useful feature. Might implement it maybe at some point but probably not for now, thanks for the suggestion though.
For now if you want to go to the original palette you can refresh the page and it should be reverted.