[SOLVED] Substituting textures on Actors

Greetings all!

I’m afraid I may have coded myself into a bit of a corner with the Actors we’re using in a scene. If anyone has any advice, I’d appreciate it.

We have a couple of actors for which we would like to dynamically swap their textures with another set of textures that have the correct UV mapping. This is a technique we’ve been using in other places with our static geometry. For example, we’d like to replace the head texture and the body texture with different hair styles and clothing, etc. This is a technique we’ve used in other places (for example, replacing a striped sofa with a spotted sofa).

The problem I’m running into is that I can’t seem to dig into the sub-geometry of the Actor to specify the replacement textures. For actors with only one texture, there’s no problem. However, if the actor has multiple textures (such as head and body), I seem to only be able to specify one texture for replacement, and it clobbers the other textures, making a mess. Uh-oh :slight_smile:

Is there any way to get around this issue other than substituting an entirely different model file?

Take care,
Mark

This sounds like an egg-optchar job.

http://panda3d.org/manual/index.php/Manipulating_a_Piece_of_a_Model

Tag the pieces of the model with egg-optchar and then you should be able to switch textures, or do other manipulations on the model pieces.