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

32bit Graphics Extra Zoom Patch

Post by GeekToo »

As I already told on the forums a couple of times, I did miss the extra zoom levels for the 32bpp graphics a lot. So now the graphics creation is progressing quite nicely, I decided to take a look at the code and try to create a patch to make the extra zoom levels possible again. It did cost me quite a lot of time, but I succeeded!
It is still heavily in development, but I could not wait any longer to present it to you.

Features
---------
-2 extra zoom levels
-transparency options give real transparency
-For now, it only works for the 32bpp-optimized blitter.
-Better zoom out graphics
-Bigger company manager faces
-32bpp company colours iso just 8 colours
-Interpolate 8bpp sprites when zooming in. (V13)
-User modifiable saturation and brightness of company colours

Difference with the now dead 32bpp branch
----------------------------
-in sync with trunk version 16366
-uses new tarloader as used in trunk, so png s must be pngcodec'd. The naming convention (similar to the 32bpp branch: default level zoom: nnnn_z2.png (nnnn is the sprite number), one level zoomed in nnnn_z1.png, 2 levels zoomed in nnnn_z0.png.
-no pixels are left when scrolling most zoomed in level, or moving a window over the viewport. This meant changing the use of the coordinate system, which took a lot of time.
-transparency options give real transparency
-reimplemented the spritecache of Egladil in the trunk
-reimplemented the sprite resizing of Egladil in the trunk, actually this meant only taking the idea, and completely reimplement according to the new situation.

Installation instruction
------------------------
up/downgrade trunkversion to the version indicated in the diff file name

apply the patch and recompile ( maybe someone can create a windows binary(testers, not the one I sent you, some changes were made afterwards), cause I want to spend my time on improving the patch, and not on porting to windows ( I develop on Gentoo Linux ))
put the tar file in the data directory (it's just an example tar, with the new grass)

modify openttd.cfg:
-set sprite_cache_size to 64 to prevent out of sprite memory errors

Done. Start openttd with the 32bpp-optimized blitter. It only works for this blitter. This can also be set in the cfg file, if you want it to be default.


Known bugs
----------

-clicking on cities etc does not work correct on zooms other than default
-smoke on zoom out levels is not correct
-minimap is not always correct
-no sound when you build a train track in most zoomed in level
-problem with foundation on traintrack half tiles
-once reported, when removing crashed trains, game crashes.

-------

Solved
--------
-names of cities etc are not updated correct on zooms other than default, esp. on zoomed out levels.(solved in v7)
-no colour remapping on transparency sprites (solution is known, I will start a discussion about this soon) (solved in v7)
-when loading the sprites, no check is done yet whether a higher level zoom sprite exists, and rescale that. Solution also known, just need to implement it. (solved in v7)
-plane shadows not correct (solved in v8)
-resize of sprites to zoomed out levels is worse than in 32bpp branch (solved in v8)
-implement improved company colour and recolour mapping algorithm ( that is, with more colours than just 8, as in trunk) (implemented in v7, for some colour variations)
-rescale of sloped sprites to half size leaves a black pixel (check this on the zoom out levels) (solved in V9)
-8bpp graphics do not rescale right when zooming outl (solved in V9)
-mixing 32bpp trunk tars with tar in the format of this patch does give graphical problems (solved in V9)
-applying company colours on 32bpp sprites on an RGB pixel value of (0,0,0) does apply fully saturated CC iso black. (solved in V9)

TODO/ Suggestion list
------------
-no optimization has been done yet
-code needs some cleaning up (like commented debug statements, partly improved in V9)
-implement other blitters
-user adjustable transparency
-improve hue of gray/white/transparent colours


------
A lot of thanks must go to the alpha testers for their useful input: Anathasios, Ben Robbins, Wacki, Soeb,
and someone who wants to stay anonymous. Although the bug list is still impressive, so I don't have to be bored the next weeks, they also told me the quality of the patch is equal to, or higher than the last 32bpp branch version, so it is fit to present to a larger audience.

So try it, give some feedback what needs to be solved first, and most important of all: have fun and post those zoomed in tars and screenshots!

Latest version: here
Attachments
grass.tar
(1.37 MiB) Downloaded 2698 times
32bpp_11813_v5.diff
obsolete
(53.47 KiB) Downloaded 2146 times
Last edited by Jupix on 23 Sep 2012 23:47, edited 34 times in total.
Reason: unstickied
User avatar
DeletedUser5
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 07 Oct 2007 15:10

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

Post by DeletedUser5 »

--- NEW POST ---
Isn't needed any more because there's wiki page already:
http://wiki.openttd.org/index.php/32bpp ... oom_Levels

---- OLD POST ---
So I decided to make a list of graphics posted in this theard, or anywhere else.
Tars
Wagons, train and rails and part of station - Graphics by Slye Fox and Ben_Robbins_ coded by Ben_Robbins_
New faces - Graphics by Ben_Robbins_ coded by Ben_Robbins_
Landscape for temperate - Graphics by Ben_Robbins_ coded by Ben_Robbins_ - download interesting graphics ( with or without grid lines ), unpack them to /data/sprites/trg1r and you can play with them. in game!
Desert tiles - Graphics by Wacki coded by Wacki
Tropical bank - Graphics by LordAzamath coded by Soeb offset tweaked by LordAzamath


---- OLDER POST ---
quote="GeekToo"
The naming convention (similar to the 32bpp branch: default level zoom: nnnn_z2.png (nnnn is the sprite number), one level zoomed in nnnn_z1.png, 2 levels zoomed in nnnn_z2.png.
quote

I guess you've meant in last nnnn_z0.png :D

quote="GeekToo"So try it, give some feedback what needs to be solved first, and most important of all: have fun and post those zoomed in tars and screenshots!
quote

So you mean we should post some tars with graphics?
Great work on that.
Last edited by DeletedUser5 on 12 Mar 2008 13:07, edited 10 times in total.
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

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

Post by GeekToo »

Soeb wrote: I guess you've meant in last nnnn_z0.png :D
Correct, I'll edit it.
Soeb wrote: So you mean we should post some tars with graphics?
Yes, absolutely, after all, what's the fun of this patch without beatiful graphics? So let's keep the 32bpp graphics development in the same tempo the 8bpp replacement is progressing.
User avatar
DeletedUser5
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 07 Oct 2007 15:10

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

Post by DeletedUser5 »

Here are few first tars. All graphics by Ben_Robbins_.
Names say all. I did not resized any graphics.
Attachments
selectors_z0.tar
(120 KiB) Downloaded 3073 times
3trees_z0.tar
(810 KiB) Downloaded 6291 times
Last edited by DeletedUser5 on 24 Feb 2008 15:54, edited 1 time in total.
User avatar
Tesseract
Engineer
Engineer
Posts: 55
Joined: 12 Jan 2008 02:52
Location: Ukraine

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

Post by Tesseract »

nice trees. good work
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

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

Post by GeekToo »

Thanks,
And a couple of tars ( only deepest zoom ) more, graphics also by Ben Robbins:
Roads and bumpy grass
Attachments
grass2.tar
(1.71 MiB) Downloaded 842 times
roads.tar
(1.81 MiB) Downloaded 1875 times
User avatar
bazil14
Engineer
Engineer
Posts: 44
Joined: 22 Sep 2007 12:45

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

Post by bazil14 »

im guessing this cant be used on windows yet :( and also i couldnt find the nightly 11813 only 11814 i could find that was near

cant wait to use it

Bazil14
broodje
Director
Director
Posts: 615
Joined: 13 Jul 2003 12:47
Location: Alphen aan den Rijn
Contact:

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

Post by broodje »

Hmm, I fear there are some problems left. It compiled without any problems, but as you can see in the attached screenshot the result for the zoomed in levels are less than optimal ;).
If I zoom out the whole game hangs and won't come back to life.
I'm playing on vista btw.
Attachments
Rendering problems.png
Rendering problems.png (356.23 KiB) Viewed 67007 times
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

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

Post by GeekToo »

Don't use the animated blitter, only the optimized blitter works ( I think that is the problem )
It is supposed to look like the attachment, tested on Gentoo Linux and Windows XP pro, and probably by some other windows variants too by the alfa testers.
If that does not work, provide a savegame, and what tars you used.
Attachments
Unnamed, 21st Jul 1950.png
Unnamed, 21st Jul 1950.png (227.29 KiB) Viewed 66810 times
zoom in, with transparency
zoom in, with transparency
Unnamed, 25th Jan 1950.png (349.4 KiB) Viewed 66523 times
User avatar
DeletedUser5
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 07 Oct 2007 15:10

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

Post by DeletedUser5 »

Well GeekToo posted some of those graphics but I'll post them anyway. Graphics by Ben_Robbins_
Attachments
roads'n'tunnels_z0.tar
(1.81 MiB) Downloaded 1336 times
Last edited by DeletedUser5 on 24 Feb 2008 15:57, edited 1 time in total.
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

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

Post by Bilbo »

So finally solution for people with large screens compaining that they can't see these tiny things? :)

What about zoom-out? Is the zoomout same as in the "proper zoomout" patch, thus with some sort of antialiasing?

http://tt-forums.net/viewtopic.php?f=33&t=35311

If not, perhaps it would be nice to merge these two together :)

I'll try it and i'll see how many bugs I'll find :)
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
User avatar
DeletedUser5
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 07 Oct 2007 15:10

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

Post by DeletedUser5 »

Another .tar. Graphics also by Ben_Robbins_.
Last edited by DeletedUser5 on 24 Feb 2008 16:01, edited 1 time in total.
User avatar
DeletedUser5
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 07 Oct 2007 15:10

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

Post by DeletedUser5 »

Sorry for double post, but I've noticed a bug. All foundations work but there are some problems with those:
Attachments
Pinnley Transport, 18th Dec 2001.png
Pinnley Transport, 18th Dec 2001.png (146.78 KiB) Viewed 66039 times
broodje
Director
Director
Posts: 615
Joined: 13 Jul 2003 12:47
Location: Alphen aan den Rijn
Contact:

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

Post by broodje »

GeekToo wrote:Don't use the animated blitter, only the optimized blitter works ( I think that is the problem )
It is supposed to look like the attachment, tested on Gentoo Linux and Windows XP pro, and probably by some other windows variants too by the alfa testers.
If that does not work, provide a savegame, and what tars you used.
Ahh, now I remember, you have to read before you complain.... Thanks, you were right, setting the blitter to optimized fixed the problem.
User avatar
bazil14
Engineer
Engineer
Posts: 44
Joined: 22 Sep 2007 12:45

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

Post by bazil14 »

Could you please attach a link to the revision or the zip of it, because trunk version 11813 does not seem to be with all the other revisions on openttd... you know the site :wink: , i cant wait to use this patch and i bet it is good 8), keep developing it mate
User avatar
Nickman
Engineer
Engineer
Posts: 66
Joined: 27 Jun 2006 23:07

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

Post by Nickman »

I've just tried this and I must say it is looking really great!
Yeah, there are some bugs, but it's just cool to see the new zoom levels with the very detailed sprites!

Best of luck with the progress of this project!
User avatar
Wacki
Traffic Manager
Traffic Manager
Posts: 137
Joined: 28 Feb 2007 09:02
Location: Czech Republic
Contact:

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

Post by Wacki »

Thank you once again GeekToo :P
Now, I am able use sprites from trghr so there is first creenshot from tropical climate ;)
Attachments
screenshot_tropical.JPG
(150.17 KiB) Downloaded 856 times
Sorry for my very bad English!!! :(
I am 3dsmax artist.
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

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

Post by GeekToo »

Bilbo wrote: What about zoom-out? Is the zoomout same as in the "proper zoomout" patch, thus with some sort of antialiasing?
Well, I do not know that patch in detail, so I don't know if it's the same. I'll check one of these days.
It does not use 'real' antialiasing, but takes an average (mean?) of four pixels, and then combines them to a resized one. The trunk version just takes one pixel out of 4, and skips the others, and that already makes a lot of difference.


Bazil14: you (or someone else) can build a Windows version by using BuildOTTD ( search on the forum or wiki ).

Soeb: thanks for creating the tars, keep going ! I've added the foundation problem to my bug list.

Wacki: looking very nice, this is a promising start of tropical in 32bpp.

All others, thanks for the nice comments, things will even improve in the near future (when my employer will let me have some time)
Attachments
Binnley Transport, 21st Feb 1950.png
Binnley Transport, 21st Feb 1950.png (798.02 KiB) Viewed 65829 times
User avatar
Nickman
Engineer
Engineer
Posts: 66
Joined: 27 Jun 2006 23:07

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

Post by Nickman »

I'll post a win 32 binary tomorrow ;).
Now it's sleepy time, I have an exam tomorrow so... :D
And I'm on another Pc right now...
RMJ
Traffic Manager
Traffic Manager
Posts: 160
Joined: 24 Sep 2005 13:52
Location: Denmark
Contact:

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

Post by RMJ »

not one single of these work :P how come?. The ones from the Openttdwiki works fine for me..

//RMJ
Feel free to join my server on 90.185.50.242. its coop, meaning 1 company to dominate the whole map :) its more random and not as pro as the Openttd Coop guys.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 16 guests