Jump to content
scotg

Vehicle animations

Recommended Posts

For landing gear animations, is that something that needs to be keyframed in OB, or would one simply set parameters in the model.cfg (e.g.: wheel parameters, turret range)?

Share this post


Link to post
Share on other sites

That's what I was hoping, but it turned out to not work so far. Gonna re-visit some working models' scripts.

Share this post


Link to post
Share on other sites

BTW, this is for a "heli" - quotes because it has no rotors but flies just like a chopper. I might have to make it a VTOL, using an airplane template.

I've been looking over that page as well. So far I'm still not sure which of my source names might be off. I don't stray from the established source names, but I do rename my named selections so I can remember what it is in English.

I'm importing .obj files for the model. Should I import them with gears retracted or extended initially? That probably has no bearing on the lack of animation, but it occurs to me it might be good to know once I solve the main problem here.

Share this post


Link to post
Share on other sites

extended is the usual way. Isnt there a sample helicopter? It might have a landing gear anim...

  • Like 1

Share this post


Link to post
Share on other sites

Last time I checked the sample heli, it had fixed gear. I think it was a dumbed down version of the Orca.

I still have not gotten the gear retracting to work, but after some play testing I decided to put skids on this vehicle and make it a VTOL. That means it will absolutely have to take off and land like a heli, but once it's good and aloft it will be able to fly like a plane. I suppose in the strictest usage of "VTOL" (vertical take off and landing), that's appropriate. Otherwise with wheels and gear, it would have technically been a VSTOL. Any rate, the knowledge gained here is not moot because I have a few other aircraft, for future development, featuring retractable gear. I will have to update the progress/setbacks on any of those projects' gear here, but later.

Share this post


Link to post
Share on other sites

Check the sample plane. It has a retracting gear. The model CFG skeleton and animations are the same for a helicopter.

  • Like 2

Share this post


Link to post
Share on other sites

will the animations work if the axis isn't strictly aligned on X, Y, or Z?

Share this post


Link to post
Share on other sites

Yep, just set your axis in the MemoryLOD.

 

For complex axis I import a Cylinder or something already aligned in my 3d model. Then I just collapse the cap verts in Object Builder using Shift+D.

  • Like 1

Share this post


Link to post
Share on other sites

Yep, just set your axis in the MemoryLOD.

 

For complex axis I import a Cylinder or something already aligned in my 3d model. Then I just collapse the cap verts in Object Builder using Shift+D.

That's kind of what I have been doing with the instruments' and wheels' axes. I make it a point to have two vertices within any rotating element so I can copy-paste them exactly where they should go into the memLOD, even if it's just two points of a triangle floating within a non-cylinder object. I just wanted to check if maybe it wouldn't work with gears for some reason, but apparently that's not the problem.

Share this post


Link to post
Share on other sites

Two things now:

1) Although I gave this VTOL skids, it still works better and looks better if they are retracting. I'm back on the case; go figure.

 

2) Upon making the switch from heli to a VTOL, I've discovered that none of the parts animations are working. Also, the flight is very squirrely and seems inconsistent. Is there an extra LOD needed for aircraft? The sample plane has a "geometry phys" LOD, but I've seen some other .p3d's with "4e+013 physx" LODs. Are these the same? I can't tell, because I can only see a visual 3D representation of the sample plane.

Share this post


Link to post
Share on other sites

thrust animation source does not work for PlaneX simulation. And of course none of the RTD sources (exclusive for helicopter).

geo Phys LOD is correct. The other p3d are propably older, or simply wrong. No extra LOD. Mass distribution in Geo LOD plays a role in how the aircraft behaves.

  • Like 1

Share this post


Link to post
Share on other sites

thrust animation source does not work for PlaneX simulation. And of course none of the RTD sources (exclusive for helicopter).

geo Phys LOD is correct. The other p3d are propably older, or simply wrong. No extra LOD. Mass distribution in Geo LOD plays a role in how the aircraft behaves.

Ok, so... wrapping my brain around all that. If my geoPhys looks different than my geo, LODs, shadow, etc, then will that affect anything else besides how it moves?  Think like this: If I have an object that looks like a brick, is durable like a brick, compact like a brick, and hits hard like brick, yet it's also nimble and can fly like a bumblebee AND an eagle (because technology :-P ), then changing its distribution of mass is simply a matter of location in geoPhys rather than relative appearance in geo LOD. Is that right? BTW, It may sound like a heckuva beastly aircraft, but I'm not just making some over-powered, small, dominating-the-game vehicle here. It will be able to dominate for only short bursts, if at all, because its small size will not allow it to carry much fuel, ammo, or armor. That's the tradeoff.

Ok I'm still not sure why I don't see animations or parts movement. I looked at the USAF mod with its CV-22 for an example of how to set up some things. Because of that, my vehicle flies like a good ol' VTOL now (aside from the above issues with mass distribution causing squirreliness). However, its rudders, flaps, ailerons, engines, and gear are still just static. I double checked all names, and even if I had mistyped one or two of the named selections, then still at least something would be working. Within their CV-22 .pbo file, there was a _BASEBODY.p3d - which I can't tell if I need something similar for my set up or what. All its extra .sqf scripts pertain to the ramps and loading/lapesing, the big wing folding/packing up animations, moving around inside the cargo area, and the custom menus. None of which do I need for my little one-man assault VTOL. Seeing as how BIS have yet to release their VTOLs from encryption, the USAF mod was the best example I could find.  Basically, I need to find out what am I missing that the CV-22 isn't, in order to make my aircraft look better as it flies and lands.

For those following and helping: A great big thanks to you guys. I'm sorry my posts are so long, but I just try to be a thorough as possible when helping others to help me. Thanks for your continued patience!!

Share this post


Link to post
Share on other sites

mass distribution is not made in geoPhys. Geophys has no mass whatsoever. Only Geo LOD has mass and distribution. Geo Phys is only for physx on physx collisions

Share this post


Link to post
Share on other sites

mass distribution is not made in geoPhys. Geophys has no mass whatsoever. Only Geo LOD has mass and distribution. Geo Phys is only for physx on physx collisions

The sample plane actually has a super low mass of 10 in geoPhys, whereas it has a mass of around 6500 and buoyancy value of 1 in Geo, but I kind of get what you're saying. Maybe what I don't get is what physx actually does?

Priority right now, however, is figuring out why the animations don't work... I thought it may have been something to do with the model itself, but if it's the config then should I re-post in that forum section?

Share this post


Link to post
Share on other sites

well, so far I have been a lot more successful in getting the VTOL to fly properly, but just flying and not animating. The main issue was because I had the whole model sitting on the center of gravity like it was the ground.

 

I'm still having absolutely no luck with getting the parts to move. I've checked my skeleton and named selections again and again; I've tried other config.cpp and model.cfg file as templates, including BIS samples and the Blackout model.cfg. I've tried renaming the model and its class in CfgModels.

 

My first car, the LM002, is working well, and all parts are moving. The little helicopter I'm working on has working rotors and pilot stick; even its turret works if I include a gunner potion. So it's a real headscratcher why I can't get this one to animate apart from flying. I wanna say it's not errors in the configs, since the ones I referenced worked in other vehicles just fine. Also, whatever vehicle .cfg file I used I made sure to also use its .cpp file. I'm sure I missed a step or two, but which one(s)? <headdesk>

EDIT: Feeling retarded... It was a missing comma in my model.cfg SkeletonBones. The BIS AddonBuilder went ahead and created the PBO anyway, but I guess I should learn to use mikero tools since supposedly they wouldn't let such an error pass... and since I did give the guy money. I'm actually scared I'd get nothing accomplished at all using mikeroTools; with all the extra clutter I haven't cut from my scripts I might never see results.

 

Share this post


Link to post
Share on other sites

New problem... It seems straight forward, but the exhaust effects are not moving with the engines as they turn for VTOL mode. Also, I have two additional exhausts hard-fixed, but there's no visual effect at all. I have them all set like:

 

                        "engines", "",
			"rotor_1", "engines",
			"rotor_2", "engines",
			"rotor_3", "",
			"exhaust1", "engines",
			"exhaust2", "engines",
			"exhaust1_dir", "engines",
			"exhaust2_dir", "engines",
			"exhaust3", "",
			"exhaust4", "",

Maybe I've exhausted the limits of the engine?

EDIT: I guess I deleted my exhaust 3 and 4 parameters in the config.cpp. Re-inserting the proper lines makes all 4 appear.

Share this post


Link to post
Share on other sites

particle effect memorypoints for stuff like exhaust particles cant be animated (BIS found out themself with their APEX vtol)...

  • Like 1

Share this post


Link to post
Share on other sites

While we stew on why the exhaust effects aren't moving, here's a quick few new items to work on:

1) The custom landing skids are animating just fine, but the craft does seem to roll around on them too easily, as if they were wheels. It spawns just fine, but the moment the engine comes on I can turn the entire vehicle before I can lift off. It also raises off the ground about 2in(5cm) and seems a little bouncy. If I land it with gear up and tilt it back on its tail, part of the craft will sink into ground. It then will reach a certain angle of tilt and finally pop itself up out of the ground, about 35 degrees.

2) Is there a pilot animation that sits as though in an F16 cockpit, where the stick is on the pilot's right armrest area?

3) How can I make certain animations delay? Specifically, the canopy has a double hinge, and there needs to be enough time for the first hinge to open before the next one can fully swing out. Testing it in game, and there's major matter phasing going on.

Share this post


Link to post
Share on other sites

particle effect memorypoints for stuff like exhaust particles cant be animated (BIS found out themself with their APEX vtol)...

POOP! I find it odd that it can leave a trail but not redirect its location and angle.

What about hiding the effects? maybe make it show/hide at key angles using a lot more mempoints?

Share this post


Link to post
Share on other sites

3) How can I make certain animations delay? Specifically, the canopy has a double hinge, and there needs to be enough time for the first hinge to open before the next one can fully swing out. Testing it in game, and there's major matter phasing going on.

At the time I wrote this, my canopy was "functioning," meaning that even though there was object clipping occurring it was still opening and closing in game. Tweaking around with the min/max values and adding a secondary animation for the delayed components made the timing work perfect in buldozer. Once I packed it and tried it in-game, however, it now spawns in "open" state and doesn't close/open when getting in/out. It does make the character wait for the duration of the animation - whacky. I'm gonna play around with timing values again to see if maybe I got it all backwards.

EDIT: Turns out it was not backwards, but I had changed animPeriod = 0.0 to animPeriod = 3.0 for all components, making the time lapse so slow that it looked like it was doing nothing. I was thinking that was the time, but I guess it's the time adjuster. Making it a 1.0 helped, but putting it back to 0.0 made everything back to normal. Now I've noticed a delay in the start of the canopy animation, as if the cabin sequence is waiting on another sequence to start. The delay only occurs when entering the vehicle, not when already seated and turning it off then on.

 

Share this post


Link to post
Share on other sites

For anyone interested, here are some pics of the vtol we've been talking about:
Parked

Flight Over Stratis

 

Maybe it helps to put the technical talk into perspective.

 

I'm still developing the instrument layout and interior. I will eventually be adding dynamic decals for identification numbers, insignias, and warning labels. Meantime, I have another small VTOL on ground problem. See pics below.

Here's what this 2nd vehicle looks like when loaded as an airplane/VTOL:
Day Off - empty

Ruh Roh, Trubbled Bubble - with pilot, pre-flight

 

Here it is scripted with a helicopter config.cpp:
Sitting Trubble - empty
Flight Prep - with pilot, pre-flight

 

The helicopter version sits properly when at rest, but heli physx involves leaning forward to move forward, which looks and is wrong for this vehicle. Unfortunately, the VTOL config causes the craft to spawn semi-hovering. The model is placed at the center of the world (Max) or pin (OB). Its mass is very low, as should be expected for a flying golf cart. I tried to "fake" the rested tilt look by tilting all LODs the proper amount. This made it look better at spawning, but also impossible to control as it is.

Helicopters have settings for lift power. Do airplanes have a similar setting but for thrust? I feel like that could help with its instability.

Share this post


Link to post
Share on other sites

Here's a new question under the same topic: How do I specify two animations to happen under the same user-defined key? Further explanation: I have two wings that for now I want the player/user to be able to fold/unfold for storage, taxiing, etc. When I test the animation in Buldozer, they are automatically set to different occurrences (user16 for the left wing and user17 for the right one). It's my first time adding user defined animations to any model, so I was happy to see it sort of working, but I want them to work together, just like the ailerons or flaps do even in bd. I have yet to create the config.cpp file, but I don't think bd accesses that anyway. This is for a more standard airplane (i.e.: not a VTOL).

As for previous help requests... The trouble with the Sky Hawk (green VTOL, above) not sitting on its landing skids has been resolved, sort of. I had to remove a supplemental ground contact memory point that I had placed to prevent landing hard on its tail. It was a remnant of something I do for helicopters, but since that point was higher than the other points it created an unstable ground balance as a VTOL. I have still no success with the flight pod/trubble bubble (white VTOL, above) working as a stable VTOL. I think its geometry is too compact and light weight to function predictably, at this point.

As usual, any help is always appreciated!

Share this post


Link to post
Share on other sites

You can put multiple animate statements in your UserAction

 

eg.

CONFIG.CPP

class AnimationSources : AnimationSources {
	class Wing_Left_Fold {
		source = "user";
		animPeriod = 1;
		initPhase = 0;
	};
	class Wing_Right_Fold : Wing_Left_Fold {};
};

class UserActions : UserActions {
	class Wings_Fold {
		displayName = "Fold Wings";
		textToolTip = "";
		shortcut = "";
		priority = 2.0;
		position = "";
		radius = 2;
		showWindow = 0;
		onlyForPlayer = 1;
		condition = "(this animationPhase 'Wing_Left_Fold' < 0.5) AND (alive this)";
		statement = "this animate ['Wing_Left_Fold', 1]; this animate ['Wing_Right_Fold', 1];";
	};
	class Wings_UnFold : Wings_Fold {
		displayName = "UnFold Wings";
		condition = "(this animationPhase 'Wing_Left_Fold' > 0.5) AND (alive this)";
		statement = "this animate ['Wing_Left_Fold', 0]; this animate ['Wing_Right_Fold', 0];";
	};          
};

 

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×