Pipeline Tips for 32bpp

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
Openend
Engineer
Engineer
Posts: 36
Joined: 18 Jun 2015 09:09

Pipeline Tips for 32bpp

Post by Openend »

Do you have some tips to share, for the most effective and convinient creation of 32bpp sprites?
My logic is nearing completion and I now want to tackle the drawing stuff.
- I want to do 32bpp, but draw the sprites. (I am aware of the modeling tutorials / templates)
and intend to start with industryTiles.

Is there some sort of template for sprites/spritetiles? (I dont mean the nml structure, but graphical template)
If not, or use is not ideal, how would I best approach the creation of a template?
Any pitfalls you are aware of? Thanks!
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: Pipeline Tips for 32bpp

Post by Eddi »

a template is a "one size fits all" approach to making graphics. you figure out the positions of the sprite, and the position of the drawing within the sprite once at the beginning, and then you use that over and over.

you can, of course, look at other people who did similar things and pick their template.

for industry (or house, etc.) tiles, you should probably start with a basic ground tile, which you just draw over. the anchor point of the sprite should be the back corner of the tile, and you should leave enough room above it to fit buildings. if your image editing program supports layers, you can put the (outline of) the ground tile in a separate layer that you can switch on and off at will, and not actually export into the sprite file used during GRF processing.

the point of the template is that the location of the sprite within the file is always the same (or at least very easy to calculate, without looking at the image).

the difference between 8bpp and 32bpp is just the (lack of) palette, all the locations and sizes should stay the same. if you want to create zoom levels, just double/quadruple every number.

keep in mind that 8bpp normal zoom is required, and if you make these sprites by converting 32bpp into 8bpp, then you need to take special care about not using any flashing/blinking/animated colours, which simple conversion usually fails at.
User avatar
V453000 :)
President
President
Posts: 946
Joined: 01 Feb 2011 11:22
Location: Beer

Re: Pipeline Tips for 32bpp

Post by V453000 :) »

I havent experimented with the original industry sprites yet, but generally I render everything as 256x320 px sprites. For YETI, 4x4 industries are 1024*1280, leaving a headroom of 704px for the top tile, which should be enough for all tall buildings.

Then I just cut the render into separate pieces.

So, you could either create your own industries, draw it as a whole, and add it to the game by NewGRF as a new industry.

OR if you want to replace original industry sprites, I guess you could try to make them all as 256x320 (the height may vary I guess, or you could pick some high value for maximum building height you will never go above. I think 512-1024 is safe.) Then, with everything being in the same format, I -assume- it should be easy to compose things on top of each other - if you have same offsets, I am -assuming- things should come together just as you want them to.

From my experience with other things, it works that way just fine.
ImageImageImage
Openend
Engineer
Engineer
Posts: 36
Joined: 18 Jun 2015 09:09

Re: Pipeline Tips for 32bpp

Post by Openend »

Thanks, that gives me something to chew on :)

I assume it would be best to start with the max size (for max intended zoom), and then shrink the image size down to max zoom level? (like LOD [Level of Detail] in other engines)?
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: Pipeline Tips for 32bpp

Post by Eddi »

that depends on how much work you're willing to put into it.

any of these are valid approaches:
  • only provide standard zoom sprites
  • provide increased zoom sprites (either x2 or x4) and scale the images automatically
  • provide sprites for each zoom level individually
while the details of x4 are probably cool to look at, most people will spend the majority of time in lesser zoom levels, so you should probably make sure those are not terrible.
lukasz1985
Route Supervisor
Route Supervisor
Posts: 429
Joined: 27 Mar 2013 08:58
Location: Strumien
Contact:

Re: Pipeline Tips for 32bpp

Post by lukasz1985 »

If you just want to downsample the graphics for 2x from 4x - then there is no point in doing so - OpenTTD will do it for you. Also by doing so you would grow your set in terms of megabytes by approximate amount of 1/4.
Lauscher
Engineer
Engineer
Posts: 8
Joined: 20 Aug 2014 16:01

Re: Pipeline Tips for 32bpp

Post by Lauscher »

Pipeline is not a good Mode ! Way only a Tram, Car or ???

Why not we on Photo ?

Way not Wind or Solar ? I wait not, I say ca Help 1 I think his give not will it.!
Attachments
Tanker.png
Tanker.png (213.41 KiB) Viewed 374 times
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Pipeline Tips for 32bpp

Post by planetmaker »

lukasz1985 wrote:If you just want to downsample the graphics for 2x from 4x - then there is no point in doing so - OpenTTD will do it for you. Also by doing so you would grow your set in terms of megabytes by approximate amount of 1/4.
While OpenTTD will downsample the sprites from 4x zoom to 2x or 1x zoom, the results may not look like what you want them to look like. I see this effect with the ground sprites from my pota-ghat landscape set. The further you zoom out, the less appealing the landscape looks, the less visible the slopes become. Separate sprites for those levels would remove the problem
Kjaruoaer
Engineer
Engineer
Posts: 1
Joined: 11 Aug 2017 02:47

Re: Pipeline Tips for 32bpp

Post by Kjaruoaer »

I best approach the creation of a template?
คาสิโน
pietballas
Engineer
Engineer
Posts: 17
Joined: 28 Jul 2017 16:36

Re: Pipeline Tips for 32bpp

Post by pietballas »

My approach for my station set

I've setup dummy object [Substitute Modifier in 3dsMAX] in a semi grid 4x8 rotated 0, 90, 180, 270. You then link that your object/s, which will auto rotate them based on your dummy's rotation.

The grid is offset so that they can't cast shadows on one another.
Sample full render
fullrender.png
(1.05 MiB) Not downloaded yet
Render at 2048x1280 gives me zoom level 4 and 512x320 gives me normal zoom level. (Rendering different zoom levels looks a lot better than OpenTTD auto scaling)

Once rendered i run it through a cut process to produce the sprite sheets like these below for zoom 4 and normal zoom.
column 00
column 00
00_0000.png (116.43 KiB) Viewed 374 times
column 01
column 01
01_0000.png (195.92 KiB) Viewed 374 times
The sprite sheets are all the same so you can use the sample sprite loading template with the same offsets.

Piet
User avatar
V453000 :)
President
President
Posts: 946
Joined: 01 Feb 2011 11:22
Location: Beer

Re: Pipeline Tips for 32bpp

Post by V453000 :) »

From past experience I can strongly recommend to render as individual frames whenever possible. I did a lot of testing on camera precision in max, my NUTS scene was rendering 4096x2048 and even with the best settings I was still getting some sub-pixel imprecisions on the biggest range. Sub-pixels might sound minor but when you start combining your station tiles together, it could start being visible.

Especially when you consider how easy it is to just set up a camera which animates. Also, you don't need to cut them in postproduction and use time separation instead, which usually is much simpler for many uses :)

V
ImageImageImage
pietballas
Engineer
Engineer
Posts: 17
Joined: 28 Jul 2017 16:36

Re: Pipeline Tips for 32bpp

Post by pietballas »

Thanks for the tip.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 17 guests