Saiaku Posted August 31, 2014 Posted August 31, 2014 I've been trying to make a grey moon that moves over the sky, but whatever I do with my shader, or if I use a jpg with black background or transparent background on png, the moon itself seems to be halfway transparent as well. Does anyone know the correct flags for such a shader? Thanks ^^
Saiaku Posted August 31, 2014 Author Posted August 31, 2014 It looks like this now textures/a_afl_grand_skies/grand_skyobj_moon1 { surfaceparm noimpact surfaceparm nomarks surfaceparm nonsolid surfaceparm trans q3map_nolightmap q3map_novertexshadows { map textures/a_afl_grand_skies/grand_skyobj_moon1a blendFunc GL_ONE GL_ONE glow rgbGen wave square 0 1 0 0.0007 tcMod scroll 0 0.0014 } } The texture grand_skyobj_moon1 is just a black stripe with an arrow showing the orientation in the editor.The texture grand_skyobj_moon1a is black with the moon on it, which is gray.I've tried the same setup with a transparent background for the moon texture, without luck.
Solution Saiaku Posted August 31, 2014 Author Solution Posted August 31, 2014 Fear not, I was able to solve it.Just looking into the base shaders for some similar cases, and I found what I was looking for. Here's the shader I ended up with. textures/a_afl_grand_skies/grand_skyobj_moon1 { surfaceparm noimpact surfaceparm nomarks surfaceparm nonsolid surfaceparm trans q3map_nolightmap q3map_novertexshadows { map textures/a_afl_grand_skies/grand_skyobj_moon1b alphaFunc GE192 blendFunc GL_ONE GL_ZERO glow rgbGen wave square 0 1 0 0.0007 alphaGen wave square 0 1 0 0.0007 tcMod scroll 0 0.0014 } } rgbGen and alphaGen is used for hiding the moon during daytime in my map. Result:https://jkhub.org/images/4Bs814C.jpghttps://jkhub.org/images/vQ0ryTz.jpg Thanks for reading. NumberWan likes this
Saiaku Posted August 31, 2014 Author Posted August 31, 2014 Wow it's a magic sky! Yep, it's very magic!Actually it is a part of a new map for the clan.The map features a day & night cycle, lasting 24 minutes, going from day to night, clouds moving, sun and moon going around, too. Boothand and Asgarath83 like this
Saiaku Posted September 1, 2014 Author Posted September 1, 2014 Sunset Grab, NumberWan, Sithani and 5 others like this
Saiaku Posted September 2, 2014 Author Posted September 2, 2014 Thx. I have another box wrapped inside the portal skybox with the night sky. The shader fades in and out in sync with the moon and sun moving over the sky.
Saiaku Posted September 5, 2014 Author Posted September 5, 2014 Thanks all.Here's a proper timelapse video Grab, Omicron, Raz0r and 2 others like this
Boothand Posted September 5, 2014 Posted September 5, 2014 Whoaaa. It looks great. Really surprised this worked so well. Is it just many animmaps? Doesn't the sun itself look a bit strange though?
Saiaku Posted September 5, 2014 Author Posted September 5, 2014 I tried adding some kind of "flare" effect to the sun, so it doesn't look so lonely kind of.It's all just scrolling shaders really.
Asgarath83 Posted September 6, 2014 Posted September 6, 2014 WOOOOOOOOOOOOOOOOOOOOOOOOOOWWWWWWWW!!!!! :
ZeroRaven Posted September 7, 2014 Posted September 7, 2014 Now are the sun and moons light emitting shaders? I didn't see that in the code.But would that even be possible given the code work just to get them scrolling? Check out some of my previous works:JK Hub - [Editor: Zero Raven]
Saiaku Posted September 7, 2014 Author Posted September 7, 2014 They are not light-emitting.I don't think it would affect the world anyway.I believe light from such shaders are calculated in the BSP and not real-time.
NumberWan Posted October 4, 2014 Posted October 4, 2014 I remember, that one guy wanted to create a mod for Episodes I-III strictly about Anakin. One particular mission - on Coruscant - would include the change of day and night. Unfortunately he stopped working on his project long ago.
RebelChum Posted October 7, 2014 Posted October 7, 2014 Now make the tcmod scroll super slow so it actually takes a day to cycle
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now