Page 1 of 2

Bounding boxes

Posted: 11 Oct 2017 19:17
by stefino_cz
Hi
as you know we are making new 32bpp realistic graphics sets and have troubles with short bounding boxes. Because we solved it with articulated inisible parts where graphics itself is loaded at the middle bounding box. And this is the problem because is partly covered by foreground's graphics . Mainly at bridges or stations. Yes...we have oppoturnity to load graphic to front invisible part but it is really complicated to make. If you have wagons with different refitable cargos etc. So there is really no way how to make this boxes longer than 8? And don't write orthodox answers like "8 long boxes are sufficient for 8bpp etc". If there is possibility to make realistic 32bpp graphics, do something with this, please. Or you really thing that 32bpp is trash and OTTD is based at 8bpp graphics? I'm not a game developer so I have no idea how difficult is to make longer bounding boxes, but it will really to help us and I think that not only to us. There are long vehicles in 8bpp too with the same graphics bugs made by short bounding box.

Re: Bounding boxes

Posted: 11 Oct 2017 20:04
by planetmaker
The sizes of bounding boxes don't have anything to do with the amount of colours. The proportions don't depend on that. And the relative proportions of things are not realistic intrinsically, when you look at distances between towns, at relative sizes of houses vs. road vehicles vs. planes vs. ships...

Making the bounding boxes for rail and road vehicles larger than 8/8 means that their movement around corners will become so more ugly and messy, collision detection needs to be reworked... it opens a whole can of worms

Re: Bounding boxes

Posted: 11 Oct 2017 20:21
by stefino_cz
Yes, I know that it doesn't have anything with graphics depth. Only wanted to say that we need it in 32bpp due more realistic look. In my case I prefer better look instead of "ugly" movements in corners than trains what look like demaged by press. If you will remake it, people who are using 8/8 will still using 8/8. And we will be able to make long vehicles easily.

Re: Bounding boxes

Posted: 12 Oct 2017 14:51
by Alberth
I have no idea what breaks if you extend beyond 8 length, but given that after more than a decade of history of OpenTTD we still have length 8 as maximum is a good indication that it is at least non-trivial to extend it, if it is feasible at all.

I would expect some people must have asked this before you in the past 10 years, and apparently such questions were not answered positively, or we would not have 8 as limit today.

Re: Bounding boxes

Posted: 12 Oct 2017 20:15
by Leanden
CETS and Britrains both had vehicles longer than 8 without any bugs that ive seen.

Re: Bounding boxes

Posted: 12 Oct 2017 23:06
by Redirect Left
Leanden wrote:CETS and Britrains both had vehicles longer than 8 without any bugs that ive seen.
I think the only thing was some clipping issues. Aesthetic issues only.

Re: Bounding boxes

Posted: 13 Oct 2017 06:43
by Leanden
Redirect Left wrote:
Leanden wrote:CETS and Britrains both had vehicles longer than 8 without any bugs that ive seen.
I think the only thing was some clipping issues. Aesthetic issues only.
Not that i recall...

Magbe through tunnel entrances though?

Re: Bounding boxes

Posted: 13 Oct 2017 06:54
by stefino_cz
"Graphics bugs" made by foreground bridge's/stations's sprites. Because we fix length by articulated - for expamle 4+8+4 and the graphics is loaded at the middle bounding box. When the middle box step at the foreground tile, everything is ok. But this situation is repeated due whole bridge/station. Yes...it has no effect at train function but it looks really bad.
1.JPG
1.JPG (94.97 KiB) Viewed 3498 times
2.JPG
2.JPG (145.86 KiB) Viewed 3498 times
3.JPG
3.JPG (80.98 KiB) Viewed 3498 times

Re: Bounding boxes

Posted: 14 Oct 2017 17:48
by stefino_cz
Ok...can you tell me if there is any chance that developers will make somethink with this problem? Because I donĀ“t wanna a situation when we fix it with our complicated solution and you will add any fix one year later. Thanks

Re: Bounding boxes

Posted: 14 Oct 2017 18:03
by Gwyd
Can't you just set car length to 9, 10, 11?

Re: Bounding boxes

Posted: 14 Oct 2017 18:47
by stefino_cz
Gwyd wrote:Can't you just set car length to 9, 10, 11?
8 is maximum or not? Longer vehicles I have to make by articulated parts what are make this graphincs problems.

Re: Bounding boxes

Posted: 14 Oct 2017 21:08
by Gwyd
NML might throw up a problem if you set length > 8. I might try something

Re: Bounding boxes

Posted: 15 Oct 2017 08:13
by stefino_cz
Gwyd wrote:NML might throw up a problem if you set length > 8. I might try something
Yes, it gives an error due length range 1..8

Re: Bounding boxes

Posted: 15 Oct 2017 08:17
by Leanden
I believe for britrains we set the length as 8, and then override it to 13 in the graphics block.

Re: Bounding boxes

Posted: 15 Oct 2017 08:41
by stefino_cz
Leanden wrote:I believe for britrains we set the length as 8, and then override it to 13 in the graphics block.
You think that it will work? I thought that 8 is maximum and bigger boxes have to done by articulated parts. And if you wrote that you override it to 13 in graphics block..I don't know what graphics block? You mean .grf itself?

Re: Bounding boxes

Posted: 15 Oct 2017 08:49
by Leanden
stefino_cz wrote:
Leanden wrote:I believe for britrains we set the length as 8, and then override it to 13 in the graphics block.
You think that it will work? I thought that 8 is maximum and bigger boxes have to done by articulated parts. And if you wrote that you override it to 13 in graphics block..I don't know what graphics block? You mean .grf itself?
Erm, the graphics block in the NML code in question.

I know for a fact we had a length 13 train in Britrains so it is possible. Oberhuemer did the code, but the repo appears to be incomplete.

Re: Bounding boxes

Posted: 16 Oct 2017 18:05
by V453000 :)
Leanden wrote:
stefino_cz wrote:
Leanden wrote:I believe for britrains we set the length as 8, and then override it to 13 in the graphics block.
You think that it will work? I thought that 8 is maximum and bigger boxes have to done by articulated parts. And if you wrote that you override it to 13 in graphics block..I don't know what graphics block? You mean .grf itself?
Erm, the graphics block in the NML code in question.

I know for a fact we had a length 13 train in Britrains so it is possible. Oberhuemer did the code, but the repo appears to be incomplete.
Doesn't look like that's possible.

Re: Bounding boxes

Posted: 16 Oct 2017 19:16
by Leanden
Seems not, hopefully oberhuemer can shine some light this way as to how he achieved it.

Re: Bounding boxes

Posted: 16 Oct 2017 19:23
by Gwyd
I tried this earlier. I had a length callback set to 13. It compiled fine, but the game threw up an error when I ran it.

Re: Bounding boxes

Posted: 16 Oct 2017 19:54
by Leanden
Gwyd wrote:I tried this earlier. I had a length callback set to 13. It compiled fine, but the game threw up an error when I ran it.
What was the ingame error? Got a screenshot?