Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by 7th_zorro. 04/20/24 07:29
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (7th_zorro, henrybane, flink, Edgar_Herrera), 758 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Map disappears at certain camera positions #465655
05/08/17 14:22
05/08/17 14:22
Joined: Aug 2014
Posts: 57
Y
Yking Offline OP
Junior Member
Yking  Offline OP
Junior Member
Y

Joined: Aug 2014
Posts: 57
Hello Forum laugh

I have had this problem for a long time but I never had to pay much attention to it until yesterday.

For some reason, when my camera goes too far away from its starting position, the map (and every 3D-object) disappears until I move the camera back.



I am sure there must be a simple reason for this, maybe some kind of range problem? But I am not sure what exactly to look for.

(I only ran the most neccesary functions, not much extra)

Can anyone help me with this laugh ?

Re: Map disappears at certain camera positions [Re: Yking] #465656
05/08/17 14:49
05/08/17 14:49
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Hey

Try to adjust 'camera.clip_near' and 'camera.clip_far' parameters.

Greets!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Map disappears at certain camera positions [Re: 3run] #465657
05/08/17 14:58
05/08/17 14:58
Joined: Aug 2003
Posts: 118
Deutschland
E
Ezzett Offline
Member
Ezzett  Offline
Member
E

Joined: Aug 2003
Posts: 118
Deutschland
3run wrote the answer. But it looks like your y-coordinate jumps around several thousand units when moving. Is this intentional?

Re: Map disappears at certain camera positions [Re: Ezzett] #465658
05/08/17 16:17
05/08/17 16:17
Joined: Aug 2014
Posts: 57
Y
Yking Offline OP
Junior Member
Yking  Offline OP
Junior Member
Y

Joined: Aug 2014
Posts: 57
Hello laugh

Thank you both for your help.
I have tried to double and triple the parameters
Quote:
camera.clip_near = 10;
camera.clip_far = 150000;

But the problem is still the same.

In the .GIF from my original post I move along the y-axis, it jumps around a bit because the .GIF is looping back to the beginning.
Everything disappears when I jump from y=4600 to y=4800 and the x- and z-axis do not help to avoid it.
(My camera movement is relatively fast, that is intentional)

I have placed a couple of objects at y=6000, 8000, 10000 etc. but nothing gets displayed when the camera goes beyond 4800.

Really weird shocked

Last edited by Yking; 05/08/17 16:19.
Re: Map disappears at certain camera positions [Re: Yking] #465660
05/08/17 16:57
05/08/17 16:57
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Your camera is probably leaving the ABTree's maximum dimensions and then just decides to render nothing as the ABT does not return potentially visible objects. For some reason the ABT is not fully updated automatically in A8 (like when you leave its area with your camera or move certain objects beyond that).
It could be that it's using level_ent for the bbox. .. The beta features page says:
Quote:
The level size (level_ent.min_x/max_x) was automatically adapted to the maximum coordinate of an object moved or placed in the level. This led to undesired behavior when the level size was set up manually. It is now only adapted when level_ent.max_x/min_x was changed in the script .

Try debugging/ displaying those values. And/ or place a block in various corners of the map, not just in y direction but in z (and x) direction, too.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Map disappears at certain camera positions [Re: Yking] #465661
05/08/17 16:58
05/08/17 16:58
Joined: Aug 2003
Posts: 118
Deutschland
E
Ezzett Offline
Member
Ezzett  Offline
Member
E

Joined: Aug 2003
Posts: 118
Deutschland
Maybe your level_ent is to small? This is the entity that contains the level:
http://www.conitec.net/beta/level_ent.htm

I see, Superku had the same idea.

Last edited by Ezzett; 05/08/17 17:00.
Re: Map disappears at certain camera positions [Re: Ezzett] #465662
05/08/17 17:40
05/08/17 17:40
Joined: Aug 2014
Posts: 57
Y
Yking Offline OP
Junior Member
Yking  Offline OP
Junior Member
Y

Joined: Aug 2014
Posts: 57
Yes! That did it!

I displayed my level_ent.min_x and level_ent.max_x
and it was suspiciously close to the deadzone

I then placed some blocks in every corner, compiled it and now the values of
level_ent.min_x and level_ent.max_x
went up remarkebly.
And it works perfectly fine now.

All that was in my map previously was terrain, so I guess the values of level_ent.min_x and level_ent.max_x were smaller than my terrain?
Anyway:
I learned something new today and this is very useful to know laugh !

Thank you guys, I will not forget this!

Re: Map disappears at certain camera positions [Re: Yking] #477389
06/21/19 21:08
06/21/19 21:08
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline
User
Dooley  Offline
User

Joined: May 2005
Posts: 868
Chicago, IL
Just came across this same problem. You can also set the min/max like this...


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


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1