OpenGFX - Graphics Base Set

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

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5947
Joined: 27 Nov 2004 15:05
Location: Canada

Re: OpenGFX - Graphics Base Set

Post by wallyweb »

xarick wrote:Is someone out there able to, at least, align the SLOPE_NS on OpenGFX, that would be appreciated. Or tell me how to do it.
OpenGFX 0.5.2
Image
Image

Take a look at the y-offset setting in each window. One is -32 and the other is 0.
In NewGRFs this is handled as y-rel in the realsprite code.
I don't know where this code resides in OpenGFX, but I would think that would be where to fix it.
User avatar
GarryG
Tycoon
Tycoon
Posts: 4611
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: OpenGFX - Graphics Base Set

Post by GarryG »

Found a glitch with slope graphics.

When I use the slope tile SLOPE_NW in my slope objects sets I get 3 green pixels.
greendots1.png
greendots1.png (92.33 KiB) Viewed 2998 times
When using OpenGFX+Landscape and Japan Landscape sets these green pixels disappear
nogreendots2.png
nogreendots2.png (117.28 KiB) Viewed 2998 times
Can check out info of this problem at viewtopic.php?f=26&t=74510&start=1060#p1180325

Been suggest that I report the issue with the pixels to devs of Base-OGFX (the thread is here: viewtopic.php?f=26&t=38122 ), so that they can fix the obvious bug in their graphics and/or add boundingboxes to your GRF.

Can you tell me how to add boundingboxes to my GRFs. I am coding in NML.

Cheers
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9430
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: OpenGFX - Graphics Base Set

Post by planetmaker »

OpenGFX 0.5.5 released

An update which brings the GUI sprites for the group livery selections and a lot of translation updates.

Thanks to Gwyd and Brumi for providing the patches.

Code: Select all

OpenGFX 0.5.5 (21 Mar 2019)
---------------------------
- Add: Sprites for group liveries
- Update translations: Czech, German, Hungarian, Japanese, Norwegian (bokmal), Russian, Serbian, Slovak, Swedish, Tamil

As usual get it ingame via content download.
If that's no option use DevZone's bundles server: http://bundles.openttdcoop.org/opengfx/releases/LATEST/
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2842
Joined: 16 May 2007 16:59

Re: OpenGFX - Graphics Base Set

Post by Zephyris »

I have never particularly liked the re-use of my UK Town set sprites in OpenGFX, I never found they had the right feel for the base graphics set... And, especially now screenshots stares at me on Steam all the time, I had an irresistible urge to make some new sprites!

These should be new sprites for all the temperate town sprites, except fountains, parks and statues. They much more closely match the original graphics building shapes (plus or minus a few pixels) and should have all necessary ground tiles, construction stages and palette usage for recolouring...
Attachments
20220107_towns_temperate_64.zip
(170.08 KiB) Downloaded 15 times
officeblocks_8bpp.png
officeblocks_8bpp.png (15.09 KiB) Viewed 1000 times
tallofficeblock_8bpp.png
tallofficeblock_8bpp.png (21.36 KiB) Viewed 1000 times
User avatar
supermop
Tycoon
Tycoon
Posts: 1094
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: OpenGFX - Graphics Base Set

Post by supermop »

I Love these! Can't wait to use these in game! Also saves me from trying to replace the most out-of place looking ones with a static grf myself, as I'm doing with tropic houses.

I do have to question the builders' approach to constructing some of these, particularly the Normal Foster-y looking one. Not sure I'd try to build all the window mullions up to the skylights first before any of the structural core!
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2842
Joined: 16 May 2007 16:59

Re: OpenGFX - Graphics Base Set

Post by Zephyris »

Thanks! I do agree about the construction stages, but I wanted to focus on getting a complete set - construction polish can come later.

I wish there was a tool to profile sprite usage - I'd love to know which sprites are most displayed/visible in game to prioritise which to spend time improving.
User avatar
supermop
Tycoon
Tycoon
Posts: 1094
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: OpenGFX - Graphics Base Set

Post by supermop »

Zephyris wrote: 10 Jan 2022 09:57 Thanks! I do agree about the construction stages, but I wanted to focus on getting a complete set - construction polish can come later.

I wish there was a tool to profile sprite usage - I'd love to know which sprites are most displayed/visible in game to prioritise which to spend time improving.
Unfortunately, the best I've figured out how to do is just brute force - start lots of games or town in scenario editor, try to grow them and make a rough count/guess.
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2842
Joined: 16 May 2007 16:59

Re: OpenGFX - Graphics Base Set

Post by Zephyris »

How frustrating... Oh well. I'll just have to stick to the ones that stand out to me as problematic. Like the explosion animations!
Attachments
explosion_large.gif
explosion_large.gif (8.09 KiB) Viewed 726 times
explosion_small.gif
explosion_small.gif (2.98 KiB) Viewed 726 times
explosions.zip
(21.38 KiB) Downloaded 5 times
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2842
Joined: 16 May 2007 16:59

Re: OpenGFX - Graphics Base Set

Post by Zephyris »

I'm looking for some NML advice. I'm trying to code up a set of sprites, sloped water for canals/rivers, and I'm getting a puzzling error. Most likely I'm just doing something dumb though :)

Code: Select all

template template_waterslopes(x, y, z) {
	//Flat tile
	//[ 322*z+x*z,   1*z+y*z, 64*z, 32*z-1, -31*z,   0*z ]
	//Sloped tiles
	//[   1*z+x*z,   1*z+y*z, 64*z, 24*z-1, -31*z,   0*z ]
	//[  81*z+x*z,   1*z+y*z, 64*z, 24*z-1, -31*z,   0*z ]
	//[ 161*z+x*z,   1*z+y*z, 64*z, 40*z-1, -31*z,   0*z ]
	//[ 241*z+x*z,   1*z+y*z, 64*z, 40*z-1, -31*z,   0*z ]
	//Flat tile
	[ 0, 0, 1, 1, 0, 0 ]
	//Sloped tiles
	[ 0, 0, 1, 1, 0, 0 ]
	[ 0, 0, 1, 1, 0, 0 ]
	[ 0, 0, 1, 1, 0, 0 ]
}
spriteset (waterfeature_river_waterslopes, "../graphics/terrain/64/universal_watertiles_8bpp.png") {
	template_waterfeature_slopes(80, 0, 1)
}
And the error I get:

Code: Select all

nmlc ERROR: "OpenGFX_EZ_Landscape.nml", line XXX: Read beyond bounds of image file '../graphics/terrain/64/universal_watertiles_8bpp.png'
You can see I've already gone to my "debug mode" and am just using the top left 1x1 region of the image as my sprites, yet I still get this error... What could the issue be?
User avatar
Quast65
Tycoon
Tycoon
Posts: 2085
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: OpenGFX - Graphics Base Set

Post by Quast65 »

Without the actual complete graphics and code it's hard to say, looks to me that something goes wrong with the calculation, coming up with a number that is greater than the actual graphics.

As you are now testing with actual numbers and not use a calculation anymore, you may not need

Code: Select all

(x, y, z)

Code: Select all

(80, 0, 1)
Also in your calculations, you had 4 sloped tiles defined, now just 3.
That may cause errors later on in the code.

Posting the complete code and graphics may be handier to spot and check what may be wrong.

EDIT:
What may be happening...
You want this calculation:
322*1 + 80*1 = 402
But it may be that this happens:
322 * 1+80 *1 = 26082

So you may need this:
[ (322*z)+(x*z), etc etc ]
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9430
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: OpenGFX - Graphics Base Set

Post by planetmaker »

You commented out all the coordinates and just left in the "dummy code". I forgot which is true, however: are you sure that pixel coordinates in the sprites start at 0 and not at 1? Your fixed-number template assumes 0 (and I think the first pixels is at (1,1), thus (0,0) is out-of-bounds)
Alternatively: Why don't you just paste your sprites into the sprite sets OpenGFX uses for those water tiles and build its code unchanged?
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2842
Joined: 16 May 2007 16:59

Re: OpenGFX - Graphics Base Set

Post by Zephyris »

I'm keen to update some of the templates, there's a lot of the codebase which isn't well designed from a graphics point of view, eg. the river bank sprite sheets. My development version uses:

Code: Select all

template template_waterfeature_slopes(x, y, z) {
	//Flat
	//Straight sides
	[  27*z+x*z,  41*z+y*z, 38*z, 19*z-1,  -5*z,   0*z ]
	[  27*z+x*z,  14*z+y*z, 38*z, 19*z-1,  -5*z,  13*z ]
	[   1*z+x*z,  54*z+y*z, 38*z, 19*z-1, -31*z,  13*z ]
	[   1*z+x*z,   1*z+y*z, 38*z, 19*z-1, -31*z,   0*z ]
	//Outer corners
	[  41*z+x*z,  91*z+y*z, 24*z, 12*z-1,   9*z,  10*z ]
	[  21*z+x*z, 101*z+y*z, 24*z, 12*z-1, -11*z,  20*z ]
	[   1*z+x*z,  91*z+y*z, 24*z, 12*z-1, -31*z,  10*z ]
	[  21*z+x*z,  81*z+y*z, 24*z, 12*z-1, -11*z,   0*z ]
	//Inner corners
	[  49*z+x*z, 133*z+y*z, 16*z,  8*z-1,  17*z,  12*z ]
	[  25*z+x*z, 145*z+y*z, 16*z,  8*z-1,  -7*z,  24*z ]
	[   1*z+x*z, 133*z+y*z, 16*z,  8*z-1, -31*z,  12*z ]
	[  25*z+x*z, 121*z+y*z, 16*z,  8*z-1,  -7*z,   0*z ]
	//NW down
	//Straight sides
	[ 223*z+x*z,  41*z+y*z, 37*z, 18*z-1,  -4*z,   0*z ]
	[ 223*z+x*z,   7*z+y*z, 37*z, 18*z-1,  -4*z,   6*z ]
	[ 196*z+x*z,  47*z+y*z, 37*z, 18*z-1, -31*z,   6*z ]
	[ 196*z+x*z,   1*z+y*z, 37*z, 18*z-1, -31*z,   0*z ]
	//Outer corners
	[ 236*z+x*z,  86*z+y*z, 24*z,  9*z-1,   9*z,   5*z ]
	[ 216*z+x*z,  96*z+y*z, 24*z,  9*z-1, -11*z,  16*z ]
	[ 196*z+x*z,  91*z+y*z, 24*z,  9*z-1, -31*z,  10*z ]
	[ 216*z+x*z,  81*z+y*z, 24*z,  9*z-1, -11*z,   0*z ]
	//Inner corners
	[ 244*z+x*z, 127*z+y*z, 16*z,  6*z-1,  17*z,   6*z ]
	[ 220*z+x*z, 139*z+y*z, 16*z,  6*z-1,  -7*z,  18*z ]
	[ 196*z+x*z, 133*z+y*z, 16*z,  6*z-1, -31*z,  12*z ]
	[ 220*z+x*z, 121*z+y*z, 16*z,  6*z-1,  -7*z,   0*z ]
	//SW down
	//Straight sides
	[  92*z+x*z,  41*z+y*z, 38*z, 27*z-1,  -5*z,  -8*z ]
	[  92*z+x*z,  14*z+y*z, 38*z, 27*z-1,  -5*z,   5*z ]
	[  66*z+x*z,  54*z+y*z, 38*z, 27*z-1, -31*z,   5*z ]
	[  66*z+x*z,   1*z+y*z, 38*z, 27*z-1, -31*z,  -8*z ]
	//Outer corners
	[ 106*z+x*z,  91*z+y*z, 24*z, 15*z-1,   9*z,   2*z ]
	[  86*z+x*z, 106*z+y*z, 24*z, 15*z-1, -11*z,  17*z ]
	[  66*z+x*z,  96*z+y*z, 24*z, 15*z-1, -31*z,   7*z ]
	[  86*z+x*z,  81*z+y*z, 24*z, 15*z-1, -11*z,  -8*z ]
	//Inner corners
	[ 114*z+x*z, 133*z+y*z, 16*z, 10*z-1,  17*z,   4*z ]
	[  90*z+x*z, 151*z+y*z, 16*z, 10*z-1,  -7*z,  22*z ]
	[  66*z+x*z, 139*z+y*z, 16*z, 10*z-1, -31*z,  10*z ]
	[  90*z+x*z, 121*z+y*z, 16*z, 10*z-1,  -7*z,  -8*z ]
	//NE down
	//Straight sides
	[ 158*z+x*z,  41*z+y*z, 37*z, 18*z-1,  -4*z,   0*z ]
	[ 158*z+x*z,   7*z+y*z, 37*z, 18*z-1,  -4*z,   6*z ]
	[ 131*z+x*z,  47*z+y*z, 37*z, 18*z-1, -31*z,   6*z ]
	[ 131*z+x*z,   1*z+y*z, 37*z, 18*z-1, -31*z,   0*z ]
	//Outer corners
	[ 171*z+x*z,  91*z+y*z, 24*z,  9*z-1,   9*z,  10*z ]
	[ 151*z+x*z,  96*z+y*z, 24*z,  9*z-1, -11*z,  16*z ]
	[ 131*z+x*z,  86*z+y*z, 24*z,  9*z-1, -31*z,   5*z ]
	[ 151*z+x*z,  81*z+y*z, 24*z,  9*z-1, -11*z,   0*z ]
	//Inner corners
	[ 179*z+x*z, 133*z+y*z, 16*z,  6*z-1,  17*z,  12*z ]
	[ 155*z+x*z, 139*z+y*z, 16*z,  6*z-1,  -7*z,  18*z ]
	[ 131*z+x*z, 127*z+y*z, 16*z,  6*z-1, -31*z,   6*z ]
	[ 155*z+x*z, 121*z+y*z, 16*z,  6*z-1,  -7*z,   0*z ]
	//SE down
	//Straight sides
	[ 287*z+x*z,  41*z+y*z, 38*z, 27*z-1,  -5*z,  -8*z ]
	[ 287*z+x*z,  14*z+y*z, 38*z, 27*z-1,  -5*z,   5*z ]
	[ 261*z+x*z,  54*z+y*z, 38*z, 27*z-1, -31*z,   5*z ]
	[ 261*z+x*z,   1*z+y*z, 38*z, 27*z-1, -31*z,  -8*z ]
	//Outer corners
	[ 301*z+x*z,  96*z+y*z, 24*z, 15*z-1,   9*z,   7*z ]
	[ 281*z+x*z, 106*z+y*z, 24*z, 15*z-1, -11*z,  17*z ]
	[ 261*z+x*z,  91*z+y*z, 24*z, 15*z-1, -31*z,   2*z ]
	[ 281*z+x*z,  81*z+y*z, 24*z, 15*z-1, -11*z,  -8*z ]
	//Inner corners
	[ 309*z+x*z, 139*z+y*z, 16*z, 10*z-1,  17*z,  10*z ]
	[ 285*z+x*z, 151*z+y*z, 16*z, 10*z-1,  -7*z,  22*z ]
	[ 261*z+x*z, 133*z+y*z, 16*z, 10*z-1, -31*z,   4*z ]
	[ 285*z+x*z, 121*z+y*z, 16*z, 10*z-1,  -7*z,  -8*z ]
}
river_temperate_shores_8bpp.png
river_temperate_shores_8bpp.png (8.48 KiB) Viewed 511 times
IMO this is more logical, and is much easier for drawing the actual sprites. I'm also keen to allow for multiple zoom levels simply.

In terms of a specific example of my problems:

Code: Select all

template template_waterslopes(x, y, z) {
	//Flat tile
	[ 322*z+x*z,   1*z+y*z, 64*z, 32*z-1, -31*z,   0*z ]
	//Sloped tiles
	[   1*z+x*z,   1*z+y*z, 64*z, 24*z-1, -31*z,   0*z ]
	[  81*z+x*z,   1*z+y*z, 64*z, 24*z-1, -31*z,   0*z ]
	[ 161*z+x*z,   1*z+y*z, 64*z, 40*z-1, -31*z,   0*z ]
	[ 241*z+x*z,   1*z+y*z, 64*z, 40*z-1, -31*z,   0*z ]
}

spriteset (waterfeature_river_waterslopes, "../graphics/terrain/64/universal_watertiles_8bpp.png") {
	template_waterfeature_slopes(80, 0, 1)
}
universal_watertiles_8bpp.png
universal_watertiles_8bpp.png (11.55 KiB) Viewed 511 times
Here, the image is 467 x 48 pixels. The rightmost sprite is the flat tile sprite, at (322*z+x*z, 1*z+y*z). With a x = 80, y = 0 and z (zoom) = 1, this gives coordinates (322*1+80*1, 1*1+0*1) = (402, 1) which is in bounds. The sprite size is 64*1 x 32*1-1 = 64 x 31, therefore the right-bottommost pixel is (466, 32) which is also in bounds.

Not that I know which of the sprites causes the issues, and NML doesn't report which sprite or which coordinate is out of bounds... All-in-all I'm confused, which is why I think I must be missing something obvious. Unless Quast65 is right about equation evaluation not following BODMAS?
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2842
Joined: 16 May 2007 16:59

Re: OpenGFX - Graphics Base Set

Post by Zephyris »

Some screenies of the temperate towns... I also remade the statue (inc. company statue) and fountain, only the parks remain untouched.
Attachments
temperate_screenshots_1950.png
(267.94 KiB) Not downloaded yet
temperate_screenshots_1970.png
(213.25 KiB) Not downloaded yet
temperate_screenshots_1990.png
(215.98 KiB) Not downloaded yet
User avatar
2TallTyler
Transport Coordinator
Transport Coordinator
Posts: 375
Joined: 11 Aug 2019 18:15
Location: Colorado, USA
Contact:

Re: OpenGFX - Graphics Base Set

Post by 2TallTyler »

These are really nice. Houses are one of the biggest reasons I play with original TTD graphics, and this solves that.

As for the most-common sprites which could be improved, trees are definitely up there (although I don't hate the current trees; they're just a different art style than the very stylized Foster trees).
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2842
Joined: 16 May 2007 16:59

Re: OpenGFX - Graphics Base Set

Post by Zephyris »

How do you feel about the infrastructure sprites? A common classic criticism was that the sprites are too dark or too low contrast.

I've been thinking about the tree sprites too. I think the worst offenders are the tropical cacti... But I agree that the complex palette usage and the noisy outlines of the other trees make their shape stand out less.
User avatar
2TallTyler
Transport Coordinator
Transport Coordinator
Posts: 375
Joined: 11 Aug 2019 18:15
Location: Colorado, USA
Contact:

Re: OpenGFX - Graphics Base Set

Post by 2TallTyler »

I think railway tracks are a bit dark, but roads and catenary don't bother me. I've been playing with TTD graphics for long enough that I'm not the best judge, though, since everything looks different than I'm used to.
User avatar
supermop
Tycoon
Tycoon
Posts: 1094
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: OpenGFX - Graphics Base Set

Post by supermop »

These look awesome! I'm transported back to 1994!

Zephyris wrote: 14 Jan 2022 18:29 How do you feel about the infrastructure sprites? A common classic criticism was that the sprites are too dark or too low contrast.

I've been thinking about the tree sprites too. I think the worst offenders are the tropical cacti... But I agree that the complex palette usage and the noisy outlines of the other trees make their shape stand out less.
Tropic trees certainly need help - I'm staring down this as well right now for Hawaii style stuff. I think an agave/maguey would be a better fit than the saguaro too. I never really use maglev, but the ogfx maglev sprites are really muddy. Another thing I'm keenly aware of due to house sprite work is the ogfx generic paved tile that gets used as a groundsprite.
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2842
Joined: 16 May 2007 16:59

Re: OpenGFX - Graphics Base Set

Post by Zephyris »

Totally agree about the generic town concrete/paving tile. in the original graphics this tile is quite a lot lighter than OpenGFX, and matches the colour of the road pavements. Do you think I should make both lighter in OpenGFX too?

Re. Maglev sprites, I've already been working on those!
Attachments
maglev_temperate_grass_8bpp.png
(19.33 KiB) Not downloaded yet
User avatar
2TallTyler
Transport Coordinator
Transport Coordinator
Posts: 375
Joined: 11 Aug 2019 18:15
Location: Colorado, USA
Contact:

Re: OpenGFX - Graphics Base Set

Post by 2TallTyler »

Zephyris wrote: 15 Jan 2022 10:32 Totally agree about the generic town concrete/paving tile. in the original graphics this tile is quite a lot lighter than OpenGFX, and matches the colour of the road pavements. Do you think I should make both lighter in OpenGFX too?
Yes, definitely. The CHIPS station set tries to mimic this for the concrete slab platform, but the blank tile uses the built-in sprite and doesn't match with OGFX. Redrawing it to match might be a good metric.
chips.png
chips.png (17.7 KiB) Viewed 209 times
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2842
Joined: 16 May 2007 16:59

Re: OpenGFX - Graphics Base Set

Post by Zephyris »

Trying out some town roads and paving. Significantly lighter, with a paving pattern and kerb stones more similar to the original graphics...
screenshot#10_crop.png
screenshot#10_crop.png (119.74 KiB) Viewed 78 times
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 3 guests