Ground cover vanishing at certain angles? - RESOLVED (THREED-2183) (Fixed/TempFixed)
by Kevin Mitchell · in Torque 3D Professional · 07/11/2011 (4:40 pm) · 36 replies
Had a issue where the ground cover vanishes when rotating the cam to certain angles. It can be seen in the
link here. It keeps vanishing 100% sometimes. Is it because I can view 360 and there's some kind of culling? But its not a V pattern cut off. Anyone experience this too?
link here. It keeps vanishing 100% sometimes. Is it because I can view 360 and there's some kind of culling? But its not a V pattern cut off. Anyone experience this too?
About the author
Riding Solo since 2005. Current Project: Fated World 2005-Present RPG Engine Tool Kit - Now available.
#22
EDIT: Damn, spoke too soon. When you move it, it's fixed. You save the level, and load it up again, it's broken again. Then you move it, and it's fixed, and so on.
07/22/2011 (11:02 pm)
Heh, amazing! Moved it to 0 height and works like a charm. Thanks Ray! =)EDIT: Damn, spoke too soon. When you move it, it's fixed. You save the level, and load it up again, it's broken again. Then you move it, and it's fixed, and so on.
#23
07/22/2011 (11:43 pm)
....Yeouch! I did not notice that. When I get into the office on Monday, I will relook into the issue. Sorry about that : ( Looks like both of us spoke too soon!
#24
I'm not completely certain but I think it happens when the camera is orientated towards one of the primary 90 degree angles (0 0 1 90, 0 0 1 90, 0 0 1 180, 0 0 -1 90).
07/23/2011 (12:30 pm)
I've noticed this when using the stock zoom-in feature.I'm not completely certain but I think it happens when the camera is orientated towards one of the primary 90 degree angles (0 0 1 90, 0 0 1 90, 0 0 1 180, 0 0 -1 90).
#25
Ray, look in the level I sent you. If you are in the "north" side of the level (0, 60), the GC disappears when looking north. When you reach the "south" part of the level (0, -5), the camera disappears when looking south. The same happens on the east side (60, 0), in which disappears when looking east, and on the west side (-5, 0) where it disappears when looking west. There seems to be a "zafe zone" between these coordinates in which it doesn't disappear.
(Coordinates are approximate)
07/24/2011 (10:31 am)
Actually, it's not exactly like that, it also depends on both the position and rotation of the camera. Ray, look in the level I sent you. If you are in the "north" side of the level (0, 60), the GC disappears when looking north. When you reach the "south" part of the level (0, -5), the camera disappears when looking south. The same happens on the east side (60, 0), in which disappears when looking east, and on the west side (-5, 0) where it disappears when looking west. There seems to be a "zafe zone" between these coordinates in which it doesn't disappear.
(Coordinates are approximate)
#26
07/25/2011 (7:48 pm)
I noticed the same thing. It's like if i move to a different quadrant of the map the angle required to make this happen changes. Like there's a center some where. :/ If you still need a file i can upload mines... somewhere...
#27
07/26/2011 (12:16 pm)
I was wondering why the groundcover in the Pacific demo seems to work correctly. I compared the level info with my own level, and found that the demo has visibleDistance set at 1500, and my own level is set at 180. By increasing my visibleDistance, the problem goes away! Conversely, decreasing visibleDistance on the Pacific demo creates the disappearing groundcover problem. There may be a problem with groundcover being incorrectly out of scope, will have to investigate this further.
#28
07/26/2011 (12:28 pm)
In mine it was at 500, changed it to 1000 and the problem disappeared. Strange it was happening in the first place, though.
#29
Yeah, that is kinda odd ... set VisDist to 3000 and I no longer see a problem ...
The lower the visDist the more issues ...
07/26/2011 (1:21 pm)
o_OYeah, that is kinda odd ... set VisDist to 3000 and I no longer see a problem ...
The lower the visDist the more issues ...
#30
bool GroundCover::onAdd()
//Right after
setGlobalBounds();
//add this line:
resetWorldBox();
This seems to do the trick.
07/26/2011 (6:58 pm)
//Okay, I think I found the problem. In groundcover.cpp in the functionbool GroundCover::onAdd()
//Right after
setGlobalBounds();
//add this line:
resetWorldBox();
This seems to do the trick.
#31
07/26/2011 (9:20 pm)
WOOOOOOOOOOOT!
#32
07/26/2011 (9:38 pm)
Bugs bug me, and this one bugged me a lot! T3D is fun once again.
#33
07/27/2011 (5:31 pm)
Good catch!
#34
07/27/2011 (9:00 pm)
So far there has been no negative results to the engines performance because of this code change.
#35
07/28/2011 (9:29 am)
@Tom: Thanks, groundcover is an integral part of my current project, so I had motivation. As they say, necessity is the Mothers of Invention.
#36
10/10/2011 (2:49 pm)
Fixed in 1.2. The fix is the line Joseph posted.
Torque 3D Owner Ray Batts
Sickhead Games
Even though the ground cover deals with the terrain, it's it's own tangible object that has a position, etc and can be culled out. In the files you sent me, Oscar, the ground cover was reeeeeeeeally far away from the terrain. Once I moved the ground cover object closer to the terrain, I could not get it to disappear anymore. In the file Oscar sent me, I simply moved the ground cover object itself a bit up in the Z direction and voila, problem solved.
TLDR: If this is happening to you, your groundcover object is too far away from the terrain. Move it up/closer.