[FIXED] Entire level vanishes after wandering?

Posted By: MatAllum

[FIXED] Entire level vanishes after wandering? - 08/25/16 02:52

Rendering issue here that I have seen on multiple projects now. When I move too far from the origin of the level (current project tests at about 12000 quants), everything disappears from view.

Turning the camera to some angles causes the level to reappear, but everything (with the exception of skybox) vanishes otherwise, sometimes flicking on and off as I pan the camera around. Debug panel confirms the entities stop rendering.

What on earth is causing this? The level is script generated with no BSP tree information. Level models include static objects with no action, and objects with a simple init action that otherwise do nothing. Am I missing some sort of "max level size" variable I should be setting?

Edit: To further complicate, it only seems to happen when I go too far along the positive Y axis. I can run in any other direction all I want without anything disappearing. Level surface is a tile of randomly-chosen slab models.
Posted By: Reconnoiter

Re: Entire level vanishes after wandering? - 08/25/16 09:20

I cant remember exactly but I thought it was connect with level_ent.max..., something like this:

Code:
vec_set(level_ent.min_x, vector(-900000, -900000, -900000));
vec_set(level_ent.max_x, vector(900000, 900000, 900000));

Posted By: MatAllum

Re: Entire level vanishes after wandering? - 08/25/16 11:10

Gotta love this engine's quirks. That fixed the problem. Thank you!
Posted By: Reconnoiter

Re: Entire level vanishes after wandering? - 08/25/16 13:37

Originally Posted By: MatAllum
Gotta love this engine's quirks. That fixed the problem. Thank you!
, welcome to the magical world of Acknex grin

and glad to be of help
Posted By: Superku

Re: Entire level vanishes after wandering? - 09/13/16 06:09

Once had a similar problem where everything would vanish if I fell too far in my platformer.
It happens when the camera leaves the level(_ent) bounding box as Reconnoiter has already suggested with his fix. The ABTree is spanned and calculated across that box, so when the camera leaves it any query for possibly visible objects gets terminated quickly.
There has been a change at some point to automatic updates of level_ent in relation to (dynamic) entity positions, see "bugs" or "beta features".
Posted By: Reconnoiter

Re: Entire level vanishes after wandering? - 09/13/16 09:06

Originally Posted By: Superku
It happens when the camera leaves the level(_ent) bounding box as Reconnoiter has already suggested with his fix. The ABTree is spanned and calculated across that box, so when the camera leaves it any query for possibly visible objects gets terminated quickly.
, interesting, so through level_ent.min/max one could basically set a custom region?
Posted By: Superku

Re: Entire level vanishes after wandering? - 09/14/16 07:15

Hm you mean as a method to directly influence culling? That's an interesting thought. It may not work (like for example the ABT base region being at least as big as all of the level geometry) but it could be worth a try.
Posted By: Reconnoiter

Re: Entire level vanishes after wandering? - 09/15/16 13:50

Just tested it (*with shade-c) and it doesn't work, it gives also weird shadow-like problems. grin
I would use regions anyway so it doesn't matter.
Posted By: NnamueN

Re: [FIXED] Entire level vanishes after wandering? - 07/25/19 07:10

Hi Guys,

This problem only exists in the Com or Pro version of Gamestudio
as soon as the camera leaves the area of ​​the level_ent.min_x / max

The solution is to adjust the level_ent.min_x / max_x value

just as Reconnoiters wrote it
Quote

vec_set (level_ent.min_x, vector (-900000, -900000, -900000));
vec_set (level_ent.max_x, vector (900000, 900000, 900000));


on the free version, the values ​​are automatically adjusted as soon as the camera leaves the level area (level_ent.min_x/max_x)
At that time I had E-Mail contact with Conitec for the problem, Conitec Support say that it be so corectly
But I say that it is a BUG and I can prove it tongue

This video was made by me at this time to explain the problem
https://www.youtube.com/watch?v=2caQa_2HFYg

Unfortunately, it is in German
ah yes i also apologize for my english wink

cu Roman
© 2024 lite-C Forums