Author Topic: .ANI's and .GIF's  (Read 5412 times)

0 Members and 1 Guest are viewing this topic.

Offline Grug

  • 211
  • From the ashes...
I'm just wondering, why can't we replace ani's with gif's?
Do we need a license to use gifs?

I would of thought it would of been a much better way to handle animations in FS2.
Much more dynamic, and user friendly. More apps widely available.

I would think that it would be a large performance increase using gif's instead of ani's on glowmaps / textures too.

So what's up, why hasn't anyone suggested this before?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Why aren't you replacing ani's with eff's?

Gifs do indeed need a licence. EFFs don't. Taylor is working on a format for CB_Anims IIRC so ani is on its way out as that's the only place EFFs don't work at the moment. Why introduce GIFs at all?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 
And GIFs have the same limitations as ANIs...
So EFFs would indeed be the best...
But what about MNGs? *joke*

 

Offline Grug

  • 211
  • From the ashes...
Ah, un-informed I am... as usual. :doubt:

You know, the SCP really needs a news editor or something. To post on HLP and the main site the latest developments etc.
I never hear about things until I come across them in the forums, see it in the highlights, or ask something and get told it was made several months ago. Sigh

Don't dare point me to the wiki either, because that is a) A pain in the ass to update b) Never updated

Anyway, what's the story on EFF's?

 

Offline aldo_14

  • Gunnery Control
  • 213
EFFs, I believe, store the animation as individual frames (i.e. named anim0000...animxxxx) using an EFF (ASCII type) file which defines the filename, number of frames and fps (and is thus used to load the frames and animation).

 
Are there performance gains as well, with eff's? I take it eff's have no color limitations as ani's?

 

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
If you use DDS for the EFF if you gain quite a bit of performance over ANI. This is the way I fixed the 'near smoke' stuttering for low-end systems.

If you use DXT1 or S3TC you can even save half the memory over the ANI effect. (or was it four times less?)
You won't need lods for the effects anymore, as the CPU usage is very low to non-exsistant anyway. So you can save even more memory.

Now the drawback is the compression which looks horrible for some effects. Even though there is not color limitation, it will probably look worse than ANI for effects with a small amount of colors.

So you should decide which format you want to use on a per case basis.

The Nova explosion here is an EFF effect:

http://www.hard-light.net/forums/index.php/topic,31170.0.html

I can PM you some instructions and tricks for EFFs if you need them.

Edit: The shockwave is also an EFF effect. :) But I think most people know and use it already...
« Last Edit: March 10, 2005, 09:59:08 am by 1688 »
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Grug

  • 211
  • From the ashes...
If you've got some tips for EFF's maybe we should make space on the Wiki for them... :)

Probably should put a list of supported formats somewhere too.

 

Offline Carl

  • Render artist
  • 211
    • http://www.3dap.com/hlp/
cause .gifs look like crap.
"Gunnery control, fry that ****er!" - nuclear1

 

Offline Solatar

  • 211
Quote
Originally posted by DaBrain
[/url]

I can PM you some instructions and tricks for EFFs if you need them.



Would somebody be willing to just post a thread or readme on it? I'm curious about these as well.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Quote
Originally posted by Carl
cause .gifs look like crap.


Only if you have more than 256 colors. :p

Or use a crappy compression prog.
-C

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Slightly off-topic... Taylor once spoke of an interesting option for improving textures for low-end systems.  Since the original pcx format is 8-bits, but is converted into 16-bit memory, there is a possibility of using 16-bit tga files instead.  These would take up the same memory footprint as the 8-bit pcx files, but it would have the full 16-bit color depth from the source files.  If we wanted to make FSO more appealing for those will low-end systems, we could make 16-bit tga versions of all the textures that Lightspeed & co. have made.
The Trivial Psychic Strikes Again!

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Quote
Originally posted by Trivial Psychic
Slightly off-topic... Taylor once spoke of an interesting option for improving textures for low-end systems.

Continuing the off-topic, topic... I've got some basic code in CVS to convert 32 and 24 bit TGAs to 16-bit on load though it's not enabled yet.  It's not perfect (transparency issues) but it does work.  This was done mainly in response to Bob's hi-poly herc which only has TGA textures and so requires -jpgtga to show the model properly.  If not using -jpgtga then you would only see the thrusters and it's *really* difficult to shoot the ship down.

Planets and background nebula look like crap with this code but if not using -jpgtga then it will try and load PCX files before the TGA versions.  This needs a good bit of testing but I haven't put out the call yet, plus not many people volunteer to not use -jpgtga for any period of time.

As far as image quality goes, here is a before and after of Bob's Herc (top is 32-bit, bottom is 16-bit using the same graphics).  This is in OpenGL mode, hasn't been tested in D3D yet but should be about the same.  The obvious difference is that the cockpit isn't transparent (and I used too low of a JPG quality setting on save ;)).  The less obvious difference is that it's using half the memory, the exact same as if it were PCX but with nearly identical color quality as the 32-bit TGA version.  Only DDS textures would give lower memory usage.



 

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
Quote
Originally posted by Solatar


Would somebody be willing to just post a thread or readme on it? I'm curious about these as well.



This is a PM I wrote to J.P. to help him with his warp effect:


Quote

DaBrain wrote on 03-01-2005 07:03 PM:
I hope I can help you a bit with EFFs.

Ok, first things first:

EEF is not a format like ANI. It's not only one file.

Here is an example:
My particleSmoke02 effect.
The EFF is named ParticleSmoke02.eff

This is what's in the file(open with Notepad):
$Type: DDS
$Frames: 52
$FPS: 28

In other words not very much.
(Just create *.txt and rename it to *.eff)

The first frame is called: ParticleSmoke02_0000.dds
The second one: ParticleSmoke02_0001.dds
(structure xxxxx_000y    x=filename y=frame number)
The last frame is: ParticleSmoke02_0051.dds


DDS Converter 2 is your friend:
http://eliteforce2.filefront.com/file/DDS_Converter;29412

The perfect format for EFFs is S3TC.
Go to the options and select Vendor: S3 DXTc fomat: DXT1
And select Less memory usage
Do not use mipmaps. FS2 doesn't use pre-generated mipmaps.

Ok, this is it. It's far more simple than the ANI stuff and has many advantages over it.

One of them is that you won't need to create lods for your effect.

Of course you don't have to use DDS files for EEF effects, but TGA or other uncompressed formats (even PCX) are far larger when loaded into texture memory.

If you have any questions, just ask me.
You can also send me the frames, I can convert them for you.
It takes only a few seconds.


~DaBrain
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Grug

  • 211
  • From the ashes...
Hmm...

BTW what are the best formats for each job and what do you need for compatability?

Should I:
1) Stick with jpeg's for ship textures? (Except a tga for the cockpit?)
2) Stick with 24bit tga's for effects, or can I use jpegs as well?
3) Use tga's for backgrounds / nebula's? Or jpegs?

Or should I use DDS for all? or other etc?
Should modders aim for compatability with both low and high?

Update:
Thanks for that info DaBrain :D
« Last Edit: March 11, 2005, 04:04:25 am by 501 »

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
1) IMHO, never use JPGs if you can help it. The compression results in icky artifacts.
2) DDS files are horrible for nebula art; they don't handle gradiants very well.
3) If you can, use DDS files over JPGs for ships in general. They're natively supported by video cards, resulting in faster performance and less memory usage all around.
4) TGAs are the best quality for anything.
5) PCXs are good if you're only using 256 colors (You can only use 8-bit -color PCX files) and can't use DDSes.
6) PCX and DDS files are supported by *everything* that can run fs2_open.

I'd say
1) Make all textures as TGAs
2) If they're big, try out other file formats to see what gives the best quality vs filesize, and include that with the TGAs. FS2_Open will automatically use the TGAs if -jpgtga is specified, otherwise, it will use the smaller DDS/PCX files.

Edit: Woo, psychic powers again. *Hides his seeing orb*
-C

 

Offline Grug

  • 211
  • From the ashes...
lol. Thanks.

Damn timewarp... :doubt:

It took me ages to reply too, because I kept getting:
Quote
"Sorry! The administrator has specified that users can only post one message every 30 seconds.

Even though I'd posted at least several minutes ago...

 

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
Quote
Originally posted by WMCoolmon

I'd say
1) Make all textures as TGAs


Yeah, but keep that file only for yourself. You should rather double it's size and compress it via S3TC. The compression will get four times better, while it still uses only half of the memory TGA would use.
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Flaser

  • 210
  • man/fish warsie
As I see it the policy should be:

1) -Always make TGA-s since they offer the best quality and work for everything.
    -These files also act as reference material for future development, if you can save all the layers separetly for developers
2) -Convert the TGA to DDS - if no artifacts are evident or too serious release the file for general use
    -Even if there is a drop in quality release them as optimized files for low end systems
3) -Forget ani-s. They are a waste of memmory. EFF-s can hold both TGA and DDS. Unless your effects heavly relly on gradients try to use the later.
"I was going to become a speed dealer. If one stupid fairytale turns out to be total nonsense, what does the young man do? If you answered, “Wake up and face reality,” you don’t remember what it was like being a young man. You just go to the next entry in the catalogue of lies you can use to destroy your life." - John Dolan

 

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
I don't think I'l use TGA for textures ever again...
Effects may looks much better as TGA, so it's the still the best choice for effects, But a standard texture won't be hardly affected by the compression.

Keep in mind "How close to the ship would you have to be to notice the difference?"

This slight difference is not worth eight times the memory use!
Not even for high-end systems.

Save some memory for animated effects.
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------