Author Topic: EFF'ing Head.ani's!  (Read 22188 times)

0 Members and 1 Guest are viewing this topic.

Offline niffiwan

  • 211
  • Eluder Class
Could you please send a patch my way?  Thanks
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Rodo

  • Custom tittle
  • 212
  • stargazer
    • Minecraft
    • Steam
Tested them.

texture_streaming one presents no stuttering at all.

trunk presents the stuttering problem, no doubt about it because it's really noticeable.

I don't even know how was I capable of playing FS2 with this horrible thing all the time.
el hombre vicio...

 

Offline Valathil

  • ...And I would have had a custom title if it wasn't for you meddling kids!
  • 29
  • Custom Title? Wizards need no Custom Title!
**** Yes.
┏┓╋┏┓╋╋╋╋╋╋╋╋╋┏┓
┃┃╋┃┃╋╋╋╋╋╋╋╋╋┃┃
┃┃┏┫┃┏┳━━┓┏━━┓┃┗━┳━━┳━━┳━━┓
┃┃┣┫┗┛┫┃━┫┃┏┓┃┃┏┓┃┏┓┃━━┫━━┫
┃┗┫┃┏┓┫┃━┫┃┏┓┃┃┗┛┃┗┛┣━━┣━━┃
┗━┻┻┛┗┻━━┛┗┛┗┛┗━━┻━━┻━━┻━━┛

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Whoa, let's calm down for a minute.  I'm sorry to show up and put a damper on the celebration, but Valathil, this didn't have a code review or even a thread on the internal.  The first I heard of it was by seeing the commit log.  Considering that EFF streaming is a problem that has stymied numerous coders for quite some time, this is a problem that needs more eyes on any proposed solution.

This part especially makes me skeptical:

No, this will just be for head ANIs and EFFs. The reason why we can do this with those is because we know that only one instance of a frame for those assets will be rendering at a given time. We can't do this for effects and textures as multiple instances can be rendered at a given time. A good example of this is having a bunch of explosions on screen in different frames of animation.

There are a lot of ways to interpret a fix that only works in a limited number of situations... one is "a partial fix", and one is "a brittle hack".  I don't know enough about the graphics code to tell which category this falls in.

Regarding the container format, MNG is a possibility, but Mjn.Mixael brought to my attention this Mantis ticket about a draft for an EFF container format.  Has anyone besides Flaming_Sword looked into it?

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Except that this commit does everything I need it to, short of cross-frame compression. In fact, it even speeds EFF loading up.. by a lot. As in, my Bastion mainhall (which used to take 3+ seconds to load) now loads up in a fraction of the time.

Over the last few hours, I've thrown just about every anim I can at this commit (that Swifty reviewed, according to the IRC log, BTW), and except for a possible issue with 1 frame EFFs, it's all working well as far as I can tell.

EDIT: Oh, and this definitely resolves the bmpman limit issues i've been having. (See: Unashamedly Smashing Through It)
« Last Edit: August 15, 2012, 01:46:59 am by mjn.mixael »
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Quote
There are a lot of ways to interpret a fix that only works in a limited number of situations... one is "a partial fix", and one is "a brittle hack".  I don't know enough about the graphics code to tell which category this falls in.

Well, if you know a way to have multiple instances of the same animation open and playing without having to keep all the frames of said animation in memory, please share it with us before calling this thing a partial fix. It's a complete fix for the issue under consideration (to wit, comm anis causing stuttering).

Secondly, I know you don't like this, but Valathil was very open about discussing what he was doing in this patch on IRC. I dare say that the people most qualified to evaluate this fix were listening, and agreeing with the steps taken here.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Valathil

  • ...And I would have had a custom title if it wasn't for you meddling kids!
  • 29
  • Custom Title? Wizards need no Custom Title!
  • This isn't some kinda of hairbrained scheme i hacked up in a few hours. I spent about 6 hours researching bmpman and the tcache code before even writing the first line of code
  • Multiple people were involved in the discussion of how this would be best handled which include such high profile SCP and community members as The_E, Swifty, MjnMixael and chief1983
  • The patch was code reviewed by swifty and the commit was greenlighted by chief1983
  • Multiple people confirmed the patch working through various testing. Rodo, niffiwan, Spoon, MjnMixael, The_E and probably others.
  • Streaming single frames of explosion or impact animations instead of preloading them is bad. It should be rather obvious why. The question of why they are not done this way now is not a question of "this is only partially done" but a conscious decision in favor of performance.
« Last Edit: August 15, 2012, 02:52:14 am by Valathil »
┏┓╋┏┓╋╋╋╋╋╋╋╋╋┏┓
┃┃╋┃┃╋╋╋╋╋╋╋╋╋┃┃
┃┃┏┫┃┏┳━━┓┏━━┓┃┗━┳━━┳━━┳━━┓
┃┃┣┫┗┛┫┃━┫┃┏┓┃┃┏┓┃┏┓┃━━┫━━┫
┃┗┫┃┏┓┫┃━┫┃┏┓┃┃┗┛┃┗┛┣━━┣━━┃
┗━┻┻┛┗┻━━┛┗┛┗┛┗━━┻━━┻━━┻━━┛

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
There are a lot of ways to interpret a fix that only works in a limited number of situations... one is "a partial fix", and one is "a brittle hack".  I don't know enough about the graphics code to tell which category this falls in.

 :wtf: This isn't a hack. Just because I said that we were treating different kinds of resources with different use cases doesn't mean we're making some sort of unrobust and inelegant discriminatory code path. It's simply a matter of intelligently determining how we allocate and stream resources to render. Preloading textures and getting all effect and model resources available for render is good for drawing dynamic scenes because we don't know in advance of when something needs to be drawn to the screen. On the other side, loading and streaming texture data is a better use case for predictable animations since we know exactly when certain a bitmap data frame is needed at a given time and therefore don't need to greedily consume resources we actually don't need.

On the plus side, this also killed the ANI stutter. Turns out it's better to just let OpenGL to handle updating a texture object data by itself rather than explicitly tell it to make a delete. I used the same philosophy when updating particle vertex data using the vertex buffer in my most recent commits.

This doesn't preclude any future effort to get MNG or whatever animation container you want into the game. This in fact opens the door even wider for those prospects. In the end, they're all going to be turned into texture data and will be streamed via this code.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
I'm going to be less tactful and ask Goober when was the last time you submitted anything for code review? Cause the last time on the internal was in April, and if you're going to tell me that was the last time you committed something that could potentially break something, my response is going to be a rude noise. :p

In that time you've submitted quite a bit of code which I tend to feel you should at least have run past me as the other main FRED/SEXP coder. I doubt I'm the only coder who feels that you've submitted code you should have run past them.

So if you want us to take you seriously about code reviews, I'd like to see you posting them yourself before asking others.
« Last Edit: August 15, 2012, 05:51:53 am by karajorma »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Echelon9

  • Moderator
  • 210
For science! Data from PVS-Studio shows this commit does not introduce or change any code in such a way as to lead to additional warnings.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Except that this commit does everything I need it to, short of cross-frame compression. In fact, it even speeds EFF loading up.. by a lot. As in, my Bastion mainhall (which used to take 3+ seconds to load) now loads up in a fraction of the time.

I don't doubt that Valathil's changes are a significant improvement on the features in question.  What I'm trying to find out is its potential effects on the other parts of the code, and to what extent people were looking out for that sort of thing.  The law of unintended consequences is merciless.


Secondly, I know you don't like this, but Valathil was very open about discussing what he was doing in this patch on IRC. I dare say that the people most qualified to evaluate this fix were listening, and agreeing with the steps taken here.

What I don't like is the lack of a permanent record of the discussion or a notification that a discussion even took place.  But the fact that a discussion did take place, with multiple participants, and with multiple qualified eyes on the problem, is what I was primarily concerned about.

Consider that anybody who wasn't present at the IRC meeting, or for that matter who didn't happen to see this thread, would have no idea what was discussed, or by whom.


  • This isn't some kinda of hairbrained scheme i hacked up in a few hours. I spent about 6 hours researching bmpman and the tcache code before even writing the first line of code
  • Multiple people were involved in the discussion of how this would be best handled which include such high profile SCP and community members as The_E, Swifty, MjnMixael and chief1983
  • The patch was code reviewed by swifty and the commit was greenlighted by chief1983
  • Multiple people confirmed the patch working through various testing. Rodo, niffiwan, Spoon, MjnMixael, The_E and probably others.

These points pretty much address all of my my concerns. :yes:

Quote
5. Streaming single frames of explosion or impact animations instead of preloading them is bad. It should be rather obvious why. The question of why they are not done this way now is not a question of "this is only partially done" but a conscious decision in favor of performance.

Yeah, this makes sense.  I thought this feature wasn't applicable to effects and textures, though, as Swifty mentioned here?  Even in the case of head anis, it is theoretically possible that a mod designer would use a single-frame head animation.  Does the code compensate for this?


:wtf: This isn't a hack. Just because I said that we were treating different kinds of resources with different use cases doesn't mean we're making some sort of unrobust and inelegant discriminatory code path.

Which is why I qualified my statement with a disclaimer. :)  I was trying to find out information, not throw out accusations.


I'm going to be less tactful and ask Goober when was the last time you submitted anything for code review? Cause the last time on the internal was in April, and if you're going to tell me that was the last time you committed something that could potentially break something, my response is going to be a rude noise. :p

In that time you've submitted quite a bit of code which I tend to feel you should at least have run past me as the other main FRED/SEXP coder. I doubt I'm the only coder who feels that you've submitted code you should have run past them.

So if you want us to take you seriously about code reviews, I'd like to see you posting them yourself before asking others.

Please don't try to turn this into a personal argument. :rolleyes:  Valathil's SVN comment included the phrase "implement eff streaming", which is a feature that had been discussed multiple times in the past, in multiple threads, and had been deemed a fairly tricky problem with no easy solution.  I don't demand a code review for every one of Valathil's commits, and I'm not trying to attack him personally.  This is about "EFF streaming" as a feature, which is fairly a big deal, and as such warrants a fair bit of attention.


And based on all the responses to my question, it sounds like it got the attention it warranted.  So I thank you all for bringing me up to speed. :p

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
You can't use a single-frame head animation unless you only want it to appear for a maximum of 1 second as it appears once it stops and you can't have less than one frame per second.
Suffice to say single-frame head ani/effs will not be a problem. At the very least you need duplicate frames in which case, it shouldn't make a difference from an actual animation.
(´・ω・`)
=============================================================

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Please don't try to turn this into a personal argument. :rolleyes:  Valathil's SVN comment included the phrase "implement eff streaming", which is a feature that had been discussed multiple times in the past, in multiple threads, and had been deemed a fairly tricky problem with no easy solution.  I don't demand a code review for every one of Valathil's commits, and I'm not trying to attack him personally.  This is about "EFF streaming" as a feature, which is fairly a big deal, and as such warrants a fair bit of attention.

I'm not trying to make this personal. I'm asking you to request code reviews more often since your features frequently are a big deal and yet you commit them very often without any oversight at all. If you're going to make the argument that Valathil's code requires more oversight I'm going to have to point out that a lot of yours does too.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Valathil

  • ...And I would have had a custom title if it wasn't for you meddling kids!
  • 29
  • Custom Title? Wizards need no Custom Title!
Valathil's SVN comment included the phrase "implement eff streaming", which is a feature that had been discussed multiple times in the past, in multiple threads, and had been deemed a fairly tricky problem with no easy solution.

Yeah and I just went out and did it cause thats how I roll.

"Theres no way we gonna get real time ship selection effects not for a few years anyway"
"Shadows in FSOpen are not really possible for now"
"I dont think godrays could be done in the game"
"Distortion thrusters would be nice but we cant do that i think"
« Last Edit: August 15, 2012, 11:48:19 pm by Valathil »
┏┓╋┏┓╋╋╋╋╋╋╋╋╋┏┓
┃┃╋┃┃╋╋╋╋╋╋╋╋╋┃┃
┃┃┏┫┃┏┳━━┓┏━━┓┃┗━┳━━┳━━┳━━┓
┃┃┣┫┗┛┫┃━┫┃┏┓┃┃┏┓┃┏┓┃━━┫━━┫
┃┗┫┃┏┓┫┃━┫┃┏┓┃┃┗┛┃┗┛┣━━┣━━┃
┗━┻┻┛┗┻━━┛┗┛┗┛┗━━┻━━┻━━┻━━┛

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
And while it's not like you got all those right the first time, you do seem to have a way of bending the spoon.  But your smugness might not be helping your case :P
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
And while it's not like you got all those right the first time, you do seem to have a way of bending the spoon.  But your smugness might not be helping your case :P
Valathil is allowed to be smug and bend me at the same time.
It comes with being a wizard.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
And while it's not like you got all those right the first time, you do seem to have a way of bending the spoon.  But your smugness might not be helping your case :P
Valathil is allowed to be smug and bend me at the same time.
It comes with being a wizard.

There's something oddly wrong about this suggestion....
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Valathil is allowed to be smug and bend me at the same time.
It comes with being a wizard.

There's something oddly wrong about this suggestion....
It is what it is.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
For differences, I suggest a rap battle.  Although, what's good for the goose is usually also good for the gander, and laws for the goose should apply equally to the gander.

* jr2 looks up around the table of wizards at which he has just spoken, and then scuttles to hide behind the beer keg, realizing that he is only a hobbit.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
All disagreements will be settled by reasoned argument. If that fails, dance off. :p
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]