Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed Jun 19, 2013 12:42 am

All times are UTC




Post new topic Reply to topic  [ 748 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 38  Next
Author Message
PostPosted: Thu Jan 24, 2008 4:29 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Nov 20, 2005 1:56 am
Posts: 1225
Location: Dubai, UAE
...reminds me of this stunning mock-up, from some time ago.

_________________
Ben


Top
 Profile  
 
PostPosted: Fri Jan 25, 2008 11:13 pm 
Offline
President
President
User avatar

Joined: Sun Jun 03, 2007 10:22 pm
Posts: 949
So here it is: a new revision of the patch

What's improved
-------------------
-automatic resize of z0 sprites to more zoomed out levels, so you don't have to pngcodec every zoom level, and 32bpp sprites are also shown in zoomed out levels.
-city names etc are now shown correctly in more zoomed out levels
-vehicles are shown correctly on more zoomed out levels on the right and bottom parts of the screen ( this wasn't on the bug list, 'cause you guys did not find it, but I knew it was there. Try to run a bus line, zoom out from the normal level, and scroll the screen so the bus is in the right half of the screen, and you'll know what I mean.
-I implemented the improved algorithm for company colours ( it does have some nasty side-effects, like drawing all 8 bpp recoloured sprites in a funny colour, but they need to be replaced anyway )


Still not right:
============
-plane shadows
-company colours only work for a limited number of colours, I do have ideas how to solve this, but I wanted to give you the chance to play with the blending already. So the hue of the recoloured sprites is not correct, but some colour variations are already possible. I'm still working on this, so this certainly isn't the last revision of the patch.

How to apply company colour
===========================
Create an 8bpp indexed colour mask file: nnnn_zxm.png nnnn=sprite number, x=zoomlevel. No need to pngcodec it.
Draw pixels in the colour index range 196-203 where the CC must be applied.
Put the mask file in the same directory as the sprite to replace( like bin/data/sprites/trg1r)
I've added some example files of my foster bus(one view only) to show the mechanism. The masking of it is still sloppy, because I just made a quick mask to try the code.

As usual, any comment is welcome.

PS: in contrast to what I said before, don't grayscale the sprite on the places where CC must be applied, I use the colour information to determine the saturation level. ( Sorry for the artists that already did that, that's the risk of jumping on a running train, or ongoing development)


Attachments:
32bpp_11813_v7.diff [80.53 KiB]
Downloaded 93 times
3097_z0.png
3097_z0.png [ 12.69 KiB | Viewed 3589 times ]
3097_z0m.png
3097_z0m.png [ 1.03 KiB | Viewed 3591 times ]
Top
 Profile  
 
PostPosted: Sat Jan 26, 2008 7:50 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Sun Oct 07, 2007 3:10 pm
Posts: 277
Location: Prague, Czech Republic
Well, good CC is implemented. I don't like that sprites are resized also to z1 and z2. I'd like to see that sprites are resized only to z3 and above. Not to z1 and z2.

_________________
Soeb

-- This user is inactive here, to contact me, please send me an e-mail. I'm always willing to answer any questions about graphic coding (or any other stuff I might know about in ottd), though my information might be quite outdated. --


Top
 Profile  
 
PostPosted: Sat Jan 26, 2008 9:10 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Wed Feb 28, 2007 9:02 am
Posts: 137
Location: Czech Republic - Středočeský kraj - Benešovsko - Buková Lhota :)
Windows binary, please. :oops: :roll:

_________________
Sorry for my very bad English!!! :(
I am 3dsmax artist.


Top
 Profile  
 
PostPosted: Sat Jan 26, 2008 10:14 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Nov 20, 2005 1:56 am
Posts: 1225
Location: Dubai, UAE
Great work as per usual. I think having sprites resize to z1 and z2 if there is no available sprite is great, since otherwise we may just be making sprites ourselves which are just resized in the same way as done in game, which seems a waste of time, and size of the graphics .tars.

_________________
Ben


Top
 Profile  
 
PostPosted: Sat Jan 26, 2008 10:17 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Sun Oct 07, 2007 3:10 pm
Posts: 277
Location: Prague, Czech Republic
But for example your roads don't compare fine with grass. That's why I don't like it. Maybe something like patch option would be possible.

_________________
Soeb

-- This user is inactive here, to contact me, please send me an e-mail. I'm always willing to answer any questions about graphic coding (or any other stuff I might know about in ottd), though my information might be quite outdated. --


Top
 Profile  
 
PostPosted: Sat Jan 26, 2008 10:21 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Nov 20, 2005 1:56 am
Posts: 1225
Location: Dubai, UAE
For examples, like the road or grass, then I intend to make different zoom level sprites. Because details need to be emphasised in the lower zooms. i.e. the road markings, or the contrast in greens. It's not going to stop people from adding sprites for z1 and z2, but if they are unavailable it will resize. (assuming I have understood it correctly)

_________________
Ben


Top
 Profile  
 
PostPosted: Sat Jan 26, 2008 10:28 am 
Offline
Engineer
Engineer
User avatar

Joined: Tue Jun 27, 2006 11:07 pm
Posts: 66
I have made new windows binaries ;).
Looking good!

I did find some resizing issues on the max zoomed out level. My road depot became bigger instead of smaller :D.

----------

EDIT:
It seems I had uploaded the diff file :D.
Now the correct rar is attached ;).


Attachments:
File comment: V7 windows binaries
NewZoomLevels_V7.rar [2.26 MiB]
Downloaded 227 times
Top
 Profile  
 
PostPosted: Sat Jan 26, 2008 3:16 pm 
Offline
Engineer
Engineer

Joined: Fri Jan 25, 2008 2:34 pm
Posts: 5
Location: NL
Hi

Great patch.
Love the additional zoom levels.
New transparency look great to.

Something that could be considered a personal preference. (for fine tuning later)
The income/cost message scroll-up speed in maximum (z0) zoom level seems a little to high for comfortably reading.

M.v.Gulik.


Top
 Profile  
 
PostPosted: Sat Jan 26, 2008 3:50 pm 
Offline
Engineer
Engineer
User avatar

Joined: Sat Sep 22, 2007 12:45 pm
Posts: 44
Nickman wrote:
I have made new windows binaries ;).
Looking good!

I did find some resizing issues on the max zoomed out level. My road depot became bigger instead of smaller :D.

----------

EDIT:
It seems I had uploaded the diff file :D.
Now the correct rar is attached ;).



ive used ur rar fie but weirdly it looks like it is the same version as the fisrt binery you made eg sprites arnt being rezised in z2 level, Wrond diff patched? or is it ment to be like that


Top
 Profile  
 
PostPosted: Sat Jan 26, 2008 4:16 pm 
Offline
Engineer
Engineer
User avatar

Joined: Tue Jun 27, 2006 11:07 pm
Posts: 66
bazil14 wrote:
ive used ur rar fie but weirdly it looks like it is the same version as the fisrt binery you made eg sprites arnt being rezised in z2 level, Wrond diff patched? or is it ment to be like that


Hmm, I'll take a look at it... Let me get back at you ;)

------

I just tried it out and it seems to be working just fine over here... The date stamp of the .exe file is also the current day so... :s
could someone else confirm if this is the correct version or not? If not I will re compile and republish ;).


Top
 Profile  
 
PostPosted: Sat Jan 26, 2008 10:59 pm 
Offline
President
President
User avatar

Joined: Sun Jun 03, 2007 10:22 pm
Posts: 949
Ben_Robbins_ wrote:
For examples, like the road or grass, then I intend to make different zoom level sprites. Because details need to be emphasised in the lower zooms. i.e. the road markings, or the contrast in greens. It's not going to stop people from adding sprites for z1 and z2, but if they are unavailable it will resize. (assuming I have understood it correctly)


Completely right.

If graphics don't match nice, that must be solved in the graphics.

A little more explanation: the patch now resizes 32bpp also to the more zoomed out levels, previously it only rescaled 8bpp sprites.
This does mean: for all viewport sprites, provide a z0 sprite, and the game will take care of resizing to more zoomed out levels. Only when you want more detail in the z1, z2 etc you need to provide these too. For GUI sprites, in general, provide a z2, ( or z0, or z1 which will then be resized), because GUI sprites don't get zoomed.

The way that sprites are searched: try the current zoom level, if no sprite is present, try the next more zoomed in level and resize that etc.
If no more zoomed in level is found, it falls back to searching 8bpp and resized that. For 32bpp sprites it never resizes a sprite to a more zoomed in level, because that's always ugly. It only does it with 8bpp sprites, so you can at least see what is supposed to be shown on a tile, else it would be black. When all 32bpp sprites are present, rescaling to double size will never be needed.

Nickman wrote:
I did find some resizing issues on the max zoomed out level. My road depot became bigger instead of smaller

Can you provide a sprite for this? For vehicles and landscape sprites I did not see this issue

MvGulik wrote:
Something that could be considered a personal preference. (for fine tuning later)
The income/cost message scroll-up speed in maximum (z0) zoom level seems a little to high for comfortably reading.


I'll add it to to todo list

Nickman wrote:
I just tried it out and it seems to be working just fine over here... The date stamp of the .exe file is also the current day so... :s
could someone else confirm if this is the correct version or not? If not I will re compile and republish


I did not check yet, as I'm on Linux now, and would need to reboot, but you can check it easy: if 32bpp sprites get resized to the z3 level
that is one level more zoomed out than the default level, it's ok.
Another check: Put the example png's I posted above, in the data/sprites/trg1r directory ( they're coded ), and look at the company colours on the bus. If it shows a flat colour, it's the old patch, if the lighting is ok, it's the new one.


Top
 Profile  
 
PostPosted: Sun Jan 27, 2008 8:59 am 
Offline
Engineer
Engineer
User avatar

Joined: Tue Jun 27, 2006 11:07 pm
Posts: 66
Wehn I zoom out to the max level there are things that don't get scaled:
- Roed depot
- some trees?
- The sign posts

The roads seem to scale perfectly, but it's the 8bpp graphics that I mentioned that don't scale, they keep there original size I think. It does give a cartoonisch view of the map :).

If you want to I'll grab a screenshot?


Top
 Profile  
 
PostPosted: Sun Jan 27, 2008 10:29 am 
Offline
Engineer
Engineer
User avatar

Joined: Sat Sep 22, 2007 12:45 pm
Posts: 44
@Nickman

hey, just so you know what is happening on my version i have attached this screenshot

dunno if it still does this on the patch geektoo realised but it does on your windows version (probely not your fault)
also it happens with rails too :!:

It probely isnt your fault and maybe its my pc messing up (but it is pretty new)

-Bazil14


Attachments:
File comment: happens to railway too
No_resizing.png [1.23 MiB]
Downloaded 326 times
Top
 Profile  
 
PostPosted: Sun Jan 27, 2008 12:16 pm 
Offline
President
President
User avatar

Joined: Sun Jun 03, 2007 10:22 pm
Posts: 949
I saw this once on the windows version, and tried to reproduce it, but couldn't yet.
Try the following: rename all tars in the data dir to .tr
rename the sprites directory to spritesbak
remove all newgrf in the newgrf setting window or cfg file.

start ottd again ( as always with the 32bpp-optimized blitter )
It should display correct.
Now add one tar and restart ottd etc.

when all tars are added again, rename the spritesbak dir to sprites again.

Maybe that gives an indication when the problem occurs.

@Nickman, I saw the problem with the depots etc, that clearly must be added to the buglist. Thanks for finding it.


Top
 Profile  
 
PostPosted: Sun Jan 27, 2008 12:54 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Sun Oct 07, 2007 3:10 pm
Posts: 277
Location: Prague, Czech Republic
So ok. Actually I like resizing. But in old revisions it worked better. Roads don't look for me that good for example. Or rails too. Resizing with gimp makes it better.

_________________
Soeb

-- This user is inactive here, to contact me, please send me an e-mail. I'm always willing to answer any questions about graphic coding (or any other stuff I might know about in ottd), though my information might be quite outdated. --


Top
 Profile  
 
PostPosted: Sun Jan 27, 2008 2:11 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Nov 20, 2005 1:56 am
Posts: 1225
Location: Dubai, UAE
Could you post some examples for comparison?

bazil14/geektoo: I'm using the windows version and haven't had this issue.

_________________
Ben


Top
 Profile  
 
PostPosted: Sun Jan 27, 2008 2:31 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Sun Oct 07, 2007 3:10 pm
Posts: 277
Location: Prague, Czech Republic
See screenshots. For example offset generated are worse. Test it by yourself.


Attachments:
File comment: new revision
Unnamed, 1st Jan 2000.png
Unnamed, 1st Jan 2000.png [ 32.56 KiB | Viewed 2619 times ]
File comment: old revision
Unnamed, 4th Jan 1950.png
Unnamed, 4th Jan 1950.png [ 25.46 KiB | Viewed 2616 times ]

_________________
Soeb

-- This user is inactive here, to contact me, please send me an e-mail. I'm always willing to answer any questions about graphic coding (or any other stuff I might know about in ottd), though my information might be quite outdated. --
Top
 Profile  
 
PostPosted: Sun Jan 27, 2008 3:15 pm 
Offline
Engineer
Engineer
User avatar

Joined: Sat Sep 22, 2007 12:45 pm
Posts: 44
found the culprits :P the "temperate set without grass" and "temperate+roads" were messing it up with out those tars it worked perfectly. obvisily your sizing system doesnt like multiple tars with the same sprites in them:P

also a bug for you,

. 8bpp industrys and 8bpp construion stages dont get resized when you zoom out
also you might want to get the game to aa the 32bpp strites when they are resized from z0 zoom into z1 zoom and z2 zoom
.also with the 32bpp bus the game crashes if your zoomed in and you have one (only if you have the mask you made
-Bazil14


Last edited by bazil14 on Sun Jan 27, 2008 4:26 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sun Jan 27, 2008 4:24 pm 
Offline
President
President
User avatar

Joined: Sun Jun 03, 2007 10:22 pm
Posts: 949
bazil14 wrote:
found the culprits :P the "temperate set without grass" and "temperate+roads" were messing it up with out those tars it worked perfectly. obvisily your sizing system doesnt like multiple tars with the same sprites in them:P

. 8bpp industrys and 8bpp construion stages dont get resized when you zoom out
also you might want to get the game to aa the 32bpp strites when they are resized from z0 zoom into z1 zoom and z2 zoom

-Bazil14


Thanks for the research, I guess the second issue is the same as with depots that Nickman reported.
Doing some antialiasing when zooming out is one of the things on my personal to do list, although the current algorithm is already better than the one in trunk.

Soeb, the zooming out can not be worse than in previous revision, because that revision did not zoom out 32 bpp. But things can always be improved


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 748 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 38  Next

All times are UTC


Who is online

Users browsing this forum: Google Feedfetcher and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000-2013 phpBB Group

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2013.
Hosted by Zernebok Hosting.