I have added the CC mask for some livestock wagons and It works:GeekToo wrote:Yes, if it is in the mask image, and the palette is correctly filled in, it will lookup the 8bpp colour index and translate it to 32bpp. Haven't tried though if this works in practice.Zephyris wrote:How does 2CC work with the extra zoom level method of CC recolouring? If a 2CC palette index is in the mask image does it get recoloured correctly?
Cmoiramain: added to my personal list of items to solve.
32bit Graphics Extra Zoom Patch
Moderator: Graphics Moderators
-
- Tycoon
- Posts: 1829
- Joined: 10 Jul 2006 00:43
- Location: Spain
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
- Attachments
-
- Screenshot.
- two_cc.JPEG (75.82 KiB) Viewed 4592 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
a lot of potentialmaquinista wrote:The feature that allows station tiles with two or more ground sprites is awesome.

Re: [32bpp] Extra zoom levels, experimental new CC algorithm
thanks for the binnaries great patch gives me a new interest in the game 

Re: [32bpp] Extra zoom levels, experimental new CC algorithm
So, what have I done wrong?
Using the x64 version posted here.
An example sprite and mask are attached.
(I am referring to the lack of shading on the CC and 2CC, not the messed up offsets)Using the x64 version posted here.
An example sprite and mask are attached.
- Attachments
-
- 1004_z0.png (10.37 KiB) Viewed 4358 times
-
- 1004_z0m.png (1.41 KiB) Viewed 4358 times
-
- Tycoon
- Posts: 1829
- Joined: 10 Jul 2006 00:43
- Location: Spain
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
The CC mask are good, They are in indexed mode and They have the correct values.
Try to take another screenshot with less saturation. Open the view port, and hold the 3 key two or three seconds, and press CTRL + R.
The problem could be caused by the CC algorithm. It's experimental and It could have some improvements.
IMHO the algorithm shouldn't increase the original saturation of the pixels. It should be allowed only to decrease it.
I could try to modify the CC algorithm, but I don't know where the saturation is modified.
Try to take another screenshot with less saturation. Open the view port, and hold the 3 key two or three seconds, and press CTRL + R.
The problem could be caused by the CC algorithm. It's experimental and It could have some improvements.
IMHO the algorithm shouldn't increase the original saturation of the pixels. It should be allowed only to decrease it.
I could try to modify the CC algorithm, but I don't know where the saturation is modified.
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
Ummm, This doesn't seem to do anything... I tried it in the main viewport and an extra viewport.maquinista wrote:Open the view port, and hold the 3 key two or three seconds, and press CTRL + R.
Having helped write the algorithm I think I can help here! The algorithm can't calculate the saturation of a pixel in the sprite (easily) without knowing the hue of that pixel, and there is no standard hue used across original sprites for CC regions. Therefore the algorithm simply ignores the hue and saturation data of the original sprite and only uses the pixel brightness for the CC calculation. It should never give the result I am seeing as there is definately an underlying variation in brightness.maquinista wrote:IMHO the algorithm shouldn't increase the original saturation of the pixels. It should be allowed only to decrease it.
As I understand it the saturation is stored in the presets for company colours, so this would be the place to change it.maquinista wrote:I could try to modify the CC algorithm, but I don't know where the saturation is modified.
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
Does this give some hint to the problem? It looks to me that the CC algorithm isn't running at all for some reason; I would expect the company colour schemes to look different (ie. no difference between red/pink etc). If the new CC algorithm isn't running that would explain why the lorry sprite CC is being recoloured to flat CC (the colour on the mask sprite) instead of being calculated properly...
- Attachments
-
- Screenshot2.png (39.91 KiB) Viewed 4330 times
-
- Tycoon
- Posts: 1829
- Joined: 10 Jul 2006 00:43
- Location: Spain
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
The saturation (or chroma) is the difference between the highest RGB value and the lower value. It can be calculated easily from original colours.Zephyris wrote:Having helped write the algorithm I think I can help here! The algorithm can't calculate the saturation of a pixel in the sprite (easily) without knowing the hue of that pixel, and there is no standard hue used across original sprites for CC regions. Therefore the algorithm simply ignores the hue and saturation data of the original sprite and only uses the pixel brightness for the CC calculation. It should never give the result I am seeing as there is definately an underlying variation in brightness.maquinista wrote:Open the view port, and hold the 3 key two or three seconds, and press CTRL + R.
http://en.wikipedia.org/wiki/HSL_and_HSV#Hue_and_chroma
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
Apologies, you are totally right. I had another look over the code and the info taken from the sprite is the saturation and the brightness, only hue is ignored. The company colour is produced by adjusting the saturation and hue, and if I understand the CC presets right then the saturation modifications are either nil or less saturated.maquinista wrote:The saturation (or chroma) is the difference between the highest RGB value and the lower value. It can be calculated easily from original colours.
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
Looking at the purple letters, I'd say you started the 32bpp-simple, iso of 32bpp-optimized blitter. And then you have the original sprite masking. Zooming out probably looks funny too.
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
Aaaah, thankyouGeekToo wrote:Looking at the purple letters, I'd say you started the 32bpp-simple, iso of 32bpp-optimized blitter. And then you have the original sprite masking.

Re: [32bpp] Extra zoom levels, experimental new CC algorithm
Update:
-sync to trunk
+
-force to always use the 32bpp-optimized blitter
-better catenary drawing order
-solved some problems with track fence drawing
-minor fixes
-sync to trunk
+
-force to always use the 32bpp-optimized blitter
-better catenary drawing order
-solved some problems with track fence drawing
-minor fixes
- Attachments
-
- 32bpp_19167_v13.diff
- (82.07 KiB) Downloaded 141 times
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
binaries
- Attachments
-
- OpenTTD 32Bpp.r19180.Win32.rar
- (3.3 MiB) Downloaded 297 times
-
- OpenTTD 32Bpp.r19180.Win64.rar
- (3.76 MiB) Downloaded 202 times
-
- 32bpp_19167_v13.diff
- (82.07 KiB) Downloaded 192 times
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
Try to upload the correct diff file, for 19167, as I see you've upload GeekToo's diff.neob wrote:binaries
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
i applied his 19167 diff on the trunk which was 19180, no conflicts, no errors.
is that a problem?
is that a problem?
- NekoMaster
- Tycoon
- Posts: 4001
- Joined: 16 Aug 2008 22:26
- Skype: neko-master
- Location: Oshawa, Ontario, CANADA
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
Probably not, but try testing everything just to make sureneob wrote:i applied his 19167 diff on the trunk which was 19180, no conflicts, no errors.
is that a problem?


Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
No, just provide the new diff. Even when there aren't conflicts, there are usually some offsets.neob wrote:i applied his 19167 diff on the trunk which was 19180, no conflicts, no errors.
is that a problem?
What else should neob have tested, exactly?NekoMaster wrote:Probably not, but try testing everything just to make sure
-
- Transport Coordinator
- Posts: 282
- Joined: 02 Apr 2009 21:57
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
thanks GeekToo for the patch, and thanks neob for the various binaries!GeekToo wrote:Update:
-sync to trunk
+
-force to always use the 32bpp-optimized blitter
-better catenary drawing order
-solved some problems with track fence drawing
-minor fixes
Re: [32bpp] Extra zoom levels, experimental new CC algorithm
a quick question regarding the scale algorithm, if there a z2(32bpp in normal zoom) sprite presented but no z0 (fullzoom)
which sprite will the algorithm scale the z2 or the 8bpp ?
---
p.s. Antonio1984, thanks but its 'GeekToo' who does all the heavy lifting
which sprite will the algorithm scale the z2 or the 8bpp ?
---
p.s. Antonio1984, thanks but its 'GeekToo' who does all the heavy lifting

Re: [32bpp] Extra zoom levels, experimental new CC algorithm
the 8bpp for zoom in, the 32bpp for zoomout
Who is online
Users browsing this forum: Google [Bot] and 10 guests