Hi,
I'm working on a scene for my University project and in the project I'm using an edited version of the Skybox that comes as default. The only problem is that I have a moon texture that I would like to apply to the disk and I cannot for the life of me figure out where I need to plug it in. below is a small section of the shader network that controls the colour and the radius of the sun/moon.
The attached pictures should help (a little) but any help with where I can plug it in or screenshots of the required shader connections would be very much appreciated.
Thanks in advance
Paul
Replies
you may also have to play around with the size of your moon (both disk and texture) to get them looking right.
Personally, I'd recommend a different approach than a sphere mask for that though, just import a clamped (make sure you clamp the UV wrap feature in the texture itself.) texture of the moon if you want a texture defined moon, and scale/reposition/brighten it in the shader, rather than do the sphere mask technique.
Depends on your direction though, and what's in there at the moment is certainly working.
The sphere mask is what creates the disk. The light vector is what positions the center of that disk. The disk is in texture space. So what you'll have to do is position the center of your moon texture at the light vector, then scale the moon to the size of the disk created by the sphere mask, then multiply that texture by your intense moon color.
I'll have a better explanation in the morning.
Sleep is needed.
@Oniram: I've tried plugging it into where you have said and it just applies itself to the sky rather than the moon disk.
@ImSlightlyBored: I'll try this but there must be an easier way than changing this whole section of the material network.
@Vailias: I'm very intrigued, I would like to hear more on this
Thanks again.
Paul
However I do have a bright moon texture that follows the light, though it sometimes needs a little adjustment to match the light's position accurately, so it is not suitable for dynamic night/day environments.
These bits in the texture are important, so that the moon doesn't repeat all over the sky, or generate weird artifacts in its mip maps.
For a dynamic textured moon, either a new skybox model (and shader accordingly) will be needed, OR just make a more complex skybox with the clouds as a separate entity from the background, then get the moon in there as a sprite linked to follow a light.
It's clamped in the texture so I don't know what could be causing that. I'm trying to fix it now so I'll shout up if I fix it before anyone replies
thanks again for all your help, case closed!
Glad you got it working. I'm still annoyed its not a perfect projection, but hey, if it works for your purposes then its good enough for now.
Thanbks for any help u guys caan get me i am intrigue by the clamp tecnique