Question about 32bpp graphics

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
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Question about 32bpp graphics

Post by NekoMaster »

Ive been wondering, since I can't do 3D stuff my self at the moment, would it be possible to say, use 32bpp sprites that are just double the resolution of 8bpp sets (32x12 > 64x24) I wanted to try doing something different by doubling the size of the sprites and using the extra resolution to add a bit more detail. The sprites are still pixle based and have the same orientations as the smaller 32x12 sprites

Would this work or would I have to make my sprites a certain size to work with 32bpp?
Image Proud Canadian Image
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!
Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: Question about 32bpp graphics

Post by Supercheese »

If you're still using palletized sprites, you don't need 32bpp - you just need 8bpp extra zoom!

http://newgrf-specs.tt-wiki.net/wiki/NM ... ve_sprites

Notice:

Code: Select all

alternative_sprites(foster_express_set, ZOOM_LEVEL_IN_2X, BIT_DEPTH_8BPP, "opengfx_generic_trams1.pcx")
2x zoom but still 8bpp - perfectly legal combination. :)


... unless you're trying to make the sprites more detailed on 1x zoom, in which case I'm not sure you can even do that.
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Question about 32bpp graphics

Post by NekoMaster »

Well part of using 32bpp was also for having access to more color for more details since 8bpp is palletised and so theres only so many colors you can use. at 64x24 size, the extra resolution and color depth are actually really nice
Image Proud Canadian Image
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!
Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: Question about 32bpp graphics

Post by Supercheese »

Right, if you want to do away with the palette, then sure, you can use 32bpp, at whatever zoom level you want. In either 8bpp or 32bpp, the 1x zoom tile size in pixels is still the same, though: 64 x 31.
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Question about 32bpp graphics

Post by NekoMaster »

Supercheese wrote:Right, if you want to do away with the palette, then sure, you can use 32bpp, at whatever zoom level you want. In either 8bpp or 32bpp, the 1x zoom tile size in pixels is still the same, though: 64 x 31.
So at 64x31 size, it would work for 32bpp? That would be nice since its easier to add details in pixle sprites at that res and you can make Standard gauge and narrow gauge trains look like standard or narrow gauge
Image Proud Canadian Image
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!
Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: Question about 32bpp graphics

Post by Supercheese »

To the best of my knowledge, whatever size the existing 1x zoom sprite you've got is, that is the size of the sprite that is drawn on the screen at 1x zoom, regardless of bit depth. You cannot take it and double its size and use it for 1x zoom, only 2x.
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Question about 32bpp graphics

Post by Yexo »

The size of the sprite and the color depth (8bpp paletted or 32bpp) are completely independent. You can have 32bpp graphics for the normal zoom level and 8bpp grahpics for 4x zoom-in. The only requirement is that every NewGRF needs to have 8bpp normal-zoom graphics, all other graphics variants are optional.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Question about 32bpp graphics

Post by planetmaker »

Supercheese wrote:To the best of my knowledge, whatever size the existing 1x zoom sprite you've got is, that is the size of the sprite that is drawn on the screen at 1x zoom, regardless of bit depth. You cannot take it and double its size and use it for 1x zoom, only 2x.
While it will be awkward, if that's not the case, sizes need not match exactly between 8bpp and 32bpp. Each zoom level and colour depth has its own sprite sizes and offsets. Take a look at zBase (which uses OpenGFX as its 8bpp base) , if you need inspiration and ideas. Of course ground tile sprite sizes are kinda fixed.

EDIT: Yexo was faster :-)
Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: Question about 32bpp graphics

Post by Supercheese »

Right, what I mean is if you do take that sprite, double its size, and try to use it at the same zoom level, it will show up twice as big, and thus look terribly awkward, no?
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Question about 32bpp graphics

Post by planetmaker »

Supercheese wrote:Right, what I mean is if you do take that sprite, double its size, and try to use it at the same zoom level, it will show up twice as big, and thus look terribly awkward, no?
Yes, sure. If you try to implement 2x or even 4x sprites for the 1x zoom level it will glitch like hell as tile sizes (and every other assumption along that line) don't change just because you use a too big sprite - whatever offsets you give them.
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Question about 32bpp graphics

Post by NekoMaster »

Ok so heres a demo of the idea, though it was done a little fast so its not as good as some other stuff I made

Its suppose to be narrow gauge so the stuff is a little smaller then Standard gauge (probably more like a Switcher or Road Switcher hauling a couple narrow gauge hoppers)
Attachments
64x24 Narrow Gauge Demo.png
64x24 Narrow Gauge Demo.png (4.77 KiB) Viewed 5066 times
Image Proud Canadian Image
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!
TadeuszD
Transport Coordinator
Transport Coordinator
Posts: 329
Joined: 07 Nov 2011 19:32
Location: PL

Re: Question about 32bpp graphics

Post by TadeuszD »

Supercheese wrote:2x zoom but still 8bpp - perfectly legal combination. :)
I just experiment with 2xZOOM and 8bpp in my set.
This is my open wagon in normal zoom:
http://dev.openttdcoop.org/projects/pkp ... x/408w.png
...and its version for 2xZOOM but still 8bpp (the bown is done, the blue is under development yet):
http://dev.openttdcoop.org/projects/pkp ... 08w-x2.png
The violet pixels are recoloured later to current cargo colours.

The result in the game is very nice. :)
Image
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Question about 32bpp graphics

Post by NekoMaster »

TadeuszD wrote:
Supercheese wrote:2x zoom but still 8bpp - perfectly legal combination. :)
I just experiment with 2xZOOM and 8bpp in my set.
This is my open wagon in normal zoom:
http://dev.openttdcoop.org/projects/pkp ... x/408w.png
...and its version for 2xZOOM but still 8bpp (the bown is done, the blue is under development yet):
http://dev.openttdcoop.org/projects/pkp ... 08w-x2.png
The violet pixels are recoloured later to current cargo colours.

The result in the game is very nice. :)
Well I guess my idea is out the window, those 2x Zoom sprites look really good. Though it would be nice if other sets could get extra zoom graphics or 32bpp stuff (I think it would be nice to play NARS2 in 32bbp)
Image Proud Canadian Image
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!
oberhümer
Tycoon
Tycoon
Posts: 1283
Joined: 23 Oct 2009 19:35
Location: Here and there, sometime or another

Re: Question about 32bpp graphics

Post by oberhümer »

There's one coming up, but the 32 bpp are used mostly to get the colors right.
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: Question about 32bpp graphics

Post by Zephyris »

TadeuszD wrote:...and its version for 2xZOOM but still 8bpp (the bown is done, the blue is under development yet):
http://dev.openttdcoop.org/projects/pkp ... 08w-x2.png
I love this, very nice pixel pushing. Are you thinking of doing a test of the 256px tile size too?
TadeuszD
Transport Coordinator
Transport Coordinator
Posts: 329
Joined: 07 Nov 2011 19:32
Location: PL

Re: Question about 32bpp graphics

Post by TadeuszD »

Zephyris wrote:Are you thinking of doing a test of the 256px tile size too?
I'm not saying "no", but now it will be a lot of work for me...
Image
User avatar
prissi
Chief Executive
Chief Executive
Posts: 647
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

Re: Question about 32bpp graphics

Post by prissi »

Since Simutrans has several 128 sized pixel sets with larger engines which are open source, you may want to get some test vehicles from them too:
http://japanese.simutrans.com/index.php ... FTrain%201
http://japanese.simutrans.com/index.php ... FTrain%201
http://simutrans.svn.sourceforge.net/vi ... /vehicles/
I like to look at great maps and see how things flow. A little like a finished model railway, but it is evolving and actually never finished. http://www.simutrans.com
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 26 guests