32bit Graphics Extra Zoom Patch

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

User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by GeekToo »

Maquinista,
The palette remaps are defined here:
http://docs.openttd.org/town__land_8h_source.html

Search for sprite 5b4 (hex for spritenr 1460), to find the various variations. The palette variable behind it ( like PALETTE_TO_STRUCT_RED) defines the color table to use, as defined by the nonsprites in the grf files.
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by GeekToo »

Maquinista,
Which tar file does contain the oversaturated roof you pointed to here (in the jpg):
http://www.tt-forums.net/viewtopic.php?p=901616#p901616
maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by maquinista »

GeekToo wrote:Maquinista,
Which tar file does contain the oversaturated roof you pointed to here (in the jpg):
http://www.tt-forums.net/viewtopic.php?p=901616#p901616
Here:
http://jupix.info/openttd/gfxdev-repo/i ... file&id=29
Sprites 4424-4427.
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by GeekToo »

Thanks Maquinista, for the link.

I am aware of the problem with the saturation, but as Zephyris said, it is not that easy to solve.
The problem is that the company colours in OTTD distinguish themselves in different ways:
-most obvious by hue, like purple and red,
-some by lightness, like white and gray,
-and others by difference in saturation. This is mostly a problem for the blues, two of them got almost the same hue, but differ by saturation, and also orange and brown would look almost the same without difference in lightness and saturation.

So, if I would implement your algorithm, the blues and brown /orange would be hard to distinguish. So that is one problem swapped for another.

The only way I see to solve this, is to define a different hue for every company colour (except maybe white and gray), and take the saturation and lightness of the original sprite.

So we could make a small 32bpp LUT (Look Up Table) for the company colours, in which every company colour differs like 25 or 30 degrees in hue, and map those to the company colour names that best fit it.
maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by maquinista »

GeekToo wrote:So we could make a small 32bpp LUT (Look Up Table) for the company colours, in which every company colour differs like 25 or 30 degrees in hue, and map those to the company colour names that best fit it.
It could be a interesting idea.

Do You have some screenshots with these blues that have different saturations?
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by GeekToo »

When you check the colours in this picture with e.g. Gimp, you'll see that the hue of some of the blues are almost the same

http://wiki.ttdpatch.net/img/wiki_up//playercolours.png
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2897
Joined: 16 May 2007 16:59

Re: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by Zephyris »

These are the raw hues from the player colours image. Notice how similar the hues of the pale green, green and dark green (2, 7, 8) dark blue and blue (1, 9) red and pink (3, 5) orange and brown (13, 14) and mauve and purple (11, 12) are.
Attachments
playercolourshue.png
playercolourshue.png (1.14 KiB) Viewed 7592 times
sweetdude
Engineer
Engineer
Posts: 66
Joined: 12 Oct 2009 11:15

Re: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by sweetdude »

I found out that sprites 2700~2723 in the Vehicle stations and depots.tar are not added in the nightly dev build. Is there a reason for it?
maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by maquinista »

sweetdude wrote:I found out that sprites 2700~2723 in the Vehicle stations and depots.tar are not added in the nightly dev build. Is there a reason for it?
Some sprites needs lower zoom level (Z1 and Z2) files. Also, the shadows of the truck station are too dark.

Maybe I could try to add a element painted in CC to the tram depot, like this:
Attachments
Example.
Example.
tram_depot_preview.jpg (24.9 KiB) Viewed 7485 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: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by Jupix »

sweetdude wrote:I found out that sprites 2700~2723 in the Vehicle stations and depots.tar are not added in the nightly dev build. Is there a reason for it?
http://jupix.info/openttd/gfxdev-repo/i ... file&id=38
The whole package is ignored because of its status. It needs to be split into separate entries on a per-building basis. When that gets done I think most of it will end up in the dev build.
#################
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by GeekToo »

The openttd compile farm has compiled a fresh set of binaries for the patch for every platform OTTD is available for (latest updates contain mainly optimizing changes):
http://bundles.openttdcoop.org/32bpp-ez/LATEST/
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by GeekToo »

There's a new version of the patch:
http://bundles.openttdcoop.org/32bpp-ez/LATEST/

Solving this bug: http://dev.openttdcoop.org/issues/1606 (fast zoom in/out changes position on the map)

Lord Aro (e.a), if you want you can check whether the problem is solved.
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by Lord Aro »

a quick test with no 32bpp graphics indicated that it is fixed :bow:
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
xmirakulix
Engineer
Engineer
Posts: 36
Joined: 06 Jan 2010 18:06

Re: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by xmirakulix »

I noticed that frosch's changes in trunk r21785 to r21788 changed the spritecache in a way that the ez-patch doesn't apply anymore.
I tried to fix it, but my cpp knowledge is far to little for that.

I'd be happy, if someone more skilled could take a look into this.
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by Rubidium »

Interestingly enough it has been failing since somewhere around r21646 according to http://dev.openttdcoop.org/issues/2069
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by GeekToo »

Even more interesting, it now works again. Updated to trunk of yesterday. See first link in my previous post for binaries.
xmirakulix
Engineer
Engineer
Posts: 36
Joined: 06 Jan 2010 18:06

Re: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by xmirakulix »

The patch applies cleanly now, but I am getting two compile errors.

It seems to me, that one error is due to an error in the ez.diff on Line 1412:

Code: Select all

/Users/flo/Desktop/openttd/git-openttd/src/spritecache.cpp:351: error: ‘AllocSprite’ was not declared in this scope
The lines in the patch:

Code: Select all

-	return BlitterFactoryBase::GetCurrentBlitter()->Encode(&sprite, allocator);
+	return BlitterFactoryBase::GetCurrentBlitter()->Encode(&sprite, &AllocSprite);
I don't know, what causes the second error. Maybe a speciality of the OSX gcc? gcc -v says: "gcc version 4.2.1 (Apple Inc. build 5664)".
It doesn't occur when I compile a vanilla trunk.

Code: Select all

/Users/flo/Desktop/openttd/git-openttd/src/spritecache.cpp:326: error: passing ‘const SpriteTypeByte’ as ‘this’ argument of ‘SimpleTinyEnumT<enum_type, storage_type>& SimpleTinyEnumT<enum_type, storage_type>::operator=(enum_type) [with enum_type = SpriteType, storage_type = unsigned char]’ discards qualifiers
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by GeekToo »

It is a patch queue, so please apply the second patch also:
http://dev.openttdcoop.org/projects/32b ... o_gfx.diff

(Though I admit they should be applicable standalone, at least from the bottom to the top of the patch queue stack)
xmirakulix
Engineer
Engineer
Posts: 36
Joined: 06 Jan 2010 18:06

Re: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by xmirakulix »

It seems to me, that the ez patch currently isn't that actively maintained, the last update was 6 months ago.
The one on http://bundles.openttdcoop.org/32bpp-ez ... ng/LATEST/ doesn't apply anymore, as there were changes in trunk to FioOpenFile(), vehicle shadowing, settings, ...

I updated the full patch (not each patch in the queue separately) to apply against current trunk.
If needed, I can update the smaller patches separately too.
Attachments
32bpp-ez-patches-full-r22958.diff
(87.81 KiB) Downloaded 175 times
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: [32bpp] Extra zoom levels, experimental new CC algorithm

Post by Lord Aro »

great!

if you could update the smaller patches too, that'd be even better, as then i could (get someone to) upload them to the repo
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: Ahrefs [Bot], Google [Bot] and 8 guests