Jump to content
Sign in to follow this  
-=ENGENER=-

Anim problem

Recommended Posts

it was a quick example dude, play around with door axis, get it away from door itself. the prob by the example is that the axis is inside the door.

you can also try change animationtype "rotation" to animationtype "direct", but im quite sure that it is placement of the axis.

and pls use your own naming, or delete at least the sc9.

Share this post


Link to post
Share on other sites

I had the same problem with one of my animations, the only was i fixed it was making my object inherit from 'StaticWeapon', the use the nameas to make it appear as something else.

I think creating the animation in oxygen will fix this problem but remains untested.

so try this:

class CfgVehicles

{

class staticweapon;

class SmallGateW : staticweapon

{

Share this post


Link to post
Share on other sites

I already gave you a working model.cfg example, but now I realise that there is two ways you can be wanting to use your model.

If you just want to use it from the editor it should work with a properly written config and the model.cfg when binarizing.

If it is also meant to be embedded in a .wrp file the class name must be the same as the modelname and MUST begin with 'Land_'.

For example your model is called noddyshouse.p3d, then the classname in the config must be "Land_noddyshouse".

If not then animations will not work in .wrp files, but may still work in the editor.

Planck

Share this post


Link to post
Share on other sites

Plank, I speak you still time, it does not work correctly, here the reference to archive with files addon if you can force this p3d animating as it is necessary, thanks files

Share this post


Link to post
Share on other sites

Ok ENGENER, got it working ok ingame.

PM me your email address and I'll send it back to you.

Planck

Share this post


Link to post
Share on other sites

Plank, senks for attempt, but not animated smoothly and with jerks in  2 stages

Share this post


Link to post
Share on other sites

Yes, it is true that the animation is jerky, but I have never been able to smooth it at all, might be an ArmA 'feature'........good luck finding a cure, because I never have..........yet

Planck

Share this post


Link to post
Share on other sites
Quote[/b] ]It cannot be a congenital problem of a statics in ARMA (look the BIS  house)

Whats the class name for the BIS house you mentioned? The BIS outside toilet also uses animations, and suffers from the same jerky movement.

Quote[/b] ]good luck finding a cure, because I never have

One way to fix it, is with scripts. Define your animation period as 0.001. Then run something like this:

Open.sqf:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Phase=0;

WaitUntil

       {

       _House Animate ["doorRanim",_Phase];

       _Phase=_Phase+0.001;

       Sleep 2;

       (_Phase>1)

       };

That should give you a smooth animation, for whatever speed you want. Just change the value of sleep to speed up or slow down the animation.

Share this post


Link to post
Share on other sites

On Saharni there are many houses where animation normal Thanks for a script I shall try it in operation

Share this post


Link to post
Share on other sites

you cant compare bis houses and community addon. they have a way to write the animations inside the p3d. no cfg skeleton and no cfg model needed for original stuff. so it really is possible that at the moment only jerky animation is possible. workaround would be a cfg as turret i guess, they move smooth. animperiod=0 also is smooth, or lets say to fast to be jerky.

whith changing animperiod i can regulate the steps the door do, so it seems to be related. the script looks good btw, think this should work

Share this post


Link to post
Share on other sites
Quote[/b] ]you cant compare bis houses and community addon. they have a way to write the animations inside the p3d. no cfg skeleton and no cfg model needed for original stuff

rofl.gif have you ever heard about binarization ?

Share this post


Link to post
Share on other sites

well instead making fun of others, you can do an example, binarizei it, lets see if its smooth then. shouldnt be a prob for you, when we have the same possibilities like bis its a thing of minutes. prove it.

Share this post


Link to post
Share on other sites

The PBO I sent back to ENGENER was binarized.

The animations were set in a model.cfg file which was present during binarization, so the animations were incorporated to the model during the process.

Nevertheless, the animations are still jerky.

Must be some magic ingredient missing. tounge2.gif

Planck

Share this post


Link to post
Share on other sites

like i said. something is missing, maybe keyframe properties were used for smoothing the animation, who knows.

mlod arma houses with proper config and binarization

brought ingame also have the prob as far i tested it.

the missing magic ingredient. tounge2.gif

i saw a film years ago where a magic ingredient was used for building the best armor platings. the manufacturer sold his factory to someone else. this guy was keen to know what exactly the magic ingredient is, he bought the factory just to find that out. so he asked the previous owner to show him the magic ingredient. that guy took the hand of the new owner, spit on it and said "analyze this" whistle.gif

Share this post


Link to post
Share on other sites

Anyone found a solution to this jerky Building class animation problem ... ?

<span style='font-size:12pt;line-height:100%'>                         Its very annoying !!</span>

Youtubed example sad_o.gif

Can't see the special ingredient in the BIS provided sample files ...

Share this post


Link to post
Share on other sites

What is the exact cause of the problem?

I mean. Have you looked at the increments of the animation source over time? i.e Is the animation source incrementing in smaller steps than the animated parts of your model. Or does the anim source appear to increment at the same rate as the animated parts?

Share this post


Link to post
Share on other sites

Same animation source is used for other user commands on say Aircraft and Vehicles with no problems.

It only seems like Building class has the issue.

I've experimented with various methods and there seems to be no setting that change the behaviour.

I've opened the various configs and model.cfg for BIS buildings, added a couple extra lines that they have ... and still nothing changed.

There is smooth movement *between* the jerks, but it seems there is always X number of jerk per second.

BTW, Rotation and Translation act the same.

Quote[/b] ]class cfgModels

{

class building;

class TAKR_G1: Building

{

skeletonName = "TAKR_G1Bones";

sectionsInherit="";

sections[]=

{

};

class Animations

{

class elevX

{

type="translation"; // The type of animation.

source="MoveX1"; // The controller that provides input.

selection="lift1"; // The name of the skeleton bone used.

begin="offsetx0";

end="offsetx1";

minValue=0.0; //The minimum value of the motion range. i.e. The controller input when animation phase is 0.

maxValue=1.0; //The maximum value of the motion range. i.e. The controller input when animation phase is 1.

offset0=0;

offset1=1;

};

};

};

Quote[/b] ]

class CfgVehicles

{

class All;

class Static:All

{

class UserActions;

};

class building: Static{};

class buildBase: building

{

// class NewTurret; // External class reference

class AnimationSources; // thanks to RockofSL

};

..........

.........

.........

class TAKR_G1: buildBase

{

vehicleClass="Armored";

scope=protected;

side=TEast;

displayName="x_TAKR_G1";

accuracy=1000;

fuelCapacity=90;

armor=3000;

cost=100000;

irTarget=false;

hideUnitInfo=true;

model="\TAKR_Kuz\TAKR_G1.p3d"

icon=\TAKR_Kuz\X.paa;

ladders[]={{"start","end"}};

animated = true;

class AnimationSources: AnimationSources

{

class MoveX1 // Should be the same as your selection name.

{

source = "user"; //The controller is defined as a user animation.

animPeriod = 30; //The animation period used for this controller.

initPhase=0; //Initial phase when object is created. 0 = CLOSED

};

};

class UserActions

{

class Elev1a

{

displayName="Elevator 1 Down";

position="e1button";

radius=10;

onlyForPlayer = 0;

condition="(this animationPhase ""elevX"" == 0)";

statement="this animate [""elevX"",1]";

};

class Elev2a

{

displayName="Elevator 1 Up";

position="e1button";

radius=10;

onlyForPlayer = 0;

condition="(this animationPhase ""elevX"" == 1)";

statement="this animate [""elevX"",0]";

};

};

actionBegin1 = Elev1a;

actionEnd1 = Elev1a;

};

Share this post


Link to post
Share on other sites
Quote[/b] ]It only seems like Building class has the issue.

That’s what I was thinking. Class static e.t.c appears to take a lower priority than the other classes. It becomes even more apparent in MP.

Can you get away with making your animated sections, as seperate objects using a different class?

Share this post


Link to post
Share on other sites
Can you get away with making your animated sections, as seperate objects using a different class?

It is a separate object already, but its got to not fall into the sea etc when being interacted with.

Any class suggestions ?

Share this post


Link to post
Share on other sites
Quote[/b] ]Any class suggestions ?

I'm sure you know more about animating (ships or whatever), than I do. But for what it's worth, I think class thing would not be a bad start?

Apart from the fact that it appears to be underused in general, BI do use it for the barrel class. Also, it's easy to convert class static to class thing in the config. But perhaps I’m just lazy smile_o.gif So either thing or ship, at least class ship should cope better in water?

Share this post


Link to post
Share on other sites
Guest RKSL-Rock
Gnat @ May 27 2008,23:45)]
Can you get away with making your animated sections, as seperate objects using a different class?

It is a separate object already, but its got to not fall into the sea etc when being interacted with.

Any class suggestions ?

CBFASI and I had this issue, we ended up having to use the Tank class. I've not found a way to smoothly animate houses.

Share this post


Link to post
Share on other sites

Solved the Issue with a config.cpp template Sgt.Ace handed me years ago.

The magic ingredient lays in the config.cpp, not model.cfg.

You can get smooth animations by inheriting your Object from Class All:

class CfgVehicles
{
[i]	class All;
class [b]YOUR_TAG_[/b]Test_House : All {
	scope = 0;
	irTarget = false;
	side = 3;
	icon = "iconStaticObject";
	nameSound = "object";
	simulation = "house";
	picture = "pictureStaticObject";
	model="";
	sound = "Building";
	placement = "vertical";
	ladders[] = {};
	vehicleClass =  "";
	displayName = "";
	coefInside = 1;
	coefInsideHeur = 0.25;
	mapSize = 7.5;
	animated = true;
	armor = 200;
	destrType = "DestructBuilding";
	damageResistance = 0.004;

	class DestructionEffects {
		class Sound {
			simulation = "sound";
			type = "DestrHouse";
			position = "destructionEffect1";
			intensity = 1;
			interval = 1;
			lifeTime = 0.05;
		};

		class DestroyPhase1 {
			simulation = "destroy";
			type = "DelayedDestruction";
			lifeTime = 2.5;
			position = "";
			intensity = .1;
			interval = 1;
		};

		class DamageAround1 {
			simulation = "damageAround";
			type = "DamageAroundHouse";
			position = "";
			intensity = .1;
			interval = 1;
			lifeTime = 1;
		};
	};
};

class [b]YOUR_TAG_[/b]Housebase : YOUR_TAG_Test_House {
	scope = 1;
	model = "";
	displayName = "";
	animated = true;
	vehicleClass = "[b]YOUR_TAG_YOUR_VEHICLECLASS[/b]";
	nameSound = "house";
	accuracy = 0.2;
	typicalCargo[] = {};
	destrType = "DestructBuilding";
	transportAmmo = 0;
	transportRepair = 0;
	transportFuel = 0;
	mapSize = 11;
	cost = 0;
	armor = 800;
};[/i]

[size="4"]	class Land_YOUR_TAG_Fancy_Building_With_Doors : [b]YOUR_TAG_[/b]Housebase
	{[/size]
		...


I suggest renaming this Thread to "Stuttering/jerky Animation".

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
Sign in to follow this  

×