Lightning on a local model

Posted By: RcSepp

Lightning on a local model - 09/15/05 15:10

Hi everyone

I'm making a first-person-shooter game and in all first-person-shooters you need a weapon hanging around like a panel on the screen. The easyest way to show this weapon is to make a runtime created entity. The problem is: There are no lightning effects on such an entity. Tell me one modern shooter with no lightning-effects on the weapon.
So: Is there a way to add a bit of lightning or brightness effects to a runtime created entity through shader materials?

Please help. I can't sell a game without those effects.

greetings
RcSepp
Posted By: VampireLord

Re: Lightning on a local model - 09/15/05 15:20

An easier solution to this is create a model via ent_create and have it attached to say the player hand...

This behaves like a normal model then

Greetings
Posted By: RcSepp

Re: Lightning on a local model - 09/15/05 15:31

the local player weapon (seen by the player) is more detailed than the normal one (seen by other players in a multiplayergame)

attaching the local weapon to the hand means that the local weapon = the normal weapon

and: how can I protect the program from in the wall sticking local weapons than?
Posted By: VampireLord

Re: Lightning on a local model - 09/15/05 15:55

question 1: use lod at extreme stages
Posted By: iWaNtToKnOw

Re: Lightning on a local model - 09/15/05 18:35

try this in the multi-player shooter:

create the detailed "View" weapon with ent_createlocal and then the Player weapon with ent_create.

doing this, you create a weapon that only belongs to your computer and a weapon that all player see.
Posted By: OptimuS

Re: Lightning on a local model - 09/15/05 19:09

In AUM there is a script that checks how bright is where your model is(the player) like for hiding in the shadows , use this with setting brightness of the weapon maby ?
Posted By: Pappenheimer

Re: Lightning on a local model - 09/15/05 22:27

Maybe the advanced ffp tutorial in the wiki helps.
Posted By: Josh_Arldt

Re: Lightning on a local model - 09/15/05 22:33

Quote:

Maybe the advanced ffp tutorial in the wiki helps.




I don't think so in this case.

Something he could maybe try doing is passing the players lighting to his weapon.

This thread seems like it belongs in either the scripting forum or the multiplayer forum and should be moved.
Posted By: Pappenheimer

Re: Lightning on a local model - 09/16/05 12:42

Quote:

Quote:

Maybe the advanced ffp tutorial in the wiki helps.




I don't think so in this case.

Something he could maybe try doing is passing the players lighting to his weapon.

This thread seems like it belongs in either the scripting forum or the multiplayer forum and should be moved.




What I refer to is the shadow of plants on the weapon in FarCry. I think, they are shifting a second texture with the help of a shader or an ffp to simulate the shadow.

The advanced ffp tutorial in the wiki shows exactly this: how to shift a second texture.

To get the information, wether there is shadow and from which plant it is, you might trace from the wepon to the sun. It is the only entity on the client that would do this operation, so it might not hurt.
Posted By: RcSepp

Re: Lightning on a local model - 09/16/05 16:16

Quote:

In AUM there is a script that checks how bright is where your model is(the player) like for hiding in the shadows , use this with setting brightness of the weapon maby ?




THATS EXACTLY WHAT I WANTED TO HERE
I just hadn't found the right syntax until now, but it works as you said.

For all, who have the same problem. Here is the code:

vec_set (temp, my.x);
temp.z -= 1000;
c_trace(my.x,temp,ignore_me + ignore_passable + scan_texture);
local_weapon.red = tex_light;
local_weapon.green = tex_light;
local_weapon.blue = tex_light;
© 2024 lite-C Forums