Selective interpolation for models
Moderator: Graf Zahl
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
Selective interpolation for models
I don't *think* this is in, and I've no idea if it is actually possible, but I'll ask.
Model interpolation is great. It smooths things out very nicely for most models. However, some models actually look better without interpolation (for example some early Quake ports would have the flash from the nailgun moving smoothly across from one barrel to the other rather than flashing at one and then the other like it is supposed to, the torches on the wall in the starting area would also tend to look odd). So, would it be possible to have a modeldef flag to disable interpolation for specific models?
Presumably that wouldn't cause a problem (seeing as how originally GZDoom didn't have interpolation) but I don't know if forcing interpolation for individual models on a system where it isn't enabled would, so I'm not asking for that, but I am offering it up for consideration.
Model interpolation is great. It smooths things out very nicely for most models. However, some models actually look better without interpolation (for example some early Quake ports would have the flash from the nailgun moving smoothly across from one barrel to the other rather than flashing at one and then the other like it is supposed to, the torches on the wall in the starting area would also tend to look odd). So, would it be possible to have a modeldef flag to disable interpolation for specific models?
Presumably that wouldn't cause a problem (seeing as how originally GZDoom didn't have interpolation) but I don't know if forcing interpolation for individual models on a system where it isn't enabled would, so I'm not asking for that, but I am offering it up for consideration.
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
- Torr Samaho
- Developer
- Posts: 160
- Joined: Fri Apr 13, 2007 8:26
- Location: Germany
- Contact:
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
- Gez
- Developer
- Posts: 1399
- Joined: Mon Oct 22, 2007 16:47
Presumably, INTERPOLATEDOUBLEDFRAMES, PITCHFROMMOMENTUM, ROTATING and IGNORETRANSLATION.
There may be some I missed.
The first is so that when a frame is repeated (like a monster with frame AABBCCDD 2 for example, instead of ABCD 4), it looks better. The second can set the model's pitch according to the object's momentum (useful for things like rockets when they aren't on a horizontal path). The third makes the object constantly rotating like a Doomsday pickup. You probably shouldn't use it for a monster! The last presumably prevents translations from being applied to its skin.
There may be some I missed.
The first is so that when a frame is repeated (like a monster with frame AABBCCDD 2 for example, instead of ABCD 4), it looks better. The second can set the model's pitch according to the object's momentum (useful for things like rockets when they aren't on a horizontal path). The third makes the object constantly rotating like a Doomsday pickup. You probably shouldn't use it for a monster! The last presumably prevents translations from being applied to its skin.
- Torr Samaho
- Developer
- Posts: 160
- Joined: Fri Apr 13, 2007 8:26
- Location: Germany
- Contact:
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
How better? What does this do? What does the non interpolateddobleframes version not do that this does? I'm assuming it does something like allow the second frame to be intermediate between, for example, the first A and the First B rather than assuming that both A frames should look exactly the same?Gez wrote:The first is so that when a frame is repeated (like a monster with frame AABBCCDD 2 for example, instead of ABCD 4), it looks better.
- Torr Samaho
- Developer
- Posts: 160
- Joined: Fri Apr 13, 2007 8:26
- Location: Germany
- Contact:
The model interpolation code interpolates the model from one state with the one from the next state. If you now look at the imp for example:Enjay wrote:How better? What does this do? What does the non interpolateddobleframes version not do that this does? I'm assuming it does something like allow the second frame to be intermediate between, for example, the first A and the First B rather than assuming that both A frames should look exactly the same?Gez wrote:The first is so that when a frame is repeated (like a monster with frame AABBCCDD 2 for example, instead of ABCD 4), it looks better.
Code: Select all
See:
TROO AABBCCDD 3 A_Chase
If you apply INTERPOLATEDOUBLEDFRAMES, the model will be rendered as if the definition was ABCD 6 (although there is still a minor problem when interpolation from the last frame to the first), resulting in a smooth interpolation.
Unfortunately there is still a jerkiness I couldn't fix yet (suggestions welcome

- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- Torr Samaho
- Developer
- Posts: 160
- Joined: Fri Apr 13, 2007 8:26
- Location: Germany
- Contact:
You are referring to the interpolation that can be toggled by nomonsterinterpolation, right? Thanks for the hint, wasn't aware of this interpolation code.
Unfortunately it doesn't seem to do what I need. I made some experiments with the ZombieMan and from what I can tell the movement is only interpolated during the tic, where the actor is actually moved (every 4-th tic for the ZombieMan). Since the model frames are interpolated during all 4 tics, this still looks very jerky.
Unfortunately it doesn't seem to do what I need. I made some experiments with the ZombieMan and from what I can tell the movement is only interpolated during the tic, where the actor is actually moved (every 4-th tic for the ZombieMan). Since the model frames are interpolated during all 4 tics, this still looks very jerky.
- ZardoZ
- Posts: 12
- Joined: Tue Dec 25, 2007 23:37
My suggestion : ( i will try to explain.... hey, this not is my mother language!)
If i have a md2 or a md3 which the model of the barrel and a animation of 13 frames of the exploding barrel, i use this in the modeldef.txt to assign the sprite frames to animation frames ...
And GZDooM / ST, instead using a fixed time 3 tics per frame animation, use a one tic per frame animation, and runs between the frames. You will get a much more softer animation..... You will need to put something to know were model frames will be runned or not ..... I not very secured if you understand me, but i think that you will get the point very fast.
Other small suggestion .... Animated skins .... It will be great for some thing of Doom that can be better which a not animated mesh but which a animated skin (like some tech lamps that glows or for example .. the SoulSphere)
If i have a md2 or a md3 which the model of the barrel and a animation of 13 frames of the exploding barrel, i use this in the modeldef.txt to assign the sprite frames to animation frames ...
Code: Select all
<SomeKeyword to put this ON>
FrameIndex BEXP A 0 0 // Barrel before explode
FrameIndex BEXP B 0 3 // Frames of the explosion
FrameIndex BEXP C 0 6
FrameIndex BEXP D 0 9
FrameIndex BEXP E 0 12
Other small suggestion .... Animated skins .... It will be great for some thing of Doom that can be better which a not animated mesh but which a animated skin (like some tech lamps that glows or for example .. the SoulSphere)
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
- ZardoZ
- Posts: 12
- Joined: Tue Dec 25, 2007 23:37
Ok .. i was seeing the decorate files ... Understand that I'm "old school" doomer, and i never see how works a decorate file, and less that can redefined the animations to use more frames which less tic times and make more softer animations...ZardoZ wrote:My suggestion : ( i will try to explain.... hey, this not is my mother language!)
If i have a md2 or a md3 which the model of the barrel and a animation of 13 frames of the exploding barrel, i use this in the modeldef.txt to assign the sprite frames to animation frames ...
And GZDooM / ST, instead using a fixed time 3 tics per frame animation, use a one tic per frame animation, and runs between the frames. You will get a much more softer animation..... You will need to put something to know were model frames will be runned or not ..... I not very secured if you understand me, but i think that you will get the point very fast.Code: Select all
<SomeKeyword to put this ON> FrameIndex BEXP A 0 0 // Barrel before explode FrameIndex BEXP B 0 3 // Frames of the explosion FrameIndex BEXP C 0 6 FrameIndex BEXP D 0 9 FrameIndex BEXP E 0 12
Other small suggestion .... Animated skins .... It will be great for some thing of Doom that can be better which a not animated mesh but which a animated skin (like some tech lamps that glows or for example .. the SoulSphere)
A thing... why hells implement MD3 files, if after you not use 1/10 of the power of it ?
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
I suspect because lots of people asked for model support - which we have - but Graf has stated that it's not a huge area of interest for him so it has low priority. It's his hobby too remember, so it has to be fun for him as well.ZardoZ wrote:A thing... why hells implement MD3 files, if after you not use 1/10 of the power of it ?
