Changing Skins

Posted By: Dreher

Changing Skins - 06/04/09 16:28

Hello,

I've got a model, and that model contains a few skins, 1 for the Model itself, 1 for the 3D Lights that are on that model, and 1 for textured lights.



http://img189.imageshack.us/img189/8585/lightproblem.png

All these lights you see here (I put some black circles around them lights I talk about) I want to let them 'flash' (Like a stroboscoop but not so fast, lol!)

Ok, I've split all these lights on the back, into 3 groups, and assigned a red texture to them, and now I want to let them flash by changing for example, it's ambient every once a second, so it'll look realistic.

Problem by using: my.skin = 5; (for example) it makes my whole model get the colour I assigned to these lights in MED frown

I tried ent_mtlset but I don't get this to work either!

EDIT: So, an example: You have a tree with leafes, they both use a different skin but they are both in one .MDL.
How to ONLY change the skin of the leafes with script, and keep the tree skin unchanged?
Posted By: DLively

Re: Changing Skins - 06/04/09 19:30

use 2 models, instead of one? leaves one model, trunk anther model.

not sure what you mean...

Edit: you can use an effect that flashes, and attach it to each vertex on the tips of the lights; but that would use lots of resources.
Posted By: Dreher

Re: Changing Skins - 06/04/09 19:34

Originally Posted By: DevoN
use 2 models, instead of one? leaves one model, trunk anther model.

not sure what you mean...

Edit: you can use an effect that flashes, and attach it to each vertex on the tips of the lights; but that would use lots of resources.


If you can help me find that effect, I might give it a try, might aswell use it for something else instead.

Thanks for helping laugh
Posted By: EvilSOB

Re: Changing Skins - 06/04/09 19:58

Playing with my.skin is only affecting the FIRST skin as listed in MED.
Thats all it can do. You cant change any of the other skins, as far as I know.

It would possibly be easier, but more CPU hungry, creating all the lights as separate entities and attaching them to the model.
Have three different actions to handle the lights, one action for each "group" of lights that handles the color of that group
and keeps it attached to its parent model.

Its a bit of work, I'll admit, but the coding is simple enough, as the lights could be positioned with a simple
vec_for_vertex from the parent model, and since they should be non-physics, passable entities, they wont interfere
with anything else, AND they could be then given a lightrange to actually emit light too.
Posted By: Dreher

Re: Changing Skins - 06/04/09 20:07

Originally Posted By: EvilSOB
Playing with my.skin is only affecting the FIRST skin as listed in MED.
Thats all it can do. You cant change any of the other skins, as far as I know.

It would possibly be easier, but more CPU hungry, creating all the lights as separate entities and attaching them to the model.
Have three different actions to handle the lights, one action for each "group" of lights that handles the color of that group
and keeps it attached to its parent model.

Its a bit of work, I'll admit, but the coding is simple enough, as the lights could be positioned with a simple
vec_for_vertex from the parent model, and since they should be non-physics, passable entities, they wont interfere
with anything else, AND they could be then given a lightrange to actually emit light too.




Ok well.. I will stick with a simpel texture on the back of the gondela... Placing real 3D Lights takes too much time, and the Model itself is already pretty heavy, so I will 'give up' on it ^^
Posted By: EvilSOB

Re: Changing Skins - 06/04/09 20:14

Dont give up on it, just wait a bit longer.
I dont know everything! Someone else may yet have an answer for you.
Posted By: Dreher

Re: Changing Skins - 06/04/09 20:28

Originally Posted By: EvilSOB
Dont give up on it, just wait a bit longer.
I dont know everything! Someone else may yet have an answer for you.


I know a guy who did it with ent_mtlset, but I can't get it to work lol, so I guess there isn't much of a choise.

Besides, the model is now at 195.000 poly's, no problem atall, test by several people, but it's a waste ^^
© 2024 lite-C Forums