Game Development Community

Terrain Seems Corrupt

by Netwyrm · in Torque 3D Professional · 11/17/2011 (8:28 am) · 5 replies

I have a problem I would rate as "severe" cropping up. My Torque version is 1.1 Final, I am on Windows 7 Home 64, 8GB RAM, i7, nVidia 2x550Ti.

I appear to have damaged my main terrain somehow, one of the symptoms being it is suddenly only intermittently paintable, in that selecting a terrain material and attempting to apply it with the painting tool will paint some areas of the terrain and skip over other adjacent areas, no matter brush size, from which angle it is scrubbed or which of the terrain textures in the palette is selected.

Is this a known issue, for which there is a fix? It appears to have cropped up for me when creating groundcover for the first time, and seems to be related to materials--the materials editor crashed three times in the process of creating the required piece for the groundcover, and then my terrains started crashing on load except for the one with the groundcover in it.

I found an unloadable material description in the materials file cropping up as an error in the script console, and removed that section as I think it had an invisible, corrupt character in the actual file, and became able to load my levels again, or so I thought. The first thing I did was remove the groundcover, but now I can't paint and footprint pickup seems to be affected in some areas of the terrain.

About the author

My adventures in T3D are chronicled at http://www.worldofantra.com. Please be aware the subject is sword-and-sorcery, and the occasional bloody or bare body part may be in scope.


#1
11/17/2011 (7:09 pm)
Got it, I think. At some point the Slope Mask angle was changed from "0" to another, higher value.

I suspect a late-night editing session, getting confused about being in the terrain painter rather than the shaper, while desperately trying to recover from my materials disaster last week--I must have popped up what I perceived to be "Brush Size" and moved it from "0" to "1", which causes max size to default to "1". Which made painting darn skippy :)

Changing the min angle to "0" and the max angle to "90" seems to have made painting work reliably again.

That guy? The one who never changes the defaults, ever? That's me.

The footprint issue must be unrelated, as it still persists. Off to the mines.
#2
11/18/2011 (5:25 am)
I use that angle setting all the time! I love it. Lets me ensure that the material that uses side projection only paints on steep surfaces because it's expensive.
#3
11/18/2011 (11:40 am)
Someday, I hope to be able to understand this: "material that uses side projection only paints on steep surfaces because it's expensive." I'm not quite there yet (I don't understand what "side projection" means yet, or why it would be expensive--or desirable--it's the first time I've heard the term used!) But I do thank you for posting, because now I know I need to go look it up :)
#4
11/18/2011 (12:10 pm)
Well, to play with it make yourself a terrain with some fairly steep areas (50~90ish degrees) and then make a new terrain material from one of the existing ones. Save the new material, then check the use side projection checkbox and paint it on some of your steep spots. It looks far better. I'm not up on the details of why side projection causes a larger performance hit than regular top-down projection, but my guess is that is requires two passes to render your terrain to swap out shaders for the side-mapped cells, or it messes up the batching for draw calls, or something like that.
#5
11/22/2011 (8:56 pm)
Hm... I'll try that when I go to work on some of my next levels with deep ravines. Right now I'm back to trying to straighten out two suddenly dysfunctional levels again... Right after creating ground over again. I've been able to recover one so far, but an actual reason for a level untouched for a week to suddenly crash on load escapes me. That and the list of items in the level wasn't stable... I'm wondering if I have a corruption in the level file itself, like the issue with the materials file.

Thanks for the suggestion about side projection!