Texture Clamp Position XY

How to position a texture over a mesh, using the sun/moon position (vector3) as parameter?
Basicaly I want to put a Moon (texture) on SkyMaterial.

Hey -

A Texture would want to cover the entire mesh that it is applied to, so in order to get it to appear in a specific place you would have to either increase the UV tiling to make the moon small enough for your scene or in the texture you would have to draw your moon to a very specific small scale. In either case, you would have to have a build in opacity / masking system to allow only the moon you want to render. Ultimately though you would have to do some version math to change the absolute coordinates given by the Sun/Moon position to alter the UV position of the moon in your material.

A better, quicker and easier way would be to apply your moon texture to a billboard plane (meaning always camera facing) and in the blueprint use the same math that positions the sun disk on the sky material (vector from the light) to position the moon billboard.

Thank You

Eric Ketchum

Thank you but im using a mix of Mesh/Billboard and texture atlas for diferent phases of moon. Looks realy more natural and let me freedom to show moons even on day just like sometimes happends.

Hey -

A user wanting to do somethign similar with a moon on the Sky Sphere has come up with a solution, UVs on Sky Sphere - Rendering - Epic Developer Community Forums.

I would still recommend placing a billboard and a level of clouds in a particle system to allow for a depth to the background. We doing something very similar in Shooter Game in the Highrise map.

Thank You Again -

Eric Ketchum

On image properties, on Content Editor, check from wrap to clamp. Works For Me.