Hacker News new | past | comments | ask | show | jobs | submit login
Realtime Planet Shader: Interactive 3D planet animation (jsulpis.github.io)
277 points by rossant on Nov 21, 2023 | hide | past | favorite | 39 comments



Very nice work. I feel the atmospherical light bounce is way too strong on bodies that don't have atmospheres.

Also the lighting could have better default, with the sun intensity cranked up and the shadow side almost pitch black, as well as the universe darker (if we assume being blinded by the sun reflection.

I've done a few of these in my time, I've never had such as nice detail on the surfaces, it's very well done.

I would suggest also a default where the orbiting camera would in fact move (in all axises), at the moment it's pegged to the sun and perfectly aligned to the equator, which is not as realistic as the rendering quality!

Of course that would involve the programmer to have to render the sun too, as it would come in and out of the background.


I’d second the point about atmospheres. Was most apparent to me on the moon but now I’m really curious to see Jupiter with 0 atmospherical lighting.

Incredible work! The game developer in me now wants to see you slowly create a game around this. Really impressive how light weight this is.


There are controls to increase/decrease the atmospheric density as well as sunlight and reflection intensity.


The angle of the lighting is also odd, from the upper right at a higher latitude than the sun would be for Earth (or Mars, for that matter). It's a bit strange to have the same artificial lighting for Venus without an atmosphere, too.


> Also the lighting could have better default

Space requires better dynamic range than human eyes can provide.


The sun intensity makes the planet look weirdly blurry to me. Is that how it normally is? Is that how it's supposed to be? Dropping the sun intensity to 0 made it look more crisp, which is the way I like it.


Without HDR you very quickly oversaturate as th light intensity increases. Space rendering without HDR and tonemapping is pretty rough.


Impressive work. How did you generate the clouds and terrain, Perlin noise?


Wondering too. It does look like it though. It has that noisyness / fuzziness that makes it sometimes a bit too random compared to earth continents. I found that it works best for earth like map simulations (with water basically) when combined with some terrain physics (moving plaques of random sizes and other geological elements) to generate the high level details, and Perlin on top for the natural noisiness. For other planets though it does great.


Perlin noise (with octaves) can generate quite natural looking terrain height maps. But it doesn't simulate natural processes such as wind and water erosion and plate techtonics. For example, plate techtonics tends to create mountains ranges in lines (such as the Himalayas and the Atlantic mid-ocean ridge) rather than completely randomly. So I guess that is going to limit just how natural it can look, especially over the scales that these natural processes operate.


I've done something similar in my Zero Gravity game (long time iOS project), where I had astronauts engaged in rag roll kung fu in space, with a GLSL earth in the background with day/night cycles. Just like Star Wars has sound in space, my game (as well as the linked renderer) added ambiant light to see the unlit part of earth. However, there is no ambiant light on the dark side of the moon<-<-<- earth.


I also work on this in my spare time, and this example is pretty great! I’m still always stuck at cubespheres and not being able to create content on the surface.

(You’d be amazed at how complex it is to create planets, and how ungrateful a lot of us are to be confined to just one!)


Expected to see Realtime Planet.. Realtime Shader - but it's only Planet Realtime Shader - the Realtime Planet.. spins to slow to be so nice as this !


>It runs at 60fps on my old low-end phone

guess I really need a new cellphone! this is amazing, I just expected that my cellphone will become hotter and slower, and then confused about why my cellphone still work.


Works on mobile browser too! Usually these type of demos don’t. Nice work.


Looks beautiful


Beautiful, but clouds seem to be missing any cyclonic aspect.


I am guessing the clouds are noise projected on a spherical surface, rotating separately from the planet. It would probably be quite complex to add coriolis force, and also slow things down.


You could have static cyclones with palette shifting to get a good effect.


This is amazing! I wanted to get into 3d graphics programming for web for never really committed to it. Any tips on where to get started?


This looks very nice. One bug (?) I noticed was that if you drag the Clouds slider all the way to 1.0, then the clouds disappear altogether.


For me, the "monitor" control doesn't work (bottom-right corner)

(but *beautiful work* OP)


It works great on Android Firefox, but... no zoom?


Venus in visible light could have been a fun joke.


Looks good, though a bit two dimensional. Is it possible to use displacement or normal mapping versus bump mapping in a browser?


Doesn't render for me on Safari, does on Chrome (MacOS).


Works for me, on Monterey and an x86 Mac Mini.


Works for me in Safari.


Is it me, or the star sky background is mirrored?


Generally very nice, but for me the planetary texture looks doubled, everything is a bit blurry and it seems as if the texture is there twice, a bit offset against each other. Edge Win10 64.


Try reducing the sun intensity to 0. That's what worked for me as I noted in a comment above:

> The sun intensity makes the planet look weirdly blurry to me. Is that how it normally is? Is that how it's supposed to be? Dropping the sun intensity to 0 made it look more crisp, which is the way I like it.


Same here. If you flick the sun light on and off, much of the surface shifts several pixels.


same issue on chrome 119 linux


Pretty, seems to run efficiently in the browser.


With the atmo removed should Mars be that red?


Mars's atmosphere has nothing to do with its color. It's red because the dirt/rocks are red. The atmosphere is so thin that, except when it kicks up dust, it has little to no effect on the planet appearance (in visible light).


Now add Pluto.


No longer a planet!


Well done!




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: