32bit Graphics Extra Zoom Patch
Moderator: Graphics Moderators
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
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.
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.
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
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
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
-
- Tycoon
- Posts: 1829
- Joined: 10 Jul 2006 00:43
- Location: Spain
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
Here: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
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][*]Why use PNG screenshots in 8 bpp games.
[*]Caravan site New Industry. · Spain set. · Some spanish trains for locomotion[*]Favourites:GRVTS · ECS · FIRS
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
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.
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.
-
- Tycoon
- Posts: 1829
- Joined: 10 Jul 2006 00:43
- Location: Spain
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
It could be a interesting idea.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.
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][*]Why use PNG screenshots in 8 bpp games.
[*]Caravan site New Industry. · Spain set. · Some spanish trains for locomotion[*]Favourites:GRVTS · ECS · FIRS
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
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
http://wiki.ttdpatch.net/img/wiki_up//playercolours.png
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
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 (1.14 KiB) Viewed 7594 times
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
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?
-
- Tycoon
- Posts: 1829
- Joined: 10 Jul 2006 00:43
- Location: Spain
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
Some sprites needs lower zoom level (Z1 and Z2) files. Also, the shadows of the truck station are too dark.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?
Maybe I could try to add a element painted in CC to the tram depot, like this:
- Attachments
-
- Example.
- tram_depot_preview.jpg (24.9 KiB) Viewed 7487 times
Sorry if my english is too poor, I want learn it, but it isn't too easy.
- [list][*]Why use PNG screenshots in 8 bpp games.
[*]Caravan site New Industry. · Spain set. · Some spanish trains for locomotion[*]Favourites:GRVTS · ECS · FIRS
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
http://jupix.info/openttd/gfxdev-repo/i ... file&id=38sweetdude 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?
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.
#################
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
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/
http://bundles.openttdcoop.org/32bpp-ez/LATEST/
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
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.
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.
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
a quick test with no 32bpp graphics indicated that it is fixed 

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
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
-
- Engineer
- Posts: 36
- Joined: 06 Jan 2010 18:06
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
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.
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.
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
Interestingly enough it has been failing since somewhere around r21646 according to http://dev.openttdcoop.org/issues/2069
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
Even more interesting, it now works again. Updated to trunk of yesterday. See first link in my previous post for binaries.
-
- Engineer
- Posts: 36
- Joined: 06 Jan 2010 18:06
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
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:The lines in the patch:
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.
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
Code: Select all
- return BlitterFactoryBase::GetCurrentBlitter()->Encode(&sprite, allocator);
+ return BlitterFactoryBase::GetCurrentBlitter()->Encode(&sprite, &AllocSprite);
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
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
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)
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)
-
- Engineer
- Posts: 36
- Joined: 06 Jan 2010 18:06
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
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.
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
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
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
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
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
Who is online
Users browsing this forum: Bing [Bot] and 16 guests