View Full Version : Animating an accessory?
9th Dec 2011, 4:11 PM
I think this is the proper place to ask, but if it's not, feel free to move this wherever it need to be. I had someone ask me to mesh a wind up doll key, and while the key looks fine (in test shots anyway, I'm remeshing it b/c it has hole issues and I can't seem to find the offending faces to fix it) the requester would like for it to animate as well. As in spin around. Is this even possible? And if so, can someone point me in the proper direction to do so? ~VP
9th Dec 2011, 4:30 PM
Yes, it's possible. Animated accessories are done via textures - to make it appear to rotate, you would duplicate your key mesh, rotate it, say, 45 degrees, remap that part to another part of the texture, and then repeat till you have a full rotation for the key turning. Then you use this method (http://www.modthesims.info/showthread.php?t=82395) to animate the texture, turning each section off and on in turn per frame.
If you want examples of how that's done, check out my sparklies/flies mesh, or the fairy wings by boblishman.
10th Dec 2011, 5:55 PM
Ok, I understand the theory perfectly. But I can't seem to get it to apply to my accessory. I duplicated the mesh, rotating it as you suggested, and mapped each to a separate area of the UV map. i followed JWoods tutorial. I even compared my file and made it as identical as I could to boblishman's fairy wings, aside from the number of cells and speed. And it still isn't working. Can someone take a look at it and help me if possible? Also I'm experiencing bleed though issues that I can't seem to fix (most noticeable on the yellow rings Can't see the other colors to tell if it's all of them). I changed the material from StandardMaterial to SimStandardMaterial (that actually made my colors appear in the right spots but didn't help the bleed through). And it's not the comment in milkshape. That reads "NumSkinWgts: 3" I can't find anything else that would fix the bleed through issue. So here are some pictures of the accessory and a rar file containing the mesh and recolor file. The original mesh sits in the position of the purple color, and the animation is supposed show in this order :purple, green, blue, yellow.
EDIT 12/11/11: I rebuilt the mesh using a different base, since searching around found HP replying to someone else trying to make an animated accessory and saying to use the thick rimmed glasses (which I didn't before). And was still experiencing the same issues. The bleed through seems to be caused by "AlphaBlendMode" being set to "blend". The new mesh showed fine before I enabled it, bled when it was enabled, and showed fine when I disabled it. And the animation sort of works now. Apparently setting the material to "SimStandardMaterial" instead of "StandardMaterial" breaks animation. So now the key cycles colors, since that's how my test texture is set up, but still the whole mesh shows at once, not the individual parts "rotating". Somewhere, I'm doing something right, but I can't seem to figure out what's going wrong. ~VP
2nd Jan 2012, 9:14 AM
Sorry to double post, but adding onto the exiting post again, seems not right. Anyway, I can not for the life of me get this to animate. Every single attempt results in the entire mesh cycling colors. It's like the package is not reading that each separate part of the mesh (the rotated pieces) sits in a different spot, and insists on showing the whole mesh no matter what I do. I even tried making alpha cutouts on the texture, and they do not show up in the correct spot. So I'm guessing my problem is in the UV map. But how I don't know. When I look at it in Milkshape, it shows exactly right, four identical sections (one for each section of rotation) side by side. But in bodyshop and in game the item REFUSES to display only part of itself. I know animated accessories work in my game as I put boblishman's wings and HP's sparklies in there and they both showed correctly. I'm fairly certain I've set op the package to display animation properly as it does cycle colors and for the amount of time I specified (that and I essentially copied all the relevant values from boblishman's wings and adjusted them to my requirements)
I'm about ready to simply give up on animating this thing. Unless someone out there knows how to wrestle this key into submission, the wider sim world will just have to live with an unanimated key. ~VP
2nd Jan 2012, 9:43 PM
Not sure why your using the blend settings but if you do your texture needs to be DXT3 format i think.(i dont think the alpha works on DXT1?)
If your not using transparaqcy you better use the alphatestenabled, set to 1 and disable the blend settings.
that is all i could think off(cant test the package due sims2 not running...
14th Jan 2012, 12:20 PM
@Bloom: I tried and it had no visible effect on the object. I don't need transparency (it was simply a test to see if I could figure out what was wrong) so I set alphatestenabled to ! and disabled blend, but it still won't work.
@anyone else: I'm right in thinking that this tutorial by Echo: http://www.modthesims.info/showthread.php?t=239160&c=1&ht=&page=1&pp=25#startcomment cannot be used to make sim accessories work. It's only usable in objects right? My requester directed me to it thinking it might help, but I think he is wrong on that point. Looking at it, it looks like I'd have to move joints on the skeleton, which would in turn make the sim look/behave funny. It's not possible to use a different skeleton on an accessory right? Because it uses the sims skeleton to tell it where to be? Help? Anyone? ~VP
14th Jan 2012, 2:41 PM
did you change the texture format like i suggested?
I aslo tried to animate some clothing but that didn't work either, so you could be right.(wanted sparkles)
14th Jan 2012, 7:46 PM
Please feel free to ignore this random interjection....
This is just a random thought and I don't know if it would work or at least work as well as you or the requester would like. But could you create a separate object (non-accessory per se) that animates which would then be snapped into a Body slot (http://www.modthesims.info/wiki.php?title=Body_Slots) of a Sim (probably a Target or Container slot)? There would be some BHAVs involved, but there's a chance that it might be a reasonable work-around.
15th Jan 2012, 7:34 PM
ye, best to try that first, clone the helmet for it?
16th Jan 2012, 10:00 AM
@Bloom: yes I did change the texture format.
@MSD: I kind of get what you're saying here. But how would I be getting the object on the sim? Something similar to a posebox? And what about keeping it on the sim (say when it goes to a community lot)? I'm willing to try anything to get this thing to animate properly, but I'd like to have at least a vague understanding of what I'm doing before I do it. ~VP
16th Jan 2012, 7:23 PM
Yeah, you would need some sort of object which would have a "Place/Remove Object" interaction.
There might be an easier and more efficient way, but the way I'm imagining this would be a three-part system: a custom token (we can call it the "ShouldHaveAccessory" token), the aforementioned object to add/remove this token, and a global object floating in the Sim Ether which searches the lot for Sims with the token. If a Sim with the token is found, there could be a check to see if their slot is empty before spawning an instance of the accessory to place into the slot. If you would like, I could try to mock something like this up for you when I get the chance.
17th Jan 2012, 5:29 AM
Oh joy. Learning how to hack things! The way you describe it sounds like an acceptable way to go about it. Or at least do-able. You don't have to mock something up, although it might help me see what I need to be doing. I probably won't get to doing this for a while, I just got a few more requests for other things and I'd like to get them out of the way before I start trying to learn something new. Once i clear my plate of stuff I'm in the process of doing I'll get to this one. So no rush if you do make something. ~VP
vBulletin v3.0.14, Copyright ©2000-2013, Jelsoft Enterprises Ltd.