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.
asked Aug 06 '14 at 08:45 PM in Rendering
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.
answered Aug 07 '14 at 12:11 AM
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?
answered Aug 06 '14 at 09:56 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here