Possible to have multiple IFLs for one mesh?
by D B · in Artist Corner · 10/14/2005 (6:33 pm) · 8 replies
I've been having trouble with IFLs for a while, though I think I'm starting to see how they work.
From what I gather, if the enableIFL tag is on, then the IFL will accompany the specific animation with it, be it for a DTS or DSQ.
However, I am still having trouble trying to picture a way to have multiple IFLs for one mesh. It seems that one IFL can accompany each DTS, as per specific naming conventions.
Is there any way that I can have multiple IFLs for one DTS?
From what I gather, if the enableIFL tag is on, then the IFL will accompany the specific animation with it, be it for a DTS or DSQ.
However, I am still having trouble trying to picture a way to have multiple IFLs for one mesh. It seems that one IFL can accompany each DTS, as per specific naming conventions.
Is there any way that I can have multiple IFLs for one DTS?
About the author
#2
I tried creating multiple sequences whose frame range was based on different number of frames in the IFL. Both sequences export, but they each play the entire animation, that is, BOTH IFLs, instead of one per sequence. I dont even know if this is supported but like OP said it would be a big help.
07/17/2007 (9:11 am)
BUMP-a-diddlesI tried creating multiple sequences whose frame range was based on different number of frames in the IFL. Both sequences export, but they each play the entire animation, that is, BOTH IFLs, instead of one per sequence. I dont even know if this is supported but like OP said it would be a big help.
#3
Might need a code modification.
07/17/2007 (12:02 pm)
I guess you have to figure out how to set the IFL sequences to run on different frames. Unfortunately I beleive the range is already got certain animations for those frames like suspension and wheel turning.Might need a code modification.
#4
yup
:headbang:
heres the deal,
You can do multiple IFLs, but the sequence inside of the IFL has to match up with how you chunk up the keys. Huh? Basically, when you define a sequence, and assign it an interval, ALL IFLs will play the same sequence. That means you have to account for the position in each IFL where you do and do not want the IFL to play.
For example, if I have 2 IFL materials:
CommFLash1.ifl
and
CommFlash2.ifl
I want to be able to play these IFL sequences independently, to light up different lights at different times. When they are not lit up I want them set to a plain texture.
so if I have a plain texture, and 3 animated for CommFlash1, and 1 plain and 3 animated for CommFlash1.ifl, I first has my IFLs like:
CommFlash1.ifl:
plain.png 1
flash1.png 2
flash2.png 2
flash3.png 2
plain.png 1
CommFlash2.ifl:
plainB.png 1
flashB1.png 2
flashB2.png 2
flashB3.png 2
plainB.png 1
The problem was, no matter which sequence I played, BOTH IFLs played at the same time. What a pain in the ass. But actually, I found the right way to do it. If you want an object to have the same texture, while another is playing, it has to remain constant for the same number of frames in its own IFL. So my IFL files are now:
CommFlash1.ifl:
plain.png 1
flash1.png 2
flash2.png 2
flash3.png 2
plain.png 9 // THIS IS WHAT KEEPS THE TEXTURE CONSTANT WHILE THE 2nd IFL PLAYS
CommFlash2.ifl:
plainB.png 9 // THIS IS WHAT KEEPS THE TEXTURE CONSTANT WHILE THE 1st IFL PLAYS
flashB1.png 2
flashB2.png 2
flashB3.png 2
plainB.png 1
THe essence is that, there is 1 animation space for ALL IFLs - they all play the frames corrsponding to a sequence, wether it is their sequence or not - so you need to have frames to account for that.
Well, anyway it works, hope this can help someone (maybe OP...), and I hope I did not confuse it.
07/17/2007 (12:23 pm)
Sweetyup
:headbang:
heres the deal,
You can do multiple IFLs, but the sequence inside of the IFL has to match up with how you chunk up the keys. Huh? Basically, when you define a sequence, and assign it an interval, ALL IFLs will play the same sequence. That means you have to account for the position in each IFL where you do and do not want the IFL to play.
For example, if I have 2 IFL materials:
CommFLash1.ifl
and
CommFlash2.ifl
I want to be able to play these IFL sequences independently, to light up different lights at different times. When they are not lit up I want them set to a plain texture.
so if I have a plain texture, and 3 animated for CommFlash1, and 1 plain and 3 animated for CommFlash1.ifl, I first has my IFLs like:
CommFlash1.ifl:
plain.png 1
flash1.png 2
flash2.png 2
flash3.png 2
plain.png 1
CommFlash2.ifl:
plainB.png 1
flashB1.png 2
flashB2.png 2
flashB3.png 2
plainB.png 1
The problem was, no matter which sequence I played, BOTH IFLs played at the same time. What a pain in the ass. But actually, I found the right way to do it. If you want an object to have the same texture, while another is playing, it has to remain constant for the same number of frames in its own IFL. So my IFL files are now:
CommFlash1.ifl:
plain.png 1
flash1.png 2
flash2.png 2
flash3.png 2
plain.png 9 // THIS IS WHAT KEEPS THE TEXTURE CONSTANT WHILE THE 2nd IFL PLAYS
CommFlash2.ifl:
plainB.png 9 // THIS IS WHAT KEEPS THE TEXTURE CONSTANT WHILE THE 1st IFL PLAYS
flashB1.png 2
flashB2.png 2
flashB3.png 2
plainB.png 1
THe essence is that, there is 1 animation space for ALL IFLs - they all play the frames corrsponding to a sequence, wether it is their sequence or not - so you need to have frames to account for that.
Well, anyway it works, hope this can help someone (maybe OP...), and I hope I did not confuse it.
#5
07/17/2007 (1:34 pm)
Cool! Gonna have to try this one out.
#6
But, its all good though, because this will work. However, to 'simulate' simultaneous IFLs, I just need to sync up all the animations I want in blocks. I have 3 states, with 2 animations per state, which means I have 9 animation states. At 10 frames for each state, that means I would have 90 entries in each IFL. I hope I dont run into a limit here somewhere. But, anytime I can save ghosts by using animations the better. Also cool, is that I can animate the UV maps, just put them in an IFL.
07/17/2007 (2:16 pm)
One thing I noticed though is you cant seem to play multiple IFLs simultaneously. All the sequences are exported in thread 0. I suppose I'm pushing my luck to see if there is a way to get IFL sequences into another thread.But, its all good though, because this will work. However, to 'simulate' simultaneous IFLs, I just need to sync up all the animations I want in blocks. I have 3 states, with 2 animations per state, which means I have 9 animation states. At 10 frames for each state, that means I would have 90 entries in each IFL. I hope I dont run into a limit here somewhere. But, anytime I can save ghosts by using animations the better. Also cool, is that I can animate the UV maps, just put them in an IFL.
#7
I know you can have more than one IFL in a DTS. The tank pack does this for the treads. The only issue in making several in one shape is making sure that in sequences that have an IFL texture but you don't want the animation, you need to make sure that the texture is the same as the texture that is on frame 0 of the shape.
if you do this, it will only recognize the 'changing' IFL. note that for this to happen, you will have to return the other IFLs to the base state (same as frame 0) and make sure the IFL is held so that there is no change to that material for the duration of the sequence where you don't want it to play.
07/17/2007 (8:26 pm)
Sorry for a quick response here.. I know you can have more than one IFL in a DTS. The tank pack does this for the treads. The only issue in making several in one shape is making sure that in sequences that have an IFL texture but you don't want the animation, you need to make sure that the texture is the same as the texture that is on frame 0 of the shape.
if you do this, it will only recognize the 'changing' IFL. note that for this to happen, you will have to return the other IFLs to the base state (same as frame 0) and make sure the IFL is held so that there is no change to that material for the duration of the sequence where you don't want it to play.
#8
One other quick question is, are there known IFL limits? Such as maximum frames per shape or per IFL, maximum number of IFLs per shape, etc. I poked around the engine and forums but nothing popped up.
07/18/2007 (8:52 am)
Thanks Joe, One other quick question is, are there known IFL limits? Such as maximum frames per shape or per IFL, maximum number of IFLs per shape, etc. I poked around the engine and forums but nothing popped up.
Torque Owner D B