| 05-11-2008, 10:33 PM | #1 |
Basically I'm working on a custom model for an rpg, and I want to be able to change which texture the model uses when he changes equipment. So when he equips leather armor, I want the model to use leather.blp, when he equips plate, i want the model to use plate.blp Anyway to do this? Any ideas welcome, thank you |
| 05-11-2008, 11:31 PM | #2 |
Import all of the textures to the model and use different materials and show/hide different geosets for each alternate form. |
| 05-12-2008, 01:22 PM | #3 |
woah... this is possible? i always thought about that, but since i never tried to model i had no idea that this could be. just a question: is it much work to make a small tutorial, how to do that? |
| 05-12-2008, 03:06 PM | #4 |
Yes, it's very possible, similar in nature to how the Druid of the Claw can change to bear or back. Geosets just get visibility shuffled around and you can see different parts at different times. I don't think it'd be too insane to write such a tutorial, though I hardly consider myself the technical genius to write such a thing. Perhaps I can get TDR to do it... |
| 05-12-2008, 06:38 PM | #5 |
Problem with this is animation data though, you need to have a diffrent set of animations for each "form" or "texture". The gain of doing it all on one model is so little that you might as well use diffrent models, wich in a way, you are. But to awnser the question: No. There is no way to swap textures around in wc3. You need a diffrent model or geoset for each texture. |
| 05-12-2008, 06:42 PM | #6 |
Actually, from a programming standpoint it's hugely beneficial to have it all on one model. You don't need to morph the unit ever then, you can just attach a different required animation string and trigger it all; it's extremely convenient. From an artist standpoint, though, I imagine it probably would still save space in the long run since it'd require only one portrait model and would use the same skeleton. |
| 05-12-2008, 07:22 PM | #7 |
Couldn't you just have a skeleton with very, very tiny cubes attached to the bone so you won't see them (that's if just bones and no mesh doesn't work) and make separate models for body parts and attach them to the skeleton? And the textures could be controlled via the part model's animation. As far as I know, you can access other animation names through jass other than the standard ones, so you could make many animations on that model, but not really animations...just separate them in the dope sheet editor, and in each animation you hide the mesh with a material and unhide another one with another material and so on. For example, you have a wrist guard. You duplicate it in place for as many times as you need and give each copy a unique material with unique textures. Then in the animations you hide/unhide them as you need. So to change the texture in wc3, you can basically set it to play the animation you want. I think this could be possible. |
| 05-13-2008, 02:17 AM | #8 |
yes, exactly, that works. But thats still not actually swapping textures; its swapping geometry. |
| 05-13-2008, 02:26 AM | #9 |
Aye. I don't think swapping the actual textures on models is possible. |
| 05-13-2008, 10:46 AM | #10 |
Well there is one exception. There is a material that uses several textures and swaps them depending on the terrain, i think its used for trees. Maybe you cal somehow create code to make use of that feature. |
| 05-14-2008, 03:07 AM | #11 |
If you use a composite material you can swap textures by changing the alpha of one to 0 (Blizzard uses that in Grom's morph animation). The only problem with it is that it multiplies polies by 'n' being n the number of textures you use. But of course you need a custom model. |
| 05-14-2008, 10:32 AM | #12 |
would that be accompanied by animation data for every instance of "n" as well? If not, that would definetly be the most cost-efficiant way of doing multile textures. |
| 05-14-2008, 07:06 PM | #13 |
sounds like more work than expected first. i guess it is also not possible to change the model without replacing the whole unit, right? like making a jass script that changes just the .mdl file of the unit data? ...or could this be done with just a modyfied troll-berserk upgrade? |
| 05-14-2008, 07:28 PM | #14 |
You can change it using the chaos ability, yes, but there is no script function for changing a model of a unit at runtime, unfortunately. |
| 05-14-2008, 07:46 PM | #15 |
well thats sad. looks like one has to deal with that. |
