Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Pure Black & Compression

 
Post new topic   Reply to topic Printable version
 View previous topic  2 lvz questions Post :: Post I Need Some Level's ... I Need Someon ...  View next topic  
Author Message
ChalkEagle
Newbie


Joined: May 31 2004
Posts: 23
Offline

PostPosted: Sun Jul 31, 2005 4:12 pm    Post subject: Pure Black & Compression Reply to topic Reply with quote

I am creating a fairly large shipset, roughly 400x400 pixels per ship animation (4000x1600 pixels for everything). The BMP format of it comes out to be around 18.3 megs. Now I have sifted through the different formats and JPEG allows me to compress it down to about 500Kb. The problem is this, when I save it as a jpeg, it obviously compresses it, changing some of the colors, particularly the pure blacks. It will change them small amounts, so instead of R0G0B0 it will be R1G1B1.

This is a huge problem because it destroys a lot of the transparency of the ship. The background for the arena is not black, it is a yellow. For the other ships in the arena i fixed the problem of them not blending in by adding a gradient of yellow to the edge of the ships. However with a ship of this size, filesize is a lot more important, thus i need to compress, thus the lossyness.

My question is if there is a way I can ensure that when I save my JPEG, it keeps the pure blacks, pure black? If there is another filetype I can use which dosnt give me this problem, that would also be useful as well. I have tried PNG but the smallest I have been able to get it is about 1.5 megs, 3x larger than my jpeg. Pure black, having no color information, should take up less filesize than slightly off black, so I would imagine this SHOULD be possible. Or perhaps there is a way to make a larger range of colors transparent in lvz...although I doubt it. Any help would be appreciated.

Cheers,
Chalk Eagle
Back to top
View users profile Send private message Add User to Ignore List
Purge
Episode I > Eposide III
Jar-Jar is kool


Age:35
Gender:Gender:Male
Joined: Sep 08 2004
Posts: 2019
Offline

PostPosted: Sun Jul 31, 2005 4:20 pm    Post subject: Reply to topic Reply with quote

You can try filling the "fake" blacks to pure blacks. I always use PNG for zone GFX and JPG only for backgrounds and non-framed graphics. Hopefully, this program will better assist you in further compressing your PNGs.
Back to top
View users profile Send private message Add User to Ignore List
SuSE
Me measures good


Joined: Dec 02 2002
Posts: 2307
Offline

PostPosted: Sun Jul 31, 2005 4:22 pm    Post subject: Reply to topic Reply with quote

You need to learn how to switch from RGB to Indexed colors.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
Maverick
broken record


Age:40
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Sun Jul 31, 2005 4:26 pm    Post subject: Reply to topic Reply with quote

Already tried the different JPEG Options when saving the JPG? (speaking of saving with Photoshop though)
_________________
Nickname: Maverick (I changed my name!)
TWCore developer | Subspace statistics
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Sun Jul 31, 2005 4:51 pm    Post subject: Reply to topic Reply with quote

Don't use JPG format for anything that needs transparency.
_________________
4,691 irradiated haggis!
Back to top
View users profile Send private message Add User to Ignore List
ChalkEagle
Newbie


Joined: May 31 2004
Posts: 23
Offline

PostPosted: Sun Jul 31, 2005 10:50 pm    Post subject: Reply to topic Reply with quote

I had it in my mind to try and hex edit the jpeg file to replace any slightly off black with pure black, but I soon learned that that was going to take more time than I was willing to invest in this. So I went through a couple steps:

1) Saved image as GIF file in Photoshop
2) Compressed GIF file with a program called GifLite
3) Converted the Gif to a PNG with a program called Exorcist
4) Compressed the PNG with a program called pngout

Finally tally, 700Kb. The graphic dosnt look super high quality, but I can't really expect better quality if I want a nice small filesize.

Thanks for the quick replies.

Cheers,
Chalk Eagle
Back to top
View users profile Send private message Add User to Ignore List
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:41
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3615
Location: Las Vegas
Offline

PostPosted: Sun Jul 31, 2005 11:26 pm    Post subject: Reply to topic Reply with quote

You do know, that saving as gif only reduces the color depth to 256 colors and nothing else once you convert to PNG, right?

Also, there is nothing wrong with keeping it as a bmp file in most cases. Once you put it into a LVZ file, it is compressed (check it with the DeBuildLevel program to see how much it is compressed). Once it is downloaded, Continuum only extracts it in memory. And in either case, both will take up as much space in RAM once Continuum loads the image.

Seriously people, take a look at images in your LVZ. Having a PNG vs BMP may only be a difference of 1%, and once it is loaded into RAM, has exactly 0 difference.
Back to top
View users profile Send private message Add User to Ignore List Send email
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Sun Jul 31, 2005 11:43 pm    Post subject: Reply to topic Reply with quote

Good post.
Back to top
View users profile Send private message Add User to Ignore List
ChalkEagle
Newbie


Joined: May 31 2004
Posts: 23
Offline

PostPosted: Sun Jul 31, 2005 11:52 pm    Post subject: Reply to topic Reply with quote

While I do realize that the compression for BMP files is very good after it has been converted to LVZ, I had tried that. It came out to 5 megs.

Cheers,
Chalk Eagle
Back to top
View users profile Send private message Add User to Ignore List
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:41
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3615
Location: Las Vegas
Offline

PostPosted: Mon Aug 01, 2005 12:13 am    Post subject: Reply to topic Reply with quote

Based upon that, then you were probably saving it as a 32bit image. Converting it down to 8bit during the GIF saving is where you saved all your space before.

In either case, loading up a 4000x1600 image into RAM is still a lot. That image alone is about 5 times larger than all other images combind. I just seriously hope this is only for a specific ship, because having 8 of those ships loading will pull down about as much RAM as some high-end FPS games.
Back to top
View users profile Send private message Add User to Ignore List Send email
ChalkEagle
Newbie


Joined: May 31 2004
Posts: 23
Offline

PostPosted: Mon Aug 01, 2005 12:23 am    Post subject: Reply to topic Reply with quote

It is just for one ship. I wouldn't be willing to put any more than one, the total lvz download would be way too much, plus even if it ran well on everyone's computer, it still wouldnt be fun to fly around with 8 hulking ships filling up half of your screen - just one ship, a mothership.

Cheers,
Chalk Eagle
Back to top
View users profile Send private message Add User to Ignore List
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Tue Aug 02, 2005 2:01 pm    Post subject: Reply to topic Reply with quote

Mine GO BOOM wrote:
Also, there is nothing wrong with keeping it as a bmp file in most cases. Once you put it into a LVZ file, it is compressed (check it with the DeBuildLevel program to see how much it is compressed). Once it is downloaded, Continuum only extracts it in memory. And in either case, both will take up as much space in RAM once Continuum loads the image.

Seriously people, take a look at images in your LVZ. Having a PNG vs BMP may only be a difference of 1%, and once it is loaded into RAM, has exactly 0 difference.
Do you mean video ram or you contradicting yourself?
http://forums.minegoboom.com/viewtopic.php?p=9471#9471
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Tue Aug 02, 2005 4:13 pm    Post subject: Reply to topic Reply with quote

Obviously video RAM.
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Tue Aug 02, 2005 7:02 pm    Post subject: Reply to topic Reply with quote

It actually seemed like MGB was talking about system RAM and contradicting himself to me. Smong, you hold grudges, don't you. icon_razz.gif
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:41
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3615
Location: Las Vegas
Offline

PostPosted: Wed Aug 03, 2005 12:59 am    Post subject: Reply to topic Reply with quote

Smong wrote:
Do you mean video ram or you contradicting yourself?
http://forums.minegoboom.com/viewtopic.php?p=9471#9471

That was me talking about Video RAM in that case, which is usually limited more so than System RAM. Which, on the other hand, will have Windows paging the unused images which won't be thrashed very often because you don't often re-enter the same arena. Video RAM is limited and keeping a huge image in there will cause slow downs. But preparing a PNG vs BMP doesn't make a difference there.

Yes, saving as PNG will be better. Read the first post in that thread, because BMP in general have nothing going for it, unless you enjoy editing images via hex editors.
Back to top
View users profile Send private message Add User to Ignore List Send email
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> LVZ/LVL Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 141 page(s) served in previous 5 minutes.

phpBB Created this page in 0.428644 seconds : 39 queries executed (92.9%): GZIP compression disabled