Firehead 0 Posted October 8, 2009 I've successfully got an animation to play in Buldozer, but I came accross something unforseen by myself. I have an object rotating around an axis, but as it does that, it deforms, scruching itself. Not sure what it is doing, but it will take a perfectly round object, and make it oval shaped. Obviously, this isn't what I want, and after viewing some BIS sample models, it doesn't happen to them. Got any ideas? Share this post Link to post Share on other sites
norsu 180 Posted October 8, 2009 (edited) Are they part of damageHide selection? If yes then they will deform when animated. If you want to have the animated parts disappear along with damageHide, you should make them child objects of damageHide or damageVez (turret damage) in model.cfg and make them as their own selections in the actual model. If the animated parts don't need to disappear with damageHide, then just give them their own selections and do the model.cfg as usual. I'm not very good explaining this but hopefully you understood :). Edited October 8, 2009 by Norsu Share this post Link to post Share on other sites
Firehead 0 Posted October 8, 2009 No, they are not part of the damageHide selection, the model didn't have one, niether did the config. I also tried setting them up to have it, and the animation won't even play it now. I'm really new at this, so bare with me. All my work I have been doing off of the available tutorials, and looking at examples BIS released. Share this post Link to post Share on other sites
Firehead 0 Posted October 9, 2009 After a little bit of sleep, I figured out my problem. But I've run into another! Surprise! I'm trying to animate a landing gear, I got the main strut to rotate up into the fuselage, but I can't get the rest of the landing gear to move at all. Does it have to do with the order in which I place "bones" in the skeleton config portion? Share this post Link to post Share on other sites
Fortran 1 Posted October 9, 2009 Yes you need to parent the bones in the bone definition. Example: "f_gear_1","", "f_gear_2","f_gear_1", f_gear_2 is the child of f_gear_1 in this example, so when f_gear_1 moves so will f_gear_2 Share this post Link to post Share on other sites
Firehead 0 Posted October 9, 2009 Here is some of the code I'm having problem, annotated in the code is places where I'm having issues: class Gear: Rotation { type="rotation"; scource="Gear"; selection="gear"; axis="gear_rotate_axis"; memory=1; minValue="0.000000"; maxValue="1.500000"; angle0="0.000000"; angle1="1.700000"; }; //Originally I couldn't get "gear_pad" to animate. Now it does, but Gear doesn't animate anymore. Insight? class Gear_pad: Gear { type="rotation"; source="Gear"; selection="gear_pad"; axis="pad_rotate_axis"; memory=1; minValue="0.000000"; maxValue="1.500000"; angle0="0.000000"; angle1="-1.700000"; }; //Ramp works fine, no issues. class Ramp: Rotation { type="rotation"; source="userAction"; selection="O01"; axis="axis_O01"; memory=1; minValue="0.000000"; maxValue="1.500000"; angle0="0.000000"; angle1="0.04800"; }; //this is where I run into issues. There are 4 parts to this animation, each its own section. Of the 4 sections, only RightBay, and RightPod work correctly. The entire left side refuses to animate at all. class LeftBay: Rotation { type="rotation"; source="Weapons"; selection="bay-port"; axis="axis_bay-port"; memory=1; minValue="0.000000"; maxValue="1.500000"; angle0="0.000000"; angle1="-1.575000"; }; class RightBay: LeftBay { type="rotation"; source="Weapons"; selection="bay-starb"; axis="axis_bay-starb"; memory=1; minValue="0.000000"; maxValue="1.500000"; angle0="0.000000"; angle1="1.575000"; }; class LeftPod: RightBay { type="rotation"; source="Weapons"; selection="pod-port"; axis="axis_pod-port"; memory=1; minValue="0.000000"; maxValue="1.500000"; angle0="0.000000"; angle1="-2.800000"; }; class RightPod: LeftPod { type="rotation"; source="Weapons"; selection="pod-starb"; axis="axis_pod-starb"; memory=1; minValue="0.000000"; maxValue="1.500000"; angle0="0.000000"; angle1="2.800000"; }; Share this post Link to post Share on other sites
norsu 180 Posted October 9, 2009 Do you have class Rotation; at the beginning of model.cfg? Share this post Link to post Share on other sites
Firehead 0 Posted October 9, 2009 Yes, I do. Some things are animating, where others are not. If one thing animates, something else seems to stop working. Like I said, I had "gear" moving like it was supposed to, whatever I did to make "gear_pad" move, made "gear stop moving. Not sure what is up. Share this post Link to post Share on other sites
Jackal326 1181 Posted October 10, 2009 After a little bit of sleep, I figured out my problem... Any chance you could share your solution, as I too have had the same issue with the animated bolt on a few sniper-rifles I've been trying to make, they just stretch/shrink and contort all over the place. So, if you could share your solution I'd be very appreciative. Share this post Link to post Share on other sites
Firehead 0 Posted October 13, 2009 Jackal: I can't really remember, but I think it was becuase I hadn't defined part of the model in the "sections" portion of cgfModels, so when the skeleton went to animate it, it deformed, becuase i didn't tell it that it was a solid section. I fixed just about single problem I've had so far, but I still can't get the landing gears to animate as one whole piece. This is how I have the skeleton stuff set up: "gear", "", "front_pad", "gear", "gear_pad", "gear", "gear"piston_front", "gear", "pad_piston_rear", "gear", "", I did that stuff based on a BIS example, but each section animates itself under a different animation name(O2 defines them as User0,User1,User2,ect ect), even though I have defined them all from the same source(Gear). Any ideas? Share this post Link to post Share on other sites
Firehead 0 Posted October 13, 2009 Okay, fixed some of the issue I was having. I got 5 of the 6 parts to animate at once. I still can't get the main strut("gear") to animate with the other 5 parts. Here is the code: "gear", "", "gear_pad", "gear", "pad_front", "gear_pad", "pad_piston_front", "pad_front", "pad_piston_rear", "gear_pad", "landing_lights", "", Seems no matter what I do, gear won't animate with everything else. Solutions? ---------- Post added at 12:30 PM ---------- Previous post was at 10:50 AM ---------- Got it all sorted out, the animations work beautifully. Share this post Link to post Share on other sites
[aps]gnat 28 Posted October 15, 2009 Think you have them the wrong way around. "" comes first (ie model root) then comes "gear" etc Tip I've said before. always do these defintion in pairs. They belong in pairs and its FAR easier to read and check. "","gear", "gear_pad","gear", "pad_front","gear_pad", "pad_piston_front","pad_front", "pad_piston_rear","gear_pad", "","landing_lights", Share this post Link to post Share on other sites
Firehead 0 Posted October 15, 2009 From my understanding that wouldn't work. I ended up getting it to work, and the code I posted was correct. The second "", is the parents object, and the first "", is the child. The code reads in pairs, so if I did it your way, it would try to read the "gear" is part of "gear_pad", instead of "gear_pad" being a part of gear, becuase of the first "",(an empty object). That would have jacked things all up. Simply put, the second object would become the child object, and the first the parent, which doesn't work. I tried doing the code side by side like that, and O2 wouldn't even recognize it IIRC. Share this post Link to post Share on other sites
[aps]gnat 28 Posted October 17, 2009 A brain-fart. I don't have access to my own files. Yes, "" forms the last part of a pair, when defining a root body bone (opposite to my note above). Be sure to drop the last , from a definition. Share this post Link to post Share on other sites