Changing a model's skin during play

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Risen
Posts: 39
Joined: Fri Sep 02, 2005 17:48
Contact:

Changing a model's skin during play

Post 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.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post 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.
User avatar
Risen
Posts: 39
Joined: Fri Sep 02, 2005 17:48
Contact:

Post by Risen »

Consider this a feature request, then. Feel free to move the topic over.
User avatar
TheDarkArchon
Posts: 1000
Joined: Wed Jul 06, 2005 11:58
Location: What's that fucking smell
Contact:

Post by TheDarkArchon »

Sorry to bump this one but one the subject of skins, is it possible to assigned multiple skins to one actor?
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

You can't. The latest skin definition will overwrite the previous ones.

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

Return to “GZDoom”