UVs on Sky Sphere

So, I’m editing a material attempting to render a moon texture. I’ve found the section of the material that controls the sun disc, and I’m attempting to replace that with a texture. My issue comes with the fact that the sky sphere uses spherical coordinates, so attempts to map a 0,0; 0,1; 1,0; 1,1 box to it (around its origin no less) are meeting with trouble. However, if I leave the UV node blank in the blueprint, the texture renders correctly, but oversized and on the wrong side of the skybox (in fact, both sides of the skybox). The node itself claims that the UVs are set to a constant 0 if not assigned, but this is clearly not the case. I believe I could render this perfectly if I could find out what these default UVs are, but nothing I seem to have access to allows me to find this.

Does anyone know how I could render a texture onto the sky sphere? I already tried using a billboard placed at effectively infinite depth, but the fact that the moon appears in front of the procedurally generated clouds just made it look incredibly odd.

Yes, of course. I’m getting a result rendering, it’s just the positioning on the sky sphere that is a problem, hence my focus on the UV coordinates.

The skysphere is rendering a single material that is the accumulation of all the sky colouring, sun, clouds, cloud colour and your new texture

Are you adding the texture into the rest of the material that is being generated correctly?

Update! I have managed to get a single moon rendering at the right scale using the TexCoords input. However, I can’t seem to position it over the light source. When I do, the image stretches obscenely. I suspect this is to do with the fact that the light source is on the origin of the sphere. It really is rather irritating.

I figured this out! The idea was quite simple. First, I split the TexCoord object into x and y components. Then, treating each separately, I applied a multiplier (a high multiplier scales the texture down), followed by an addition (adding values translates the texture). After that, I combined the results together and clamped the value between 0 and 1. Feeding this vector in as the UV coordinates of a texture sample, I could replace the “Sun color” node with a texture, and it provided the result I wanted. It took a lot of fiddling to make sure it all worked. Part of the problem was that those operation have to be done in order. Previously, I was clamping before translating, which caused a lot of problems later. In that order, though, it should all work just fine.

I should add to this that some of the more recent builds seem to have changed the UV mapping on the sky sphere, such that separating the hemispheres is no longer possible (thus, attempting to draw a planet in the sky will draw another on the opposite side). I fixed this by copying over the old sky sphere mesh, but it is something worth noting.