Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a $25 Amazon gift card!


Why do game companies use custom texture formats instead of the DDS format?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
85 replies to this topic

#1 EmptyVoid   Banned   -  Reputation: 99

Like
0Likes
Like

Posted 25 August 2008 - 09:10 PM

Well I've been trying to export the texture data from max in to my models but I'm using maxscript and found out max does not have a way to export cube maps so I'm probably just going to use separate textures but I've been wondering why none of the games I have seen use the DDS format for textures?

Sponsor:

#2 rfterdarc   Members   -  Reputation: 139

Like
0Likes
Like

Posted 25 August 2008 - 09:20 PM

They probably want basic encryption to hide their textures from people or like Valve who have the vtm and vtf files they can then add custom meta/associated data with each texture file like bump amount or mip levels.
(Although the meta in this case is store in a separate file, so I guess they could indeed use plain ol' dds)

#3 metalman666   Members   -  Reputation: 156

Like
0Likes
Like

Posted 25 August 2008 - 09:39 PM


companies use custom format because they write their own file loading modules that they use in their engines.

The real main reason is that they don't want the user's of the games to fiddle around with their data. They make custom format which their own engine can read only, not by something like photoshop & MSpaint. This way they make sure that their data is safe.



#4 Drigovas   Members   -  Reputation: 508

Like
0Likes
Like

Posted 25 August 2008 - 09:59 PM

The same question can be asked why people don't all use BMP's or TGA's for textures.

There are a variety of reasons. Often times there is the desire to package certain metadata with a textures, or package strange types of channels [such as embedding a bump map into a texture, instead of just straight ARGB], or perhaps they want special characteristics with respect to how textures are loaded such as usable partially-loaded textures for a game that features a lot of streaming.

Plenty of reasons.

*edit*

Oh, and data isn't safe, and game companies understand this. Simply compressing all the data in it's original form into a archive is typically the extent to which companies go to protect their assets, and even then it is largely for performance reasons. If data obfuscation was the goal, we would see a whole lot more games that encrypted the hell out of everything, which we just don't see. Even then it's just a matter of how much effort the attacker needs to put into getting to the material, since you can't use it encrypted. They just need to wait until the part of the program that puts things in a more simplistic form, and rip it then.

#5 hh10k   Members   -  Reputation: 589

Like
0Likes
Like

Posted 25 August 2008 - 10:04 PM

A game I recently made used sounds from a royalty-free sound library, but the license also said that I had to stop others from just copying those sounds for themselves. Since I like to use .zip files for my pack files, the only solution is to fiddle with the file format itself. Apply to this to a large project with assets from many different places, and it makes sense to just protect all the files securely like this.

#6 dublindan   Members   -  Reputation: 457

Like
0Likes
Like

Posted 25 August 2008 - 10:15 PM

I'll answer your question with another question: what the hell is DDS!?
(Yes, I can guess, but I really don't know what it is - besides being an image format, which is why I personally don't use it. I usually use PNG (if I need transparency) or whatever is convenient at the time. There are many formats to choose from, so I guess people choose one that suits their needs - or the create their own format which suits their needs).

#7 MizRaeL   Members   -  Reputation: 216

Like
0Likes
Like

Posted 25 August 2008 - 10:36 PM

Wikipedia knows ^__^

#8 EmptyVoid   Banned   -  Reputation: 99

Like
0Likes
Like

Posted 25 August 2008 - 10:42 PM

Quote:
Original post by issch
I'll answer your question with another question: what the hell is DDS!?
(Yes, I can guess, but I really don't know what it is - besides being an image format, which is why I personally don't use it. I usually use PNG (if I need transparency) or whatever is convenient at the time. There are many formats to choose from, so I guess people choose one that suits their needs - or the create their own format which suits their needs).


DDS format is a LOT better then PNG...

#9 EmptyVoid   Banned   -  Reputation: 99

Like
0Likes
Like

Posted 25 August 2008 - 10:43 PM

Should I use my own format to protect my assets?

#10 ricardo_ruiz_lopez   Members   -  Reputation: 218

Like
0Likes
Like

Posted 26 August 2008 - 03:54 AM

Quote:
Original post by EmptyVoid
Quote:
Original post by issch
I'll answer your question with another question: what the hell is DDS!?
(Yes, I can guess, but I really don't know what it is - besides being an image format, which is why I personally don't use it. I usually use PNG (if I need transparency) or whatever is convenient at the time. There are many formats to choose from, so I guess people choose one that suits their needs - or the create their own format which suits their needs).


DDS format is a LOT better then PNG...


Usually, but not always. If you want a picture without lossing quality, then you cannot use DDS. But PNG is an option.

Quote:
EmptyVoid
Should I use my own format to protect my assets?


There are other options. For instance, store all your assets inside a ZIP file (something like quake/doom) and use a password (you have to decompress them on RAM, because if you do it on disc, somebody can take them). I remember library that do this, something like fszip, fliesystem zip or something like that.

Does anyone remember this library?

#11 Josh Petrie   Moderators   -  Reputation: 3892

Like
0Likes
Like

Posted 26 August 2008 - 04:10 AM

Quote:
Original post by EmptyVoid
Should I use my own format to protect my assets?


No. Using your own format for any other reason is valid, but 'protecting your assets' isn't -- as has been mentioned, it will only deter the most superficial attempts to get at your data. People who actually want to mod your game (unlikely) or attempt to steal your assets (extremely unlikely) will still be 100% successful.

Josh Petrie | Game Developer, Undead Labs


#12 Extrarius   Members   -  Reputation: 1412

Like
0Likes
Like

Posted 26 August 2008 - 04:16 AM

What features does DDS support? Wikipedia doesn't really have much to say about it.

Does it support any kind of procedural storage, such as "layers" like most image editing software supports? If not, that would be why I wont use it.

As for why I don't use formats that do support some level of procedural content (SVG, for example) is that the primitives they provide are not the ones I need.

#13 swiftcoder   Senior Moderators   -  Reputation: 10450

Like
0Likes
Like

Posted 26 August 2008 - 04:29 AM

Quote:
Original post by Extrarius
What features does DDS support? Wikipedia doesn't really have much to say about it. Does it support any kind of procedural storage, such as "layers" like most image editing software supports? If not, that would be why I wont use it.
DDS is a special purpose container for ST3C-compressed 1-4 channel images. The only reason to use ST3C (and by extension DDS) is that it is natively supported by a fair amount of consumer graphics hardware.

However, since most of the time you will need to support additional types of compression (RLE, JPEG, PVR, ...), additional layers (bump maps, specular maps, ...), and other metadata, it is typically easier to use a single custom container format.

#14 OrangyTang   Members   -  Reputation: 1294

Like
0Likes
Like

Posted 26 August 2008 - 05:03 AM

Quote:
Original post by swiftcoder
Quote:
Original post by Extrarius
What features does DDS support? Wikipedia doesn't really have much to say about it. Does it support any kind of procedural storage, such as "layers" like most image editing software supports? If not, that would be why I wont use it.
DDS is a special purpose container for ST3C-compressed 1-4 channel images. The only reason to use ST3C (and by extension DDS) is that it is natively supported by a fair amount of consumer graphics hardware.

DDS can contain more than just ST3C compressed data, uncompressed data is supported too. But then people tend to use tga or png instead if they want non-lossy compression.

#15 eq   Members   -  Reputation: 654

Like
0Likes
Like

Posted 26 August 2008 - 08:16 AM

Quote:
DDS can contain more than just ST3C compressed data, uncompressed data is supported too. But then people tend to use tga or png instead if they want non-lossy compression.


DDS also supports mip-maps (stored in the file), cube-maps (with mip-maps), volume textures, floating point data (16 & 32 bit) and more. Something that traditional image formats doesn't natively support.

Creating a custom firmat with the same broad functionality is IMO a waste of time.
If you want some basic asset protection, use encryption, custom compression or custom pak files.



#16 swiftcoder   Senior Moderators   -  Reputation: 10450

Like
0Likes
Like

Posted 26 August 2008 - 01:24 PM

Quote:
Original post by eq
Quote:
DDS can contain more than just ST3C compressed data, uncompressed data is supported too. But then people tend to use tga or png instead if they want non-lossy compression.

DDS also supports mip-maps (stored in the file), cube-maps (with mip-maps), volume textures, floating point data (16 & 32 bit) and more. Something that traditional image formats doesn't natively support.
On the other hand, the average user doesn't have either volume textures or HDR textures as assets, mipmaps stored in file are only worthwhile with very specific usage patterns, and cube maps can easily be stored in a 'vertical cross' (ala SOIL). If you do need all those features, you probably need a bunch of others to - PVRTC and JPEG compression in particular.

I am not saying that DDS doesn't have its uses, but for me at least, it really hits that uncomfortable spot between a specific and a general container.

#17 Numsgil   Members   -  Reputation: 501

Like
0Likes
Like

Posted 26 August 2008 - 02:41 PM

We use DDS at work. It's primarily useful if you're going to be storing your textures compressed in VRAM (yes, cards can do that), and want to see what sort of artifacts that compression is going to cause before you load it in to your game. Most of our textures are compressed. If lots were uncompressed, we'd probably store them as PNGs to get the lossless compression benefit to reduce our hard disk footprint.

Having worked with DDSs, I would strongly recommend them to anyone unfamiliar with them. You can reduce the memory footprint (in VRAM I mean) by 4 to 8 times (depending on which DXT format you're using). Which means you can cram more or larger textures into the card, and get better quality results. There might also be a performance benefit if some textures are being stored in AGP memory, since the bandwidth required is reduced. You can get free plugins from NVidia to let you export DDS from photoshop, and there are utilities from Microsoft in the DX SDK to let you open and inspect DDSs (different mip map levels, etc.).

On topic, the only reason a game company would build their own file format would be so they can add extra features to it specific to their game, even up to the 11th hour when things are due. It's more common with 3D models than 2D textures usually, since PNG, TGA, JPG, and DDS really cover most of the bases for what you want from a texture.
Darwinbots - Artificial life simulation

#18 janta   Members   -  Reputation: 345

Like
0Likes
Like

Posted 26 August 2008 - 02:50 PM

Game companies may use custom format with a ton of meta-data and whatnot to be used in their tool chain but in the end, companies don't have any choice but using the texture formats that the hardware supports, which usually boils down to DXTn, rgb(a) 32 bits, and rgb(a) 16 bits (444 or 565...), with or without swizzling. (Edit: and a bunch of floating point textures)

There is no such a thing as a "custom format that only some engine supports", everything gets processed to the same format at some point. (Unless they are writing a software renderer...;))

#19 Kylotan   Moderators   -  Reputation: 3338

Like
0Likes
Like

Posted 26 August 2008 - 11:50 PM

You're being a bit misleading there: of course, the hardware only takes certain pixel formats, but those pixel formats can come originally from a multitude of file formats.

#20 Barking_Mad   Banned   -  Reputation: 148

Like
0Likes
Like

Posted 27 August 2008 - 12:07 AM

Quote:
Original post by hh10k
A game I recently made used sounds from a royalty-free sound library, but the license also said that I had to stop others from just copying those sounds for themselves. Since I like to use .zip files for my pack files, the only solution is to fiddle with the file format itself. Apply to this to a large project with assets from many different places, and it makes sense to just protect all the files securely like this.


Doesnt that mean that you just have to state that the resources are not to be copied, are in violation of a ULA for example, with your game. I mean, technically it is physically impossible to actually "stop" them from aquiring information you are communicating with them, its a fundamental requirement of communication lol.

Im sure any court would see that a lincense statement and ULA would be enough of an attempt to stop copying as would be acceptable to satisfy the royaly-free license anti-copying request. Unless its a non-distribution license, in which case, you can change and encrypt it all you want, its still a violation :P




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS