Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Models and Media / Model Lighting Question

Author
Message
Woody376
13
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 29th Sep 2011 14:12
Hey there everyone!

Just a quick, and quite possibly stupidly simple, problem I'd like a little help with..

I currently have a dynamic light with the main script of 'lightoff'. Underneath that light, appropriately placed, is a TF341 soldier. The soldier is using the Dead Body Scripts by TheStoryteller01. So he is dynamic and immobile on a static chair. Now, I have a trigger zone to activate the lightsource and turn it on, but when the player makes there way to the darkened area before the trigger zone, the TF341 soldier is illuminated because of his dynamic state, leaving everything around him pitch black.. Looks just a 'wee bit' unprofesh..

Now I know that this is more than likely a shader problem, but my question would be, what shader should I look into using? I have a few form the forums, like many of Bond1's and CoZ's, but none seem to help.. And if this isn't shader related, any help would be appreciated!

Thank you in advance guys!

Woody

Zombies, my friend. Zombies everywhere.
xplosys
19
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 29th Sep 2011 20:21 Edited at: 29th Sep 2011 20:23
This may be helpful.
------------------------------------
Just a quick tip for you. I was playing with new character submissions from future FPSC artists and noticed some of the characters relied heavily on strong lighting for the best effect. Currently X9 users cannot control this, and currently rely on a fixed shader. I just wanted to to point you to the file which will allow you to change the ratio a little:

Ensure you make suitable backups, then navigate to this folder:

FPS Creator Files effectbank fastbone

And open the shader file FASTBONE.FX, then locate the line:

gogo = (max(0, dot(netNormal, L))*SurfColor*0.25) + (SurfColor*0.75) + AmbiColor;

And replace it with:

// gogo = (max(0, dot(netNormal, L))*SurfColor*0.25) + (SurfColor*0.75) + AmbiColor;
gogo = (max(0, dot(netNormal, L))*SurfColor*0.9) + (SurfColor*0.1) + AmbiColor;

This will change the ratio of directed light vs area lighting from 25/75 to 90/10, meaning 90% of the characters illumination will come from the point light in the local area, and only 10% will come from the general average lighting irrespective of whether the polygon is facing those light sources.

A great way to learn shaders is to change little things inside working shaders and see the results. If the shader fails to load, that means you have changed too much and so always maintain backups before radically changing your shader. Although NOTEPAD is great, it does not have very good undo/redo features. Find a nice text editor with great undo/redo and you are on your way to playing with shaders and making your visuals unique to your game!

------------------------------------
Adjust instructions as necessary.

Brian.

Login to post a reply

Server time is: 2025-05-17 06:59:09
Your offset time is: 2025-05-17 06:59:09