Code Monkey home page Code Monkey logo

godot_sky_shader's People

Contributors

benjaminnavarro avatar creatcodebuild avatar lexpartizan avatar mjacred avatar sisilicon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

godot_sky_shader's Issues

Feature Request: cloud shadows

Maybe implementing them like the light cookies as used in Unity

Only decal implementation found:
Screen-Space-Decals: https://github.com/Mr-Slurpy/Screen-Space-Decals

In-Engine support for decals might come with Godot 4...

The shadows probably won't have to be 100% accurate, because that's difficult to tell, but they should match with the cloud coverage

Vertical blurred line in middle of screen

On my build I see a vertical blurred line in the middle of the screen. Best visible when it's "night", but also visible during "day". I guess it is a screen tearing issue, because it cuts off the clouds... But VSync on or off makes no difference. I tested your settings of default_env.tres in my own project, but that does not look like the root cause...

blurred_line_in_middle_of_screen

Sounds like this issue, but here is no fast movement necessary and it's only in the build:
https://www.nvidia.com/en-us/geforce/forums/discover/177143/screen-tearing-blurred-line-in-middle-of-screen/

I have a NVIDIA GeForce GTX 970.

Suggestion: Fog color change.

I`m using sky with fog to show better view. So on the end of set_time() function script:

var fogColor = Color(light_color.r,light_color.g,light_color.b,0.1)
env.set_fog_color(fogColor)

This make a nice effect on fog! only problem is in night but i think this is a start.

Anything shadowed looks too black.

Sorry, if the question is a bit “nooby”, but why anything that isn't directly hit by sunlight look too black (not cast shadows that can be turned off in DirectionalLight settings, but own shadows like shadowed sides of CSGBoxes) with PanoramaSky unlike ProceduralSky and how to fix it? Godot 3.5.
Снимок экрана (297)

Снимок экрана (296)

Ease of Use

It would be nice if all variables were exposed in the script on the root node for easier editor use. You could even use setget to make it update in real time when values are changed. If the script has tool at the beginning it will update in the editor as well.
Have you looked at using OpenSimplexNoise instead of a noise texture to make it easier to edit in the editor?
And finally, would it be possible to move the scene, script, and shaders into an addons folder so it can be uploaded to the asset store? The project currently takes a little bit to set up, but it's such a great asset that I feel like it really belongs in the asset store.

Moon rotation

I can make the sun rise and set in a semi-circle (or sine wave) across the sky, for example:

sun_pos = Vector3(-0.5,-1.0,0.0).normalized().rotated(Vector3(-1.0,-0.25,0.0).normalized(),phi)

But when I try to do that with the moon it turns out the rotated vectors:

moon_pos = Vector3(0.0,1.0,0.0).normalized().rotated(Vector3(1.0,0.0,0.0).normalized(),phi)

do not affect the moon in the same manner as the sun.

Adjusting the rotated value seems to affect the "moon phase" (full moon, half moon, etc) dynamically as it moves across the sky. Only it's not the real moon phase, though, it only resembles it somewhat. It just makes the moon become thin and disappear gradually.

Is it a bug or am I misunderstanding something? How can I fix it?

As a side note - I did delete the camera that was in the Sky scene as I could not think of a reason for it being in there. I hope it was not needed.

Dark edges on the Moon

I opened the project in version 3.1.2.stable.mono on Ubuntu 18.04, but Player.tscn is corrupted: "unexpected end of file".
This is probably due to version mismatch of Godot...

Godot 4.0 support ?

Hello @Lexpartizan

First of all, thank you for your time and for your script. It's very good ! Second, i'm french so sorry in advance if my english is not perfect :p

I tried to make it work in Godot 4.0 for two days but couldn't. I don't have any error, but just nothing happen. The CloudlessSky shader and the Clouds shader doesn't seem to do anything for the Sprite2D inside the viewport.

Here what happened when i tried to support the scripts to Godot 4.0 :

First for the Sky.gd :

  1. The extends Spatial now is extends Node3D, it seems simple but seems to have consequences since there's methods which are not accessible anymore.
  2. The new setget syntax has been reworked. Do know why but i had to change how you change the time of day setup (and how you change the hours, minutes and seconds variables) because you have a infinite loop. Doesn't seems to bother Godot 3.4 but 4.0 crash instantaneously.
  3. The lerp method in 3.4 can lerp from a Color to another Color, not anymore. It's from a float to a float. So i found on internet how to create a lerp_color, not sure if it works perfectly (i'm sure it doesn't).
  4. The node Viewport doesn't exist anymore, now it's SubViewport. It seems to work differently ? Maybe that's why my viewport preview seems empty and the whole sky system doesn't work
  5. The Sun_Moon object which were just a DirectionalLight is now DirectionalLight3D and doesn't seems to extends the Spatial node. So when we change the time of day, it seems the methods look_at_from_position does nothing. No rotation of the sun...

The Result :
image

Here the GIST :
https://gist.github.com/RemyCampanals/044fe42ed5c336780d21bc77ca67c0ac

Thanks to have taken the time to read my issue and hope we can find a solution :)
If you prefer to work on a project in the Godot 4.0 environment rather than just the file, i maybe can prepare that for you :)

Change stars size and sky variation of night

I think this is addon amazing. But only thing i will like to change is the night sky stars for me seens unnatural (aspect). There`s a easy way to change size? in some points on sky stars showing more retangular ( - ) than a dot ( . ).

Another thing what i like its a mask for color variation to show something like aurora borealis for example.

This is what i`ll try to acomplishy

Screen night sky

night sky with colors variation

Question: How would I go about implementing this in an Orthographic Projection?

Hi there!
So I've been working on putting together a small 2.5d renderer on Godot, and I've been trying to get this to work in an orthographic projection without any luck (clouds render as weird white stripes). Thing is, I'm not really that great with shader code (as I'm still learning), and if anyone here has any idea of how to fix this, I'd be pretty grateful.

Here's a comparison of how it renders in a perspective scene vs an orthographic scene:
Screenshot 2021-12-21 175349

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.