Projecting a Moon on to the Sky Sphere

Hello forums.

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.

Any help would be very much appreciated :slight_smile:

Usually i use a mesh instead

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 :slight_smile:

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 actually managed to fix this aabout a year ago or so.
Forgot to post my solution here but if anyone is interested I can dig it up and post it :slight_smile:

Can you please post your solution? I tried following Thilina_arimac’s video but i get massive stretching if I let it cycle a full day.

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) :wink:

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 :stuck_out_tongue:

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.