File Repository

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: File repository

Post by maquinista »

Lord Aro wrote:excuse my n00bishness, but what is pngresize.exe?
is it the batch file you're talking about?
me having it would be lovely, thanks
also, if possible, having the source code would be good as i do a lot of my work on linux
pngresize.exe is a application that converts the z0 zoom levels in z1 and z2 zoom levels keeping the offsets. Doing it by hand is a bit complicated, because sometimes You need to add extra rows (or columns) before resizing the sprite and there are too many signals.
Also, running pngresize without a script (a batch file in windows, or a .SH file in GNU/Linux) is... boring. writing the same commands in the console a lot of times is... :lol: The script could contain commands like these (example in Windows):

Code: Select all

..\..\pngresize z1 1470_z0.png
..\..\pngresize z1 1471_z0.png
..\..\pngresize z1 1472_z0.png
..\..\pngresize z2 1470_z0.png
..\..\pngresize z2 1471_z0.png
..\..\pngresize z2 1472_z0.png
...
Do You imagine it for all the signals or trees?

Also, writing the sh/bat file is tedious. You can create it with other script or a C program. Or if You are good programming SH scripts, You can create a SH script with loop commands and variables to resize the sprites with a few lines.

But, if You want, I can resize the sprites.

I will try to finish this building:
http://wiki.openttd.org/images/thumb/8/ ... lat_z0.png
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: File repository

Post by Lord Aro »

cool, where can i find pngresize?
and,
manquinista wrote:If You want, I can send You a batch file
Lord Aro wrote:me having it would be lovely, thanks
:wink:
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: File repository

Post by maquinista »

Lord Aro wrote:cool, where can i find pngresize?
and,
manquinista wrote:If You want, I can send You a batch file
Lord Aro wrote:me having it would be lovely, thanks
:wink:
I will try to renumber the signals. I have seen that I must add 7 in each signal number of sprite.

This is the PNG resize thread:
http://www.tt-forums.net/viewtopic.php?f=36&t=48507

PNG resize could be useful for vehicles, effects (sparks, clouds...), some industry sprites, trees...
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: File repository

Post by Lord Aro »

and the batch file?
you're right, it is really tedious to type them in 1 by 1
i'm currently attempting to resize this file: http://jupix.info/openttd/gfxdev-repo/i ... file&id=44 (because it was smallest)
however, it also has xxx_z#m.png sprites as well that appear to be empty.
i'm guessing i have to resize these as well?

EDIT: i've just guessed: they're the mask sprites aren't they? :wink:
EDIT2: while running the resize on them, i get this error:

Code: Select all

*file-address*>..\..\pngresize z1 752_z0m.png
WARNING: Sprite has no offsets defined. Assuming even offsets!
Sprite has odd sizes!
Offsets are odd!
EAccessViolation: Access violation at address 004301C7 in module 'pngresize.exe'
. Read of address 00000000
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: File repository

Post by maquinista »

About batch file: You don't need it because I have modified the number of signals. Now they should work well.

About mask sprites: they are not resized pngresize and they must be resized by had. :( It's better to create the mask sprites from the z1 and z2 zoom levels instead of resizing the mask sprite for z0 zoom level.

Also, there are some trees released by Ben Robbins that they don't have offset values. Don't resize them, Is better to wait until they are released by their author.
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: File repository

Post by Lord Aro »

maquinista wrote: About mask sprites: they are not resized pngresize and they must be resized by had. :( It's better to create the mask sprites from the z1 and z2 zoom levels instead of resizing the mask sprite for z0 zoom level.
Boo. :(
How do I create the mask sprites?
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: File repository

Post by maquinista »

Lord Aro wrote:
maquinista wrote: About mask sprites: they are not resized pngresize and they must be resized by had. :( It's better to create the mask sprites from the z1 and z2 zoom levels instead of resizing the mask sprite for z0 zoom level.
Boo. :(
How do I create the mask sprites?
I use GIMP. I select the areas with the CC color. Now, I create a new layer and I fill it with the CC color from the OpenTTD palette. I convert the image to indexed and I save it removing the layer with the original sprite.

This link is interesting, but the Comparison chart for company colours is old.
http://wiki.openttd.org/How_to_Create_3 ... ny_Colours
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: File repository

Post by Lord Aro »

so for this: http://jupix.info/openttd/gfxdev-repo/i ... file&id=44
there is no change in the mask files? or do they need to be re-sized of something?
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: File repository

Post by maquinista »

Lord Aro wrote:so for this: http://jupix.info/openttd/gfxdev-repo/i ... file&id=44
there is no change in the mask files? or do they need to be re-sized of something?
The mask should be made from the z1 or z2 sprites, because if you resize the z0m mask, You could leave some pixels without CC covered with the mask and some with CC uncovered.
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: File repository

Post by Lord Aro »

hmm.
not sure i'm up to doing the mask files (yet)

here's my progress with GUI - Toolbar and Selectors, as i can't update it there
Attachments
GUI-Toolbar and Selectors.tar
(402 KiB) Downloaded 97 times
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: File repository

Post by Lord Aro »

oh, and i just did the z1 z2 sprites for the farm (no stupid mask sprites :wink: )
i also added the license and stuff
Attachments
2106-2117 farm.tar
(762.5 KiB) Downloaded 118 times
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: File repository

Post by maquinista »

Thanks, I will try to upload them soon.

The farms sprites needs some changes more, because there are some ground sprites that pngresize doesn't give good results.

Also, I want to modify the farm building.
Attachments
Farm preview.
Farm preview.
farm.PNG (148.23 KiB) Viewed 2214 times
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
Jupix
Chief Executive
Chief Executive
Posts: 683
Joined: 19 Feb 2005 09:08
Location: Finland
Contact:

Re: File repository

Post by Jupix »

Lord Aro wrote:this seems to be the best place to put this:

what needs to be done to (most of) the graphics on the repository (that have been coded) to make them get on the nightly package?
http://wiki.openttd.org/32bit_automated ... _inclusion
also, what makes a file get on to the dev nightly pack but not the standard?
http://wiki.openttd.org/32bit_automated ... ev_version
EDIT: ok, i've found it's requirements (by reading a bit more :rolleyes: ) but can someone link to what a standard tar format is?
http://wiki.openttd.org/32bit_standard_tar_format

(links added for reference to other readers)
and, if i can make them info a standard tar, how should i go about uploading them t the repository? should i upload a new file, or just upgrade the old, unfinished one? (if you get what i'm talking about)
If you plan to update a single file, or a few:
- if the entry is undergoing active development by the uploader or shared owners, ask any owner of that entry for write permissions (shared ownership).
- if the entry is "obsolete" (meaning it doesn't meet the std-tar requirements and is no longer under active development), create a fork using the original entry's information.

If you plan to update entries en masse, throw me a line and I'll add admin privileges to your account so you can edit globally.

Good luck, you're about to do important work.
#################
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: File repository

Post by Lord Aro »

Jupix wrote:
and, if i can make them info a standard tar, how should i go about uploading them t the repository? should i upload a new file, or just upgrade the old, unfinished one? (if you get what i'm talking about)
If you plan to update a single file, or a few:
- if the entry is undergoing active development by the uploader or shared owners, ask any owner of that entry for write permissions (shared ownership).
- if the entry is "obsolete" (meaning it doesn't meet the std-tar requirements and is no longer under active development), create a fork using the original entry's information.

If you plan to update entries en masse, throw me a line and I'll add admin privileges to your account so you can edit globally.

Good luck, you're about to do important work.
thanks for answers jupix
admin privileges would be nice, but as i'm (currently) not up to doing mask sprites or drawing new ones, or coding them, or anything else complicated, i think my admin privileges should be temporary :roll:

although, i might be able to resize them manually, a bit, (as manquinista said)

i'd like to write more, but it's the end of break at school so i've got to go :lol:
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: File repository

Post by maquinista »

Lord Aro wrote:hmm.
not sure i'm up to doing the mask files (yet)

here's my progress with GUI - Toolbar and Selectors, as i can't update it there
I have seen the mask files of Z0 selectors.
It's not difficult to create the selectors for z1 and z2. Open a z1 sprite, fill all the layer with the colour index 14, convert the image to indexed and save the image with the nnn_z1m.png name.
If You use GIMP, You can fill an entire layer if you drag and drop the colour square to the layer. Or You can use the paint bucket.
Convert the image to indexed with this palette (save it into your GIMP settings folder):
http://dev.openttdcoop.org/documents/2
Use the first file of this page, the other two have different usages.

Remember that mask files doesn't have offsets. And if You have two sprites with the same size, You can duplicate and rename the mask file of one of them and use it for the second sprite.
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: File repository

Post by maquinista »

I need permision to edit this file:
http://jupix.info/openttd/gfxdev-repo/i ... ile&id=207
I want to add a screenshot and the Z1 and Z2 files that I had coded since some time ago.
Also, We should update the license.

Also, I can add the coded sprites to this source file:
http://jupix.info/openttd/gfxdev-repo/i ... ile&id=192



Lord Aro: You can resize these sprites in the coal mine:
http://jupix.info/openttd/gfxdev-repo/i ... ile&id=167

Code: Select all

2011_z0.png (21880 bytes)
2012_z0.png (30872 bytes)
2013_z0.png (32531 bytes)
2014_z0.png (32555 bytes)
2015_z0.png (32667 bytes)
2016_z0.png (23367 bytes)
2017_z0.png (47387 bytes)
2018_z0.png (46095 bytes)
2019_z0.png (19944 bytes)
2020_z0.png (39536 bytes)
2021_z0.png (37086 bytes)
Now, You can update the TAR file.
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: File repository

Post by Lord Aro »

i've had a thought:

perhaps for the release versions (maybe standard megapack only) shouldn't have source files included
it would help keep the file size down anyway...

EDIT: oh, and another question:
if the files do not need a folder (e.g. ogfxi_logos) are they actually needed at all? or can it still be a standard tar without them?

EDIT2: the coal mines are missing sprite 2022 which is the base for the coal mine buildings (i think), yet the screenshot shows them...

EDIT3 :lol: : actually, it's included in other things aren't they? perhaps it should be included in this (the coal mine) set as it has it's "sprite set" (e.g. has sprites 2021 & 2023)
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: File repository

Post by maquinista »

Lord Aro wrote:i've had a thought:

perhaps for the release versions (maybe standard megapack only) shouldn't have source files included
it would help keep the file size down anyway...
The megapack released for players doesn't include the sources.
Lord Aro wrote:EDIT: oh, and another question:
if the files do not need a folder (e.g. ogfxi_logos) are they actually needed at all? or can it still be a standard tar without them?
It's better to keep all the folders. It's true that It is not needed, but the TAR files in the repository are not for players.
Lord Aro wrote:EDIT2: the coal mines are missing sprite 2022 which is the base for the coal mine buildings (i think), yet the screenshot shows them...

EDIT3 :lol: : actually, it's included in other things aren't they? perhaps it should be included in this (the coal mine) set as it has it's "sprite set" (e.g. has sprites 2021 & 2023)
Yes, the sprite 2022 was lost when the file with all the industries was split. I have included it.
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
Jupix
Chief Executive
Chief Executive
Posts: 683
Joined: 19 Feb 2005 09:08
Location: Finland
Contact:

Re: File repository

Post by Jupix »

Lord Aro wrote: admin privileges would be nice, but as i'm (currently) not up to doing mask sprites or drawing new ones, or coding them, or anything else complicated, i think my admin privileges should be temporary :roll:
Never mind that. You're the perfect admin when you don't have other roles going simultaneously. You have the privs now - as always, I'll be keeping an eye on when they stop being used.
although, i might be able to resize them manually, a bit, (as manquinista said)
If you are considering doing that, remember that it's not always just a matter of resizing bitmaps in photoshop. You probably have to mess around with different algorithms and do touch-up work, if not even create whole new LOD variation models.

maquinista, I bumped you to admin too.
#################
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: File repository

Post by Lord Aro »

Jupix wrote:
Lord Aro wrote: admin privileges would be nice, but as i'm (currently) not up to doing mask sprites or drawing new ones, or coding them, or anything else complicated, i think my admin privileges should be temporary :roll:
Never mind that. You're the perfect admin when you don't have other roles going simultaneously. You have the privs now - as always, I'll be keeping an eye on when they stop being used.
:shock: :shock: :shock:
wow. Thanks so much!
i haven't had much time on a computer recently (grrr... parents) but i should have some more soon...
although, i might be able to resize them manually, a bit, (as manquinista said)
If you are considering doing that, remember that it's not always just a matter of resizing bitmaps in photoshop. You probably have to mess around with different algorithms and do touch-up work, if not even create whole new LOD variation models.
hmm.
maybe not then...
i'll leave that to manquinista :roll:
maquinista, I bumped you to admin too.
damn, there goes my ribbing opportunities... :lol:
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 9 guests