Bounding boxes

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

User avatar
stefino_cz
Transport Coordinator
Transport Coordinator
Posts: 268
Joined: 02 Jul 2015 08:05
Location: Czech Republic
Contact:

Bounding boxes

Post 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.
Image
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Bounding boxes

Post 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
User avatar
stefino_cz
Transport Coordinator
Transport Coordinator
Posts: 268
Joined: 02 Jul 2015 08:05
Location: Czech Republic
Contact:

Re: Bounding boxes

Post 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.
Image
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Bounding boxes

Post 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.
Being a retired OpenTTD developer does not mean I know what I am doing.
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: Bounding boxes

Post by Leanden »

CETS and Britrains both had vehicles longer than 8 without any bugs that ive seen.
Image
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7238
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: Bounding boxes

Post 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.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: Bounding boxes

Post 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?
Image
User avatar
stefino_cz
Transport Coordinator
Transport Coordinator
Posts: 268
Joined: 02 Jul 2015 08:05
Location: Czech Republic
Contact:

Re: Bounding boxes

Post 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 3497 times
2.JPG
2.JPG (145.86 KiB) Viewed 3497 times
3.JPG
3.JPG (80.98 KiB) Viewed 3497 times
Image
User avatar
stefino_cz
Transport Coordinator
Transport Coordinator
Posts: 268
Joined: 02 Jul 2015 08:05
Location: Czech Republic
Contact:

Re: Bounding boxes

Post 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
Image
User avatar
Gwyd
Chief Executive
Chief Executive
Posts: 721
Joined: 17 Apr 2017 16:52
Location: Western Ile-de-France Region

Re: Bounding boxes

Post by Gwyd »

Can't you just set car length to 9, 10, 11?
User avatar
stefino_cz
Transport Coordinator
Transport Coordinator
Posts: 268
Joined: 02 Jul 2015 08:05
Location: Czech Republic
Contact:

Re: Bounding boxes

Post 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.
Image
User avatar
Gwyd
Chief Executive
Chief Executive
Posts: 721
Joined: 17 Apr 2017 16:52
Location: Western Ile-de-France Region

Re: Bounding boxes

Post by Gwyd »

NML might throw up a problem if you set length > 8. I might try something
User avatar
stefino_cz
Transport Coordinator
Transport Coordinator
Posts: 268
Joined: 02 Jul 2015 08:05
Location: Czech Republic
Contact:

Re: Bounding boxes

Post 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
Image
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: Bounding boxes

Post by Leanden »

I believe for britrains we set the length as 8, and then override it to 13 in the graphics block.
Image
User avatar
stefino_cz
Transport Coordinator
Transport Coordinator
Posts: 268
Joined: 02 Jul 2015 08:05
Location: Czech Republic
Contact:

Re: Bounding boxes

Post 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?
Image
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: Bounding boxes

Post 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.
Image
User avatar
V453000 :)
President
President
Posts: 946
Joined: 01 Feb 2011 11:22
Location: Beer

Re: Bounding boxes

Post 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.
ImageImageImage
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: Bounding boxes

Post by Leanden »

Seems not, hopefully oberhuemer can shine some light this way as to how he achieved it.
Image
User avatar
Gwyd
Chief Executive
Chief Executive
Posts: 721
Joined: 17 Apr 2017 16:52
Location: Western Ile-de-France Region

Re: Bounding boxes

Post 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.
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: Bounding boxes

Post 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?
Image
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 5 guests