View previous topic :: View next topic |
Author |
Message |
elementrix DeleD PRO user
Joined: 11 May 2006 Posts: 1300 Location: The Netherlands
|
Posted: Mon Jun 25, 2007 1:38 pm Post subject: other formats for lightmaps. |
|
|
i think this is very easy to implent but also very usefull
i would like to have that i can select in what format my lightmaps are saved like jpg, png etc.
now it always saves in bmp and that is a very large format for games. |
|
Back to top |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
Posted: Mon Jun 25, 2007 1:48 pm Post subject: |
|
|
TGA, TGA, TGA, TGA!
Quote: |
now it always saves in bmp and that is a very large format for games. |
A x*x texture is always the same size, no matter what file format it came from. (Not counting texture compression...) _________________
|
|
Back to top |
|
|
elementrix DeleD PRO user
Joined: 11 May 2006 Posts: 1300 Location: The Netherlands
|
Posted: Mon Jun 25, 2007 3:32 pm Post subject: |
|
|
Quote: |
A x*x texture is always the same size, no matter what file format it came from. (Not counting texture compression...) |
i mean the file size, when i save an image to jpg it will be around 100kb in size and when i save that same image in bmp it is around 1mb |
|
Back to top |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
Posted: Mon Jun 25, 2007 5:52 pm Post subject: |
|
|
elementrix wrote: |
Quote: |
A x*x texture is always the same size, no matter what file format it came from. (Not counting texture compression...) |
i mean the file size, when i save an image to jpg it will be around 100kb in size and when i save that same image in bmp it is around 1mb |
At a cost.
BMPs compress very well if you are worried about distribution? _________________
|
|
Back to top |
|
|
kaylon Member
Joined: 20 Feb 2006 Posts: 45 Location: Dundee
|
Posted: Mon Jun 25, 2007 6:35 pm Post subject: |
|
|
PNG is great...but never use JPEG for textures..they loose quality to fast...real crappy format for games.
K _________________ I'm an Artist...It's my job to ask programmers for things that make my life easier. |
|
Back to top |
|
|
jwatte DeleD PRO user
Joined: 26 Apr 2006 Posts: 513
|
Posted: Tue Jun 26, 2007 3:12 pm Post subject: |
|
|
I think texture compression can be left for another content pipeline step. If you use grayscale light maps, you can change them to L8 or A8 format. If you use color, you might change them to DXT1 or DXT5, which might work OK given that light maps are slowly varying in space. JPG may generate too much blocking artifacts, and will use more space on the graphics card, where teture memory usage is often more of a problem than on disk.
That being said, uncompressed TGA is easier to read than uncompressed BMP (by a few lines of code :-) so if you could use or support that, that'd be cool. |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Wed Jun 27, 2007 7:31 am Post subject: |
|
|
Yeah, I'm currently leaning towards supporting .TGA, .PNG and DXT (possibly both 1 and 5) as alternative file formats. The main thing that is stopping me from adding support right now is that the latter two would probably require integration of some 3rd party code (I think writing encoders for those formats ourselves would not be very cost-effective), which is a bit of a hassle. |
|
Back to top |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
Posted: Wed Jun 27, 2007 8:39 am Post subject: |
|
|
Paul-Jan wrote: |
Yeah, I'm currently leaning towards supporting .TGA, .PNG and DXT (possibly both 1 and 5) as alternative file formats. The main thing that is stopping me from adding support right now is that the latter two would probably require integration of some 3rd party code (I think writing encoders for those formats ourselves would not be very cost-effective), which is a bit of a hassle. |
But TGA cost nothing, and is easy as hell. It's an RGBA dump with a header. [/armtwisting] _________________
|
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Wed Jun 27, 2007 10:33 am Post subject: |
|
|
True (DeleD already used to writes out TGA's to generate dummy textures), but the benefits of just doing TGA are too small to prioritize it atm... unless I get really bored with the other stuff I'm working on, that is |
|
Back to top |
|
|
jwatte DeleD PRO user
Joined: 26 Apr 2006 Posts: 513
|
Posted: Wed Jun 27, 2007 4:23 pm Post subject: |
|
|
Well, it's not just "benefit," it's "benefit per development time."
TGA support would be, what, 30 minutes? |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Thu Jun 28, 2007 5:38 am Post subject: |
|
|
30 minutes taken directly out of issues that are higher on the list, yes. But anyway, I have added both .TGA and .JPG support for now (available in the next beta).
I know I have been the biggest antagonist of using JPEG's for storing lightmaps in the past, but I've done some experiments, and the practical results where not bad at all.
So I've decided to get off the high horse and offer it as an option to those users who have filesize issues. I did add a little warning about how using a lossy file format might lead to artifacts.
All of this stuff is PRO only of course... |
|
Back to top |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
Posted: Thu Jun 28, 2007 8:08 pm Post subject: |
|
|
Thank you.
I've canceled the full on TGA assault plans. I don't know what me and jwatte are going to do with all these torches and pitchforks. _________________
|
|
Back to top |
|
|
elementrix DeleD PRO user
Joined: 11 May 2006 Posts: 1300 Location: The Netherlands
|
Posted: Thu Jun 28, 2007 8:39 pm Post subject: |
|
|
thank you, maybe my lightmap of 125 mb will now be a little lower |
|
Back to top |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
Posted: Fri Jun 29, 2007 1:13 am Post subject: |
|
|
elementrix wrote: |
thank you, maybe my lightmap of 125 mb will now be a little lower |
That's insane. You should never have that much. You're settings should be turned down. _________________
|
|
Back to top |
|
|
elementrix DeleD PRO user
Joined: 11 May 2006 Posts: 1300 Location: The Netherlands
|
Posted: Fri Jun 29, 2007 9:26 am Post subject: |
|
|
yes i already did, i just wanted to make a very detailed lightmap of a scene with 27k poly's. it took 3 hours to complete(which i think is quite fast).
the scene is now 21,2 mb. |
|
Back to top |
|
|
|