Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Tarvis on February 06, 2010, 01:53:01 pm

Title: Scale CBAnims / Briefing Movies
Post by: Tarvis on February 06, 2010, 01:53:01 pm
I noticed that the higher the resolution, the smaller the video in either the tech room, weapon loadout, or briefing.

Would it be too hard to get them to scale up with resolution? It might not look good on some of them, but it could always be made an option.
Title: Re: Scale CBAnims / Briefing Movies
Post by: The E on February 06, 2010, 01:54:21 pm
Not without a rewrite of the interface and ani playback code, I'm afraid.
Title: Re: Scale CBAnims / Briefing Movies
Post by: Tarvis on February 06, 2010, 02:03:17 pm
Hmm, I see. I figured it would be able to use the same method as cutscenes, but being different formats I suppose not.
Title: Re: Scale CBAnims / Briefing Movies
Post by: Nighteyes on February 09, 2010, 04:31:22 pm
is it possible to use bigger resolutions for the animations? also, I know soon we will only use TGA's/EFF animations for them, will scaling them work then?
Title: Re: Scale CBAnims / Briefing Movies
Post by: The E on February 09, 2010, 04:36:55 pm
No, and No.

For the moment, anis are locked into the resolutions used by retail.


The fundamental problem here is that the interface code still operates at a maximum resolution of 1024x768 internally, which is scaled to the user's resolution at runtime. Changing this behaviour will take time. It's probably possible to hack in a solution that would allow cb anis with higher resolutions, but hacks like that are one of the reasons that there is an engine rewrite effort now.
Title: Re: Scale CBAnims / Briefing Movies
Post by: Tarvis on February 09, 2010, 05:26:24 pm
Is there no way to get the CBs to also scale up to 1024x768? At least not a simple 2x scale for 1280x1026/960?
Title: Re: Scale CBAnims / Briefing Movies
Post by: The E on February 09, 2010, 05:30:03 pm
I would have to go into the code for that (which I don't particularly want to do, considering that I like my sanity and would probably just start foaming at the mouth while looking upon its dread majesty of cthulic horrors).

The point is, you could hack in scaling code. But you can just as well do it right the first time, and improve the whole thing with a lot more customizability while you're at it. I would much prefer the latter.
Title: Re: Scale CBAnims / Briefing Movies
Post by: Tarvis on February 11, 2010, 02:43:37 pm
I would have to go into the code for that (which I don't particularly want to do, considering that I like my sanity and would probably just start foaming at the mouth while looking upon its dread majesty of cthulic horrors).

The point is, you could hack in scaling code. But you can just as well do it right the first time, and improve the whole thing with a lot more customizability while you're at it. I would much prefer the latter.
I see.

Heck, this whole issue reminds me of a different sourceport (ZDoom) where certain features are put off until a near-mythical DoomScript is created, which allows for much greater control of the game.
That was over 5 years ago. :P

Don't take it as an insult, I'm sure you guys can do it. Besides, you have many more people working on the FSO project anyhow.
Title: Re: Scale CBAnims / Briefing Movies
Post by: chief1983 on February 11, 2010, 03:41:34 pm
Scaling them doesn't sound like it'd be a complete hack.  The interfaces themselves are scaled, the anis are just streaming versions of interface art, so it seems like all the pieces to scale them up should already be in place.  What's missing or complicated about this area of code?
Title: Re: Scale CBAnims / Briefing Movies
Post by: taylor on February 11, 2010, 06:18:54 pm
I'm assuming that this is regarding the fact that the anims were made for 640x480 and are just reused at 1024x768 at the same size.  Scaling already works otherwise (ie. using 1600x1200 will scale the anims from 1024x768).  Trying to scale them from 640x480 to 1024x768 so that they fit the same would be pretty hackish, and pretty uneccessary as far as I'm concerned.  It's just a fundamental design flaw in how Volition handled all of the interface stuff.

A slightly less hackish fix is just to support two anim sizes for those interface anims.  A *_2.ani version in other words, like with the interface art.  If using 1024x768 or above then it would just try loading cbanim_2.ani first and fall back on the regular cbanim.ani.  That way if the modder actually wants to bother including hi-res interface anims they can and it wouldn't be a bother for users or even us for that matter.
Title: Re: Scale CBAnims / Briefing Movies
Post by: FUBAR-BDHR on February 11, 2010, 06:42:09 pm
I think a lot of the _2 versions for hud elements were included in sparky_hi but never implemented for some reason. 
Title: Re: Scale CBAnims / Briefing Movies
Post by: Nighteyes on February 11, 2010, 07:04:08 pm
why add 2 seperate animation resolutions option, and not scale them instead? its just looks ugly/weird that there is all this space there and a tiny animation is played in the middle...
*ANI may not be able to scale up by the engine, but maybe an EFF animation will work when scaling up?
Title: Re: Scale CBAnims / Briefing Movies
Post by: Zacam on February 11, 2010, 07:10:40 pm
A slightly less hackish fix is just to support two anim sizes for those interface anims.  A *_2.ani version in other words, like with the interface art.  If using 1024x768 or above then it would just try loading cbanim_2.ani first and fall back on the regular cbanim.ani.  That way if the modder actually wants to bother including hi-res interface anims they can and it wouldn't be a bother for users or even us for that matter.

I like this idea.

why add 2 seperate animation resolutions option, and not scale them instead? its just looks ugly/weird that there is all this space there and a tiny animation is played in the middle...
*ANI may not be able to scale up by the engine, but maybe an EFF animation will work when scaling up?

Also a feasible idea, but only once the container format for EFF get's done. But now what about any where you want audio? You'd then have to utilize taylors idea, which is not really all that hard to implement. We could actually probably even set it up to (if in widescreen) read and load a 16:9 aspect version instead of a 4:3 though that would end up being impossible for already created versions unless somebody want's to go through recreating them all. And rather, I would much prefer we have all our models updated first and do that second.
Title: Re: Scale CBAnims / Briefing Movies
Post by: taylor on February 11, 2010, 08:06:52 pm
why add 2 seperate animation resolutions option, and not scale them instead? its just looks ugly/weird that there is all this space there and a tiny animation is played in the middle...
Because scaling them would make for some very messy code for one thing.  There would be a lot of checks to make sure things might look right, but no guarantees.  Scaling them also means adding some sort of scaling functionality to the anim code itself and would only have to apply in those specific interface instances.  And this scaling would be in addition to the scaling that the graphics code already does to support non-standard resolutions.

And, of course, what if the mod doesn't actually want them scaled up?  Adding the extra hi-res files would be up the modder, scaling them in the code would be done whether you wanted it or not. 

Adding an option for hi-res anims can be done in just a few lines of code and only the specific areas which you want this feature actually need any changes.  That makes it far easier to support in the future as well.

Quote
*ANI may not be able to scale up by the engine, but maybe an EFF animation will work when scaling up?
There is no difference in how they actually draw though.  All graphics eventually pass through the same couple of drawing functions, and those drawing functions are what scale things.
Title: Re: Scale CBAnims / Briefing Movies
Post by: Goober5000 on February 12, 2010, 12:35:52 pm
A slightly less hackish fix is just to support two anim sizes for those interface anims.  A *_2.ani version in other words, like with the interface art.  If using 1024x768 or above then it would just try loading cbanim_2.ani first and fall back on the regular cbanim.ani.  That way if the modder actually wants to bother including hi-res interface anims they can and it wouldn't be a bother for users or even us for that matter.
I have actually done this, per Galemp's request, and FSPort v3.2 will take advantage of it.  IIRC Galemp posted some screenshots as part of a recent update on Operation Templar (with the Hammer of Light cbani).  It hasn't really been publicized elsewhere, but I'll mention it when I post in the ChangeLog thread.

One important clarification is that the filenames are 2_*.ani, as opposed to *_2.ani.  This is to remain consistent with the other 2_*.* files.