Gecko knows how to do this better than anyone. Hopefully he'll chime in with some advice.
Here's part of a conversation we had with AnKor back in April 2016.
I am looking into the searchlight more, and set it up to work with one of the sets of searchlights we have in CFS3. It works, but the model of the beam could be done better to work with the shaders. If we were to get someone to build a new model, what would be the ideal shape of the beam? Also, I was trying to adjust the appearance of the lighting effect on aircraft, but wasn't successful.
I’m not sure what to advice for searchlight model. I never seen how it looks in GMax.
As I understand the beam goes along X axis, in negative direction.
It is a truncated cone – narrow near origin, and wide at the end.
The number of sides is not very important because my shaders make the beam look smooth. They also double the length of them beam (see vs_Searchlight in Models.fx).
What changes to searchlight appearance on aircrafts did you want? Maybe I can help. It can be tweaked to certain extent, but not much.
Thanks for explaining the searchlights, I'll just open it in m3d viewer to see what the shape of the WOFF ones is and base a new CFS3 one off of that shape. As to the lighting appearance, the specular seemed a bit intense and looked like it was done per vertex as opposed to per pixel.
You are correct – searchlight illumination is calculated per vertex for performance. Apart from usual drawbacks this also means that bump-mapping and specular textures are ignored.
It is also always white, even though the beam has slight blue tint.
You can adjust it in Models.fx, line 211:
if(bSearchLights)
{
float2 tmp = calcSearchLights(worldPos.xyz, Out.Normal.xyz, true, Out.Material[1].y);
Out.VertLight.y = tmp.y; // specular
Out.Diffuse.rgb += tmp.xxx;
}
Just add a multiplier to tmp.y, for example this will reduce searchlight specular in half:
Out.VertLight.y = tmp.y * 0.5;