Page 1 of 1

Changing a model's skin during play

Posted: Thu Jul 19, 2007 14:44
by Risen
As the topic title says, I want to change a model's skin during play.

There are two cases I want to address:

#1 - Temporary switching for a specific animation purpose
Example: Adding highlights to the front of the model during a firing frame.

#2 - Permanent switching to show status
Example: Showing damage to the model when it reaches 1/2 health.

I thought about using modeldef's model index feature to accomplish #1, but forum research shows this feature doesn't work correctly (though to be honest, I did not try it). Does any feature exist with which to accomplish either of these cases?

It would be great to assign multiple skins to a model with a skin index number, and then reference which skin index should be used for each frame in the MODELDEF. Then, a complementary (ACS?) function could be used to reassign what images each skin index referenced. That would make both cases possible.

Posted: Fri Jul 20, 2007 20:45
by Nash
As you have guessed, modelindex can be used for this... if it worked.

I would actually like a cleaner and more specific solution though (change texture during runtime).

To hack around this right now you can spawn a different actor which points to another model with the alternate skin. Not very fancy and won't really work well for your examples.

Posted: Mon Jul 23, 2007 16:23
by Risen
Consider this a feature request, then. Feel free to move the topic over.

Posted: Thu Aug 02, 2007 0:41
by TheDarkArchon
Sorry to bump this one but one the subject of skins, is it possible to assigned multiple skins to one actor?

Posted: Fri Aug 03, 2007 6:54
by Nash
You can't. The latest skin definition will overwrite the previous ones.

GZDoom also can't do multiple materials for MD3 models.