Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Tue Mar 19, 2024 3:39 am
All times are UTC + 0
Condition States, Transition States, and Transition Keys
Moderators: Generals Moderators, Global Moderators
Post new topic   Reply to topic Page 1 of 1 [3 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
206UE
Missile Trooper


Joined: 07 Jan 2010

PostPosted: Mon Jul 28, 2014 6:43 am    Post subject:  Condition States, Transition States, and Transition Keys
Subject description: Tell me what you know about it.
Reply with quote  Mark this post and the followings unread

I need an explanation of unit's : Condition States, Transition States, and Transition Keys.

I've noticed that some modifiers add pieces to their units. Example : Bay doors on an RAH-66, or landing gear on a fighter plane. Is there a reason these parts are separated from the main W3D? I've been messing with W3D files, but the progress is so slow it's almost non-existent.

Back to top
View user's profile Send private message
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Mon Jul 28, 2014 6:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

The Condition States, Transition States and Transition Keys define what model and/or what anim to show during which 'state'. Most of the time, this is simply used to show a damaged variant of a model when heavy damaged, and a wrecked version as it is killed. This is done with Condition States.

Transition States and Transition Keys are a bit more difficult. An example of using Transition States is for deploying units, like the Chinese Nuke Cannon. This way it can fluidly deploy, undeploy, but also reverse the deploy anim halfway into the anim (as in: order to fire, but give it a move order halfway in the deploy anim).

Vehicles are the most simple ones when it comes to Condition States, Transition States and Transition Keys. Only a few exceptions that have actively moving parts are a bit more complex, but with some comparing it is still easy to see what they do.
Structures can be a bit harder, as those use anims more often, but also have the 'problem' (if you can call it that way) of needing combinations of Condition States. A common structure has definitions for:
-normal
-damaged (half health)
-reallydamaged (quarter health)
-normal snow
-damaged snow
-reallydamaged snow
And also one of each for night maps.

As you can see, this can quickly add up, even without any animations. Again, comparing how structures work (take simple ones without any anims). They also tend to use completely different W3D Draw modules for different states. A common example is to handle the 'normal' structure drawing as a single module, and make the entire buildup animation (with all variants) be a different one. Structures (especially factories) are also a common user of splited models as you asked. I will come back to that in a tad.

Lastly, we have infantry. To be honest, infantry are a bitch to get right. You need to link the proper skeleton to the proper model, or else you get horribly mismatching animated infantry. Best bet is to stay away from those for now, and first figure out how basic model drawing works. Infantry are also the prime user of Transition Keys.

To come back to your question about why some models are split up in different parts, we will take a look at the Chinese War Factory. It has several animations: a moving conveyor belt which moves no matter what happens, a crane that anims when idle but moves when repairing a vehicle, and of course the door opening and closing when vehicles are constructed.
Lets say we put this all into the same model which also contains the main factory model. Our first problem: how does the game know which part to animate for which state? Continues anims like the conveyor belt can be done this way, but the door is a big no-no this way.
A second problem that goes unnoticed initially but will show itself when you get to modelling stuff yourself, is that if all anims are in the same model, it is a tough job to get all your anims to loop properly. This is especially if they have different animation speeds.
In short: splitting them up to different sub-models makes them able to act independently from each other. Of course, it does not guarantee prevention of any other fuckups, as you are still limited to a limited amount of Condition / Transition States.

Best advice as mentioned before is to compare how models work ingame and check the codes. After that, trial & error is your best friend Wink

Back to top
View user's profile Send private message Send e-mail Skype Account
206UE
Missile Trooper


Joined: 07 Jan 2010

PostPosted: Wed Jul 30, 2014 5:26 am    Post subject: Reply with quote  Mark this post and the followings unread

7hanks Dutchygamer, you are a great help. I understand more now. I'd like to make a tutorial on this subject once I have an expert level of understanding. So, vehicles like the RAH-66 Comanche have the bay doors separated from the main W3D so that the Rotor animation doesn't conflict with the bay door animation. 7his is all very interesting.


[edit]
I've just learned that a "Transition State" requires a model, eventhough the ini files are hardcoded to not mention "Model =" in the Transition State.

If you are going to use a transition state, the condition state must have a transition key.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1401s ][ Queries: 11 (0.0074s) ][ Debug on ]