I’m trying to make a day/night cycle and during the night I want to, of course, have a moon.
For this I decided to modify the sky sphere material and the sky sphere blueprint.
However, I’ve gotten to a point where I’m stuck. The moon texture isn’t projected with a uniform scale across the sky. When it reaches the horizon it starts to stretch something fierce.
Here is a video to illustrate the problem.
And here is a screenshot of the material blueprint.
Thanks for the reply!
This has been suggested to me. However, I want to do it this way to benefit from the built in layers of atmosphere and clouds as well as being able to use real-world distances in the lighting calculations
I found a way to project the moon to existing sky sphere with skybox image node. It works fine with clouds and other existing features of skysphere
Check this video,
yes, as you mentioned, if we use a separate mesh, we can’t get the advantages of the layers like clouds which comes with default skysphere. Therefore, we have to implement the moon inside the sky material. I made a little video to show the process.
I’m actually going to be looking into doing something similar with this. Although, with an added twist and I challenge you all to see if you can do it (Honestly have no idea if I can achieve it, lol)
The idea is this, basically take what you all are attempting to do. However, the moon won’t simply orbit “opposite” of the sun to only appear at night. Instead, it will be calculated for proper moon cycles. Meaning it can occasionally make an appearance during the day, and have cresting, as well.
What makes it complicated is you can’t simply have it’s speed on a 30/1 ratio with the sun because that won’t account for the Earth’s rotation. My thoughts are to determine 3 states; shows during day, night or not at all. Once you determine those 3 states, you can then just pan it through the sky at the proper time and hide it during all other times.
It sounds much easier than it actually will be, I’m sure
If I manage to pull this off, I’ll be sure to post back here showing how its done. Forewarning, it might be awhile as it is far down on my todo list.
Suprised to see this bumped after a year,actually after i post that i was trying to use camera vector to draw the uv coordinate,you can copy the content of the txt file to material editor to see what i did.The calculation could still be optimized,and i only use YAW and PITCH cause that’s only what i need,feel free to change that.