Since a quit long time I started to creating a ‘map-pack’ for ioquake3 engine based games, a few maps are already done and now I wanted to light my maps. The maps are specially designed to make use of the new Renderer 2 features (bumpmapping, real-time shadows etc.). So I decided to also use the new sunlight method for my sky shaders.
After endless hours of tweaking the relevant shader I noticed that either something with the current OpenGL Renderer 2 must be wrong or I do something wrong (which is also very likely).
First of all, I do have some maps with a cloudy sky, there is no full bright sunshine so I wanted to have some weaker shadows or ‘half-shadows’.
The current method to achieve this effect is to create a sky shader with a parameter called ‘deviance’.
It is the 7th parameter in your ‘q3map_sunExt’ sky shader.
e.g.: q3map_sunExt 240 238 200 100 195 35 3 16
More info can be found here: http://q3map2.robotrenegade.com/docs/shader_manual/q3map-global-directives.html#q3map_sunExt
When creating baked lightmaps (compiled with q3map2) this works perfect and gives very good results.
In ioquake3’s ‘opengl2-readme.txt’ there are now two methods mentioned to create skylight.
Either by using the ‘old’ method as shown above or with a new method.
Renderer 2 offers a new sky shader keyword called ‘q3gl2_sun’. It reads as follows:
q3gl2_sun red, green, blue, intensity, degrees, elevation, mapLightScale, ambientLightScale
e.g.: q3gl2_sun 240 238 200 50 195 35 3 1.0 0.2
Furthermore the comment in ‘opengl2-readme.txt’ says:
“Note the first six parameters are the same as in q3map_sun or q3map_sunExt, and the last two indicate scaling factors for the map brightness and an ambient light of the same color as the sun.”
This means: (6+2=8)
If you have a closer look you will notice that the example from above (the example from ‘opengl2-readme.txt’) has nine parameters not eight.
So what does the third-last parameter do?
I was under the assumption this still is the ‘deviance’ parameter. But the desired effect of half-shadow does not work with Renderer 2, assuming I use the new q3gl2_sun keyword.
This leads to two questions:
Is parameter ‘7’ respectively the ‘deviance’ parameter still usable when using q3gl2_sun keyword?
(If not, then the ‘opengl2-readme.txt’ is wrong)
I had a look on the renderer engine and I think half-shadows aren’t possible anymore
Though I’m no expert and I have no rendering programming skills.
If Renderer 2 still provides a method of creating half-shadows, how can we produce half-shadows when using Renderer 2 with r_sunlightMode 2 and use ‘q3gl2_sun’ then?
Sorry if my questions are silly, maybe I do something completely wrong.
Is there anyone who create maps for Renderer OpenGL2 and can help me?
Thanks in advance. Any help would be appreciated!
Thank you for reading!