Guest KENNITHH Posted August 28, 2015 Posted August 28, 2015 Hey, I'm back at my old map as people asked me to finish it. So I'm at the part of adding lights where I use q3map_surfacelight for a nice lightbar effect but theres something bugging me , in the center you can see theres a little sphere of light. Is there a way to fix this ? Also when looking from a distance, it draws the surface through walls a bit (hard to see sometimes - top left)Shader & GTK textures/ziba/lightstrip01{q3map_lightimage textures/colors/whiteqer_editorimage textures/colors/whiteq3map_material Glassq3map_surfacelight 2000polygonOffset { map $lightmap } { map textures/colors/white blendFunc GL_DST_COLOR GL_ZERO } { map textures/colors/white blendFunc GL_ONE GL_ONE }}
mrwonko Posted August 28, 2015 Posted August 28, 2015 If you want to write shaders, you probably need to learn about blend functions. That shader has 2 more stages than it needs. I'm kind of surprised that there is any light coming off that surface besides the single sphere of light - based on how I understand q3map_lightSubdivide those evenly spaced point lights are the only source of light for surface lights, and their default spacing is one every 120 units. But I never experimented much with them, so I can't tell for sure.
Guest KENNITHH Posted August 28, 2015 Posted August 28, 2015 I learn better if I see how other people do stuff then try stuff myself rather then theories . So I've looked up some maps you made and Szico aswell and I've found out that q3map_backSplash 0 0 fixes that center light but I don't get the 2 more stages needed, is it for the line showing through walls or do you mean I can remove the stages cause theres a lightimage in there? I'm currently trying the sort param aswell because when I stand on a light, they start z-fighting
mrwonko Posted August 28, 2015 Posted August 28, 2015 No, I'm saying that if you only want a white shader, you don't need three stages; you just need a single one, e.g. { map $whiteimage //or textures/colors/white, if you prefer blendFunc GL_ONE GL_ZERO } together with q3map_nolightmap. Possibly add a glow stage. Your shader visually looks the same, but takes 3x as long to display. This is just a simplification; it should not help with your issue.
Solution Guest KENNITHH Posted August 28, 2015 Solution Posted August 28, 2015 No, I'm saying that if you only want a white shader, you don't need three stages; you just need a single one, e.g. { map $whiteimage //or textures/colors/white, if you prefer blendFunc GL_ONE GL_ZERO } . When I use this, the texture doesnt show, now the reason why it showed it through walls seemed to be cause it was a patch mesh and had polygonoffset, changed it to a normal brush and its gone , so basicly this thread is solved !Thanks mrwonko Thanks mrwonko and AshuraDX ! Solution: Use brush instead of patchmesh textures/ziba/lightstrip01{q3map_lightimage textures/colors/whiteqer_editorimage textures/colors/whiteq3map_material Glassq3map_surfacelight 2000q3map_backSplash 0 0 //fixes the circle lightq3map_nolightmapsort decal {map textures/colors/whiteblendFunc GL_ONE GL_ZEROrgbGen identity //makes the white texture ALLWAYS fullbright }}
AshuraDX Posted August 29, 2015 Posted August 29, 2015 you should try this : textures/ziba/lightstrip01 { q3map_lightimage textures/colors/white qer_editorimage textures/colors/white q3map_material Glass q3map_surfacelight 2000 q3map_backSplash 0 0 //fixes the circle light q3map_nolightmap sort decal { map textures/colors/white blendFunc GL_ONE GL_ZERO rgbGen identity //makes the white texture ALLWAYS fullbright glow } }
Guest KENNITHH Posted August 29, 2015 Posted August 29, 2015 That works aswell DashuraDX, thanks for that. Eventhough glow doesnt work in SoF2 but I never mentioned it was for SoF2 anyway.But it might be usefull in the future because I will release the source so people can see how I made it and perhaps learn from it, but they are allowed to re-release it on their game aswell.
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