BUG: Terrain in TGEA 1.8.2 has holes in Collision
by Sparkling · in Torque Game Engine Advanced · 07/29/2010 (7:33 pm) · 3 replies
I am using TGEA 1.8.2 to build our game using Megaterrains. We found that after adding objects that using all 4 tiles in the mission was causing too much lag for some people with minimum spec computer, so I deleted 2 of the tiles from the mission and we will zone players to a new mission to access the rest of the map. So in the remaining 2 tiles that we are working with, we have been adding objects, replicators, etc. as would be expected in the creation of a game. At some point in time a collision bug was discovered where players fell through the terrain in specific places. The terrain is still rendered so it appears to be solid, but when the play character walks on it, they fall through the world. It was proposed by one of our developers at the time that perhaps one of the tree models in our replicators has faulty collision and that was causing the holes. We have dozens of tree varieties in the game so I decided to table this for another time when I could go through each type of tree in detail to figure out which one it was. Well, last night I came up with an idea to put in invisible collision boxes to patch what I had believed to be small holes. So I applied a couple patches. And tested it, and it worked. But Once I got beyond the patch I fell through again. After applying about 9 patches I realised, it was NOT just "small" holes, but in fact was an entire mountain that has no collision!!! So I made the drastic change of deleting ALL the tree replicators. Not one tree was left on the entire terrain. Tested again... STILL FELL THROUGH THE WORLD! I'm thinking, no way is this related to the trees. There are no trees! So I thought, I know I will edit the terrain, and save and reload so the game has to recalculate the collision. Nope. That didn't help either. Still fall through.
Does anyone have ANY IDEA why there would be giant holes in the terrain collision, and HOW to fix them? This is a very serious issue. And I am completely out of ideas now, and can't find any blogs, posts or other bug reports in my search on this website that address this issue. Any help would be appreciated. Thanks!
-Laurene Wells
Does anyone have ANY IDEA why there would be giant holes in the terrain collision, and HOW to fix them? This is a very serious issue. And I am completely out of ideas now, and can't find any blogs, posts or other bug reports in my search on this website that address this issue. Any help would be appreciated. Thanks!
-Laurene Wells
About the author
Laurene Wells is the owner of Heaven's Blessings Tiny Zoo (HBTZ). She is Producer of Chariots (2008) and Visions (in production), leading a team of volunteers who collaborate online from around the world. Learn more about the company at http://tinyzoo.com
#2
ALWAYS the terrain. We have started over from scratch THREE TIMES! Each time upgrading to a new engine, and every time it is because of terrain issues. I am SO TIRED of terrain issues.
We are making a MMORPG and editing FIRST and then adding houses LATER just doesn't work. We constantly have to edit the terrain as we build the world.
At least I know I'm not crazy. Thank you for confirming that I am not the only one who has experienced this bug. But wow... this is so discouraging.
Will they EVER get the terrain right for an MMO?
I will try the SET EMPTY brush, I saw that in the editor last night and wondered what it does. I don't have any overlapping terrains though. Just the 2 (of the original 4) tiles from the megaterrain that it generated.
I'll check the height also. Maybe that has something to do with it. I know we raised the terrain at one point in attempt to be able to LOWER the oceans. But it would never let us lower them, no matter what we did to the terrain or how high we raised it. And no one ever responded with a fix for that bug either. So we have 14 foot deep oceans. :(
Terrain is something that players experience every step of their gameplay. It is so critical. I wish we could get it to work right!
Thanks for your feedback. I'll see if I can do anything to rescue the work I've done on it. I really hope I don't have to rebuild the terrain from scratch. I've rebuilt it 3 times already, twice due to the flipped image bug. Once trying to fix the oceans.
I wonder... I'm going to check the terrain before I cut the other half off it. Now that you mention tweaking it breaks it, I don't remember if we had the collision hole bug before I cut the terrain in half...
Thanks for the tips!
God bless you,
-Laurene
07/30/2010 (1:07 am)
*SIGH*ALWAYS the terrain. We have started over from scratch THREE TIMES! Each time upgrading to a new engine, and every time it is because of terrain issues. I am SO TIRED of terrain issues.
We are making a MMORPG and editing FIRST and then adding houses LATER just doesn't work. We constantly have to edit the terrain as we build the world.
At least I know I'm not crazy. Thank you for confirming that I am not the only one who has experienced this bug. But wow... this is so discouraging.
Will they EVER get the terrain right for an MMO?
I will try the SET EMPTY brush, I saw that in the editor last night and wondered what it does. I don't have any overlapping terrains though. Just the 2 (of the original 4) tiles from the megaterrain that it generated.
I'll check the height also. Maybe that has something to do with it. I know we raised the terrain at one point in attempt to be able to LOWER the oceans. But it would never let us lower them, no matter what we did to the terrain or how high we raised it. And no one ever responded with a fix for that bug either. So we have 14 foot deep oceans. :(
Terrain is something that players experience every step of their gameplay. It is so critical. I wish we could get it to work right!
Thanks for your feedback. I'll see if I can do anything to rescue the work I've done on it. I really hope I don't have to rebuild the terrain from scratch. I've rebuilt it 3 times already, twice due to the flipped image bug. Once trying to fix the oceans.
I wonder... I'm going to check the terrain before I cut the other half off it. Now that you mention tweaking it breaks it, I don't remember if we had the collision hole bug before I cut the terrain in half...
Thanks for the tips!
God bless you,
-Laurene
#3
09/25/2010 (4:17 pm)
I believe the problem was at least in part caused from punching holes in the terrain and then using *Undo* which replaces the texture but not the collision. This doesn't explain all of the area that was effected, but some of it.
Torque 3D Owner Caylo Gypsyblood
This is a problem directly related to using more then ONE terrain in TGEA, as in Megaterrain that are disassembled, or/and have sections who position have been transformed in any fashion. Furthermore, it can becomes exponentially worse the more you actually try to fix it, or mysteriously manifest when you return to edit the terrain for that last finishing touch up.
There indeed may be a simple c'code 'fix' for this, but I was never clever enough to discover what it is. So I devised a system of work arounds by first testing everything I could think of as a means to 'break' the terrain.
The Megaterrain squares disassembled method:
Create your terrain object, be sure it/they(as a grouping) are centered at 0,0,0 with absolutely no rotation at all (save/exit/reload/test). Now do every terrain detail editing you may need(save/exit/reload/test). Be sure to paint your terrain textures down early, as one side effect of multiple terrain blocks that are Megaterrain squares disassembled is the often times crazy ability for one terrain square to forget all about its texture details. Be sure to save often, some how I was always crashing during the texture painting stage of level design development. You will want to (save/exit/reload/test) at the end of each 'step' because the Terrain Collision Bug seems to manifest AFTER reloading what was once a perfectly fine working mission file. Flowing this method you should not encounter the 'bug' when using Megaterrain squares disassembled from the original 4 squares. Once you have a satisfying terrain, open the mission folder, find your .ter files and the relatively clean mission file and COPY THEM! someplace safe, in the case you need to ever return to edit some unexpected problem with the terrain later- use the 'clean' backups as a template and backup if the 'bug' manifest down the road.
The fast method:
The drawback to this is pre-plaining and terrain texture edge seams that may not match up perfectly well. Same as the above method, except here we are designing each square SOLO, not use Megaterrain. Create a standard one square terrain, feel free to edit at your relaxed leisure and be as relaxed as normal about saving as you work. Once this solo terrain is as you want it, save/exit/reload/test just to be sure, because now your paranoid. Follow the same backup as stated above. And repeat for any other terrain squares you need. Now you have the terrains you need as 2 terrain files and two mission files, edit the mission files by hand to hack both terrain into ONE mission. Also following the 0,0,0 position rule as above. Once back in the game for a testrun, there is a Megaterrain console command that will 'try' to stitch the terrain seams together, as if it were a Megaterrain, but alas i forget what it is and how to use it (search C'code for "Megaterrain" and i think you will find it in some logical named C'file). This console command sometimes will manifest the 'bug', and often simply not do anything.
Some 'hints':
Try and keep your terrains lowest hight/sea level point AT the hight setting world space position of 0.
If you do find exhilarating freedom from using rotated/tilted terrain blocks as cliffs, the ceiling of a cave section, some tall mountain jetting from the center of a larger less square size dense terrain, etcetera with any number of creative terrain block uses the TGEA can support; You will run into manifestations of the 'bug' at some point, sometimes by using the SET EMPTY brush and removing any terrain surface squares that overlap or touch from terrain block to terrain block this can be rectified.
I have found very TALL terrain details will also manifest the 'bug', all collision fail at the same high hight level. I have the feeling I debugged this odd related bug, but my brain will not tell me that secret.
Once your terrain is just the way you want it, lock it in place so as to never accidentally move it.
Plan to detail the terrain first, before adding anything else to the mission. I would often plop the terrain in, position hours worth of details, mindlessly do some terrain touch ups and find the mission was busted. I did become efficient at manually editing missing files because of this.
You may wish to push the boundaries around allot at first to find what is SAFE and what is a multi-terrain block NONO, and to see what methods work out best for you.
And that is about all I can think of. Luck and have fun.
EDIT: for spelling and disambiguation.