How to get phong shading to work on cylinder brush


(Shaderman) #1

Hi, It’s me again pushing this topic :smiley:

After phong looks nice on the outside of my towers now, I tried to illumine the inside of this 32-sided polygon. I’d like to have some darker lighting inside with some lights on the phong shaded wall. The problem is, that the lights are too dark (decal lights at the moment) and stop to illuminate at some edge. It’s not bright enough to get a nice looking phong result (I hope you can see those shadows in the edges of the polygon bruhes):

I tried some things over the last days but now I’m lost :frowning: I tried to put some extra lights above the stairs (spot lights, too) and also tried a self emitting shader on the wall. The problem is, if I modify the shader for a working phong effect, the shader won’t receive light itself from the lights at the wall:

What do I have to do to have
a) a dark lighting inside the towers with
b) nice looking phong (without shadows in some edges)
c) and the ability to receive light for the wall?

Thanks in advance.


(obsidian) #2

a) Lower the q3map_surfacelight value and possibly use some low intensity point lights.
b/c) Try using q3map_backsplash. You can set the % value to the amount of light that you want the shader to emit back on itself (illuminate the surfacelight shader). Use the distance value to move the light sample away from the surfacelight for better lighting of the wall (default value 1.0, try slightly higher value).


(Shaderman) #3

Thanks a lot for your hints obsidian. I played with backsplash the last days but I still don’t get a satisfying result. The walls are either too bright to get a working phong or there are ugly shadows when I try to keep the ambient lighting darker :confused: I’ll ignore this problem now after lots of frustrating hours and will do some other (easier) things now but I’m sure I’ll go back on this problem. If there’s no way to solve this with a shader, the last solution would be a smoother polygon and lots of point lights :frowning:


(codey_) #4

Maybe you could have two polygon sets - keep the one you have for outside but thin it off and then just have the higher polygon for the inside. Make the outer set structural and hint the windows and it shouldn’t affect your outside r_speeds very much. Or loose the punch-thru windows altogether and have a cylinder for inside walls, again with outside brushes structural. Then another faster way to go is use a brick/stone texture to make those lightmap edges less noticeable, that smooth stucco one you got really shows them off in a hard way. In real life such places often have stucco on the outside and bare bricks/stones on the inside and are actually not perfectly round.
Just some ideas to counter your frustration - been there, done that. got a lousy t-shirt
:drink:

cheers


(obsidian) #5

I think those walls would look better with a rusty metal texture. It would fit the industrial theme of the map better than stucco, stone or brick. I would probably use some sort of metal grate (not see-through) texture for the stairs. Just a suggestion…