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

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

Re: [32bpp] Extra zoom levels ! (revived)

Post by GeekToo »

Parallel to some new developments I will present in this thread sooner or later, and complying parts of the code to the standards, I've been working on some issues in the zoomed out level, that were reported in this thread:

-8bpp sprites not resizing right when zooming out
-black pixels on the sloped ground sprites

If someone still sees something wrong in the screenshot( a deliberate mix of 32bpp and 8bpp sprites), please post a reply, now that I'm working on it.
--
PS Ben: I tried to reproduce the problem with the crashed trains, but I couldn't (which does not necessarily mean there is not a problem) . It's just hard to fix a problem I can't reproduce.
I tried for about an hour on zoomed in and normal level, stopping one of the trains, building the missing track and let the trains crash (which btw pointed me to the fact that the crashed vehicles palette definitely needs some work still). When the crashed trains were removed from the game, everything continued normally. So maybe you have to increase the sprite cache size. If someone else can reproduce this, please report so, preferably with debug logging.
Attachments
Predinghead Transport, 16th Jun 1980#2.png
Predinghead Transport, 16th Jun 1980#2.png (218.46 KiB) Viewed 20802 times
User avatar
Ben_Robbins_
Tycoon
Tycoon
Posts: 1234
Joined: 20 Nov 2005 01:56
Location: Abu Dhabi, UAE

Re: [32bpp] Extra zoom levels ! (revived)

Post by Ben_Robbins_ »

hmm I'm very puzzled, I just tried doing the same test again and I can't get it too crash.

I originally tested it 4-5 times, and it consistently happened at the same point. I then checked it with 'crashtest.sav' and it worked. I then uploaded it, and downloaded it from here and checked once more and it worked. I can still make it happen in V6 though...but...I deliberately checked before posting that it was v8, and I was testing some new sprites also which I can see now on checking are not in the sprite folder for pre v8 versions, so I wouldn't have been playing pre v8, unless I am just going mad, which is very possible. So I am very puzzled, and I shall check for it again on the arrival of newer builds. Sorry for taking an hour of your time, and thanks for taken so long to check it out!

I can't see any incorrect scaling on that image though so good work!
Ben
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: [32bpp] Extra zoom levels ! (revived)

Post by Roujin »

Ok, examined your screenshot and there are three spots that came to my attention..

a) (red) the factory seems to have a hole between some sprites, you can see the ground through it
b) (yellow) something is misaligned at this piece of track
c) (blue) what are these white spots at the border of the farmland?
Attachments
edited.png
edited.png (300.51 KiB) Viewed 20654 times
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
User avatar
Korenn
Tycoon
Tycoon
Posts: 1735
Joined: 26 Mar 2004 01:27
Location: Netherlands
Contact:

Re: [32bpp] Extra zoom levels ! (revived)

Post by Korenn »

some of those white spots should be fences, but some of them appear to be bugs ;)
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: [32bpp] Extra zoom levels ! (revived)

Post by GeekToo »

Ben_Robbins_ wrote:Sorry for taking an hour of your time.
Don't be, I do have some experience in software deveoping, and did learn the following the hard way:
-The most disastrous and reproducable crashes are usually the easiest to solve.
-When 1 user has a problem I cannot reproduce, that's usually an indication that there indeed is a problem. The fact that I cannot reproduce, can be caused by different hardware, memory problems etc, etc. Esp. memory problems can cause very random crashes, and are sometimes hard to find. I don't know whether this is the problem here, if I did know, the bug would already be gone.. :)

Because the non-reproducable, intermittent bugs tend to stay in the software as last bugs, I learned to invest some time into them immediately when they arrive. So I'll put it on the bug list anyway, and if it does not happen again for some time, like a month, I'll classify it as an incident.

@Korenn and Roujin: Thanks for finding that, guys. I did find a small bug in the resizing algorithm that caused the white fences to leave a white spot app. half a tile to the right, and did not align the industries right in some cases. I've already solved it, so it should be fixed in the next update. This is exactly one of the reasons why it's nice to develop open source software: fast feedback, and thus fast quality improvement. I mean, this patch is not even a month old, and I feel it's already improved big time thanks to the feedback.
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: [32bpp] Extra zoom levels ! (revived)

Post by GeekToo »

Sorry for the double post, but here's a new revision.

Changelog V9
==============
-8bpp sprites were not scaling right when zooming out
-8bpp sprites were not interpolated right when zooming out
-corrected black pixels on the sloped ground sprites when zooming out
-first effort to comply the code to the standards
-added interpolation when zooming in on the 8bpp sprites, just to make a slightly better image from the original sprites when zooming in. Not perfect in any way, but it will get obsolete when more 32bpp sprites are available.
-company colour was applied in full saturation where the sprite had rgb 0,0,0, i.e. when the original was completely black.
-Compatibility with trunk tars ( for zoom 2 and above ). This caused the graphical problems of Bazil14. So now you can use the 32bpp tars for trunk for the more zoomed out levels.
Attachments
32bpp_12030_v9.diff
(85.66 KiB) Downloaded 1164 times
User avatar
DeletedUser5
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 07 Oct 2007 15:10

Re: [32bpp] Extra zoom levels ! ( update: version 9 )

Post by DeletedUser5 »

Great! This time first :D
How about kind of additional sprite for crashed vehicles. For example your bus isn't in full company colour. As I guess a lot of vehicles won't be made in full CC so it would be great implementation.
User avatar
Nickman
Engineer
Engineer
Posts: 66
Joined: 27 Jun 2006 23:07

Re: [32bpp] Extra zoom levels ! ( update: version 9 )

Post by Nickman »

Again, here are the windows binaries ;).

Have fun with them!
Attachments
extraZooms-32bpp-V9_Win32.zip
Windows binaries of the V9 path
(2.63 MiB) Downloaded 4550 times
User avatar
SupSuper
Engineer
Engineer
Posts: 26
Joined: 13 Apr 2003 19:18
Location: Portugal
Contact:

Re: [32bpp] Extra zoom levels ! ( update: version 9 )

Post by SupSuper »

I've spotted a bug on v9. When zoomed in, the 8bpp sprites show black gridlines between the tiles.
Attachments
gridlines.png
gridlines.png (666.57 KiB) Viewed 19179 times
Water train!
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: [32bpp] Extra zoom levels ! ( update: version 9 )

Post by GeekToo »

@ Soeb: crashed vehicles in the original game are created by changing the palette. If we want to use different sprites for crashed vehicles, we would have to add extra sprites, and I don't know how to do that. The original game just uses a different palette to show crashed vehicles. Maybe it is possible by means of newgrfs (I could ask DaleStan whether it is possible to add extra sprites for crashed vehicles). I like the idea of new sprites for crashed vehicles, and I don't like the format of newgrf, but if that is the only way to do it, so be it.

@NickMan: Thanks(again) for adding the windows binaries!

@SupSuper: The gridlines are caused because I implemented a simple interpolator that does not take into account the transparency. So for transparent areas it interpolates with rgb 0,0,0. So this is not a bug (when you define a bug as erroneous behaviour), but a property of the iinterpolator. I can improve that, but as I said before, this is only temporary, just to create a nicer picture for the zoomed in 8bpp sprites. When more 32bpp sprites are available, this issue will become obsolete. And to enforce that I don't want to become the 8bpp sprite to look too good :D or else 32bpp will never be created , so this is not very high on my prio list.
Eddie
Engineer
Engineer
Posts: 67
Joined: 13 Feb 2007 20:16
Location: Essex, UK
Contact:

Re: [32bpp] Extra zoom levels ! ( update: version 9 )

Post by Eddie »

GeekToo wrote:And to enforce that I don't want to become the 8bpp sprite to look too good :D or else 32bpp will never be created , so this is not very high on my prio list.
Good idea, make 8bpp unbearable so that everyone has to finish the 32bpp project. :bow:
Image
User avatar
DeletedUser5
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 07 Oct 2007 15:10

Re: [32bpp] Extra zoom levels ! ( update: version 9 )

Post by DeletedUser5 »

GeekToo wrote:@ Soeb: crashed vehicles in the original game are created by changing the palette. If we want to use different sprites for crashed vehicles, we would have to add extra sprites, and I don't know how to do that. The original game just uses a different palette to show crashed vehicles. Maybe it is possible by means of newgrfs (I could ask DaleStan whether it is possible to add extra sprites for crashed vehicles). I like the idea of new sprites for crashed vehicles, and I don't like the format of newgrf, but if that is the only way to do it, so be it.
I know. I though there is a way to do it. Like mask is ****_z*m.png so I think there is a way to do it somehow to use ( only when it exist, if not just change palette ) additional sprite for crashed vehicles.
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1790
Joined: 30 Mar 2005 09:43

Re: [32bpp] Extra zoom levels ! ( update: version 9 )

Post by peter1138 »

GeekToo wrote:The original game just uses a different palette to show crashed vehicles. Maybe it is possible by means of newgrfs (I could ask DaleStan whether it is possible to add extra sprites for crashed vehicles).
Bit 7 of property 0xB2 is set when a vehicle is crashed.
GeekToo wrote:And to enforce that I don't want to become the 8bpp sprite to look too good :D or else 32bpp will never be created , so this is not very high on my prio list.
But less chance of the developers accepting it. A basic zoom with no interpolation is preferable to these artefacts.
He's like, some kind of OpenTTD developer.
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: [32bpp] Extra zoom levels ! ( update: version 9 )

Post by GeekToo »

peter1138 wrote: Bit 7 of property 0xB2 is set when a vehicle is crashed.
Ok, thanks, I do not know newgrfs very well, but I will have a look at the patch wiki, and try to understand this. Of course, anyone that already does, feel free to post a newgrf.
peter1138 wrote: But less chance of the developers accepting it. A basic zoom with no interpolation is preferable to these artefacts.
Mmm, you just managed to get it a lot higher on the prio list. So I've got 3 options:
-leave it as it is now (not the preferred option by at least one of the developers)
-improve the interpolation
-revert to the previous version as far as it concerns the zoomed in 8bpp sprites

Since the issue will be obsolete when more 32bpp sprites are available, I think it is going to be option 3, but I'm willing to listen to the users. So if you all think it should be option 2, I'll go for that, so provide some feedback please.
User avatar
SupSuper
Engineer
Engineer
Posts: 26
Joined: 13 Apr 2003 19:18
Location: Portugal
Contact:

Re: [32bpp] Extra zoom levels ! ( update: version 9 )

Post by SupSuper »

I think option 3 is fine, better focus on bigger priorities, and no matter how much you try to enhance it, a 8bpp sprite is always a 8bpp sprite. :)
Water train!
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: [32bpp] Extra zoom levels ! ( update: version 9 )

Post by GeekToo »

SupSuper wrote:No matter how much you try to enhance it, a 8bpp sprite is always a 8bpp sprite. :)
Wise words :D

After some distraction in graphics I did some coding: I ran a gprof profile, and did manage to optimize the blitter with 15% (and there's room for more). Not a very spectacular feature for the average user, but performance is always important in games.

Which leads me to the following question: which improvements/features are considered most urgent?
maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: [32bpp] Extra zoom levels ! ( update: version 9 )

Post by maquinista »

I have made (with GIMP) the sprites 1035 and 1036 with the sprites 1013, 1014,1015 and 1016. Is only the z0 tiles.

I will try it with the sprites 1023 - 1030, but it could be more dificult.

Edit:
Sprites from 1023 to 1026 has been made.
Attachments
rail_partially_z0.tar
Tar file
(411 KiB) Downloaded 567 times
Frist sprite
Frist sprite
1035_z0.png (42.8 KiB) Viewed 17102 times
Second sprite
Second sprite
1036_z0.png (46.38 KiB) Viewed 17032 times
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
User avatar
DeletedUser5
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 07 Oct 2007 15:10

Re: [32bpp] Extra zoom levels ! ( update: version 9 )

Post by DeletedUser5 »

Ben is working on it and those two sprites that you posted were already done ( forgot to add that in my post ). And those are based on old version.
User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Re: [32bpp] Extra zoom levels ! ( update: version 9 )

Post by athanasios »

And shadows are wrong.
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.


I prefer to be contacted through PMs. Thanks.
maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: [32bpp] Extra zoom levels ! ( update: version 9 )

Post by maquinista »

Soeb wrote:Ben is working on it and those two sprites that you posted were already done ( forgot to add that in my post ). And those are based on old version.
Thanks. I will download it.
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 6 guests