-

Bugs that are actually features.
Lorash
Inserter
Inserter
Posts: 28
Joined: Sat Jul 15, 2017 6:34 pm
Contact:

-

Post by Lorash »

-
Last edited by Lorash on Thu Oct 24, 2024 1:10 pm, edited 1 time in total.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14335
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.49] Trees popping into view

Post by Rseding91 »

Can you please post a video showing what you're seeing?
If you want to get ahold of me I'm almost always on Discord.
Verhofin
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sun Jun 04, 2017 5:58 pm
Contact:

Re: [0.17.49] Trees popping into view

Post by Verhofin »

Game is modded but I think he means this:

(bottom left of screen)
https://streamable.com/2ngsz
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [0.17.49] Trees popping into view

Post by orzelek »

I think you might need to install Alien Biomes to see this one.
I did not verify with vanilla but with Alien Biomes installed this issue happens constantly. Maybe a base game issue or something that mod is doing with trees that causes this.
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 583
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: [0.17.49] Trees popping into view

Post by Reika »

orzelek wrote: ↑Tue Jun 25, 2019 5:43 am I think you might need to install Alien Biomes to see this one.
I did not verify with vanilla but with Alien Biomes installed this issue happens constantly. Maybe a base game issue or something that mod is doing with trees that causes this.
I have had this with AB snow trees since last year as well; I do not know if it is unique to them, though.
Image
Rseding91
Factorio Staff
Factorio Staff
Posts: 14335
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.49] Trees popping into view

Post by Rseding91 »

Ok, looking at the Alien Biomes mod I see now why it causes pop-in. The mod has extreme tall trees and makes the bounding box a few pixels big.

It has to change one or both of those if it wants to address this problem. The rendering system assumes no entity renders things more than:
  • 6 tiles from the right edge of the bounding box
  • 3 tiles from the left edge of the bounding box
  • 3 tiles from the bottom edge of the bounding box
  • 4 tiles from the top edge of the bounding box
The alien biomes trees in question are both too tall and the shadows too wide for what the game is setup to render. You can see in this image the red squares are the tree bounding boxes, the blue the selection boxes and the pink the render boxes. If the screen area collides with the pink area the tree gets rendered. You can see the problem with the alien biomes tree (it's too big).
tree render areas.PNG
tree render areas.PNG (743.92 KiB) Viewed 3638 times
If you want to get ahold of me I'm almost always on Discord.
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 583
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: [0.17.49] Trees popping into view

Post by Reika »

Rseding91 wrote: ↑Tue Jun 25, 2019 12:06 pm Ok, looking at the Alien Biomes mod I see now why it causes pop-in. The mod has extreme tall trees and makes the bounding box a few pixels big.

It has to change one or both of those if it wants to address this problem. The rendering system assumes no entity renders things more than:
  • 6 tiles from the right edge of the bounding box
  • 3 tiles from the left edge of the bounding box
  • 3 tiles from the bottom edge of the bounding box
  • 4 tiles from the top edge of the bounding box
The alien biomes trees in question are both too tall and the shadows too wide for what the game is setup to render. You can see in this image the red squares are the tree bounding boxes, the blue the selection boxes and the pink the render boxes. If the screen area collides with the pink area the tree gets rendered. You can see the problem with the alien biomes tree (it's too big).

tree render areas.PNG
Making their bounding boxes much larger also means making their collision boxes much larger, right? I do not see that as being anywhere near acceptable to most players, as they would literally form a solid wall in a forest. How about a new "render bounding box" property, akin to the recently-added "map generation bounding box" one?
Image
Rseding91
Factorio Staff
Factorio Staff
Posts: 14335
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.49] Trees popping into view

Post by Rseding91 »

Reika wrote: ↑Tue Jun 25, 2019 5:40 pm Making their bounding boxes much larger also means making their collision boxes much larger, right? I do not see that as being anywhere near acceptable to most players, as they would literally form a solid wall in a forest. How about a new "render bounding box" property, akin to the recently-added "map generation bounding box" one?
A different render bounding box would not work for how rendering works. The game does an entity search over the world based off the area the screen is viewing + the mentioned extra area. If your entity does not collide with that entity search it isn't drawn.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 583
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: [0.17.49] Trees popping into view

Post by Reika »

Rseding91 wrote: ↑Tue Jun 25, 2019 6:33 pm
Reika wrote: ↑Tue Jun 25, 2019 5:40 pm Making their bounding boxes much larger also means making their collision boxes much larger, right? I do not see that as being anywhere near acceptable to most players, as they would literally form a solid wall in a forest. How about a new "render bounding box" property, akin to the recently-added "map generation bounding box" one?
A different render bounding box would not work for how rendering works. The game does an entity search over the world based off the area the screen is viewing + the mentioned extra area. If your entity does not collide with that entity search it isn't drawn.
My suggestion is changing the logic to search for that render bounding box, as opposed to the current hardcoded "collision box plus some padding".
Image
Rseding91
Factorio Staff
Factorio Staff
Posts: 14335
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.49] Trees popping into view

Post by Rseding91 »

Reika wrote: ↑Wed Jun 26, 2019 4:15 pm My suggestion is changing the logic to search for that render bounding box, as opposed to the current hardcoded "collision box plus some padding".
What i'm saying is: entity searches only work on bounding box since that's what the entity uses to register itself onto the grid system that entity search uses.

Entity is put into the world -> it uses its bounding box to register that "I am on these parts of the grid system"
Entity search runs -> it iterates the grid system parts that overlap with the area you are searching

It doesn't work to do any other search.
If you want to get ahold of me I'm almost always on Discord.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [0.17.49] Trees popping into view

Post by eradicator »

Rseding91 wrote: ↑Tue Jun 25, 2019 12:06 pm The rendering system assumes no entity renders things more than:
  • 6 tiles from the right edge of the bounding box
  • 3 tiles from the left edge of the bounding box
  • 3 tiles from the bottom edge of the bounding box
  • 4 tiles from the top edge of the bounding box
So basically the current settings are incompatible with any "extremely tall" entity, like chimneys, silos, etc? Could those values be made available as utility constants? As far as i understand the alien biomes trees would work if top/right were incresed by 3 each (which would be a ~10% increase of the scan area on a 1080p screen at zoom=1).
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: ζ—₯本θͺž, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14335
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.49] Trees popping into view

Post by Rseding91 »

Ok, I added the values into utility-constants.lua for the next version of 0.17. They're limited to a minimum of what they are now and a maximum of 15.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to β€œNot a bug”