Jump to content

Blocky lighting on Patch Meshes when using fog


Recommended Posts

Posted

shot0004_zpsa6a95ba8.jpg

 

Hi guys.

 

So as you can see from the above image I have some ugly lighting on those patch surfaces... this only occurs when I'm using fog (as a brush or in the worldspawn)

 

Is there anything I can do to rectify this and make the light blend/smoother?

 

 

Kind regards

 

PA

Posted

This is a conflict between the pong shading of curved meshes vs the vertex effect of fog. The only way to fix this is to apply a vertex lighting only shader to those curved surfaces, sure they'll look a little less smooth, but it'll take care of the shadow problem. The vertex shader will overwrite the engines normal action vs this type thing (the path mesh).

See even without a phong shader directly being applied (written by you), the engine will automatically phong these sort of surfaces it's self, it's just how it's programmed. Although normally it doesn't cause this sort of reaction. In case you don't know what a phong is, that's the smoothing shader/effect applied to curved surfaces or even brushes can be phonged manually to create a smoother looking surface such as terrain etc. The question would be is IF this is a base texture/shader being used on those meshes. Normally I've never seen this reaction on patches or brushes unless it has a pong shader on it via a shader file. So check that first before writing a new shader for the said texture. If so then it's simple just put it in a custom directoy (and if you want one) write up a new shader, but if it was a base one, it'll fix this.

Basically, phong shaders don't mix well with fog.

AngelModder

  • 2 weeks later...
  • 4 weeks later...
Posted

Thanks again for the help and sorry for the late reply.

 

Its going to be yet another Tatooine themed map though more closed in.

having a few ships to explore and play about in as well as some other stuff to get up to...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...