Game Development Community

Cannot pain terrains

by Mark Alsip · in Technical Issues · 04/06/2009 (8:17 pm) · 6 replies

This problem is driving me nuts... OK, it's more of a putt than a drive, but still yet:

I can't reliably paint terrains using the Mission Editor's Terrain Paint tools. The screen shot below says it better than a thousand words, but here are the details.

http://www.alsip.net/nopaint.jpg

I initially paint the entire terrain using any of the textures that come with the TGEA demo projects in /Projects/Template... works great.

Then I grab a brick or tarmac type of texture to build some roads and airfields. working really well... I save the mission and come back later to lay down more roads and beaches.

But the moment I first touch the terrain with a paint brush, the entire terrain goes either fully black or is painted with pieces of bitmaps that I have never used or seen before and some type of very reflective kind of fog over the whole terrain.

So I shrug my shoulders over the problem and try it again. This time, only 2 of the 6 textures in the Terrain Painter window can be used. The other 4 fail to respond to any attempt to use them. Using the change buttons on the bad 4 has no effect at all.

Last but not least, at some point during a future load of the mission, the entire terrain is repainted with one of the images I used for the roads. There are no other texture problems (that I can see, at least) in my world -- skybox looks great, the DTS models/shapes I load are trouble-free as far as their textures.

Thanks in advance for any help you all can provide.




#1
04/06/2009 (10:23 pm)
That's.... weird. Might be a Mac thing. Have you tried 1.8.1?

EDIT: have you tried it in Stronghold? I've never used the Template, except for once to test adding a script resource for someone, but painting should work.
#2
04/07/2009 (2:37 pm)
I haven't tried it yet with Stronghold Michael. I'll give it a look just to make sure I've truly tried everything. Yes, I am running the latest version.

The Template I started with was an obvious first choice because of how simple it was, but I'm getting desperate. I've put in at least 3 or 4 hours a day now for nearly a month and I eventually experience a failure with the terrain 100% of the time. It's always in the terrain editing area, I haven't gotten around to writing code yet. Haven't been able to edit any heightmap without a crash (mine or the supplied ones with the demo). Leaving the heightmap bugs for another day I've tried to work on painting existing terrains but again, that also eventually fails 100% of the time.

What perplexes me is that other assets I bring in and/or modify work perfectly. I've got a beautiful collection of skybox textures I did back in my DirectX days, made with the same tools I'm using to texture terrains. They work perfectly. Models I textured in GameSpace or Blender, when converted to .dts, look just as good (or bad ;-) as the day I created them). It's very clear to me that there is a bug in the terrain editor(s).

GG tech support has tried several times to duplicate the problem but can't come up with anything. This is going to be a very expensive mistake, I fear.
#3
04/07/2009 (4:48 pm)
Your screenshot shows you using 1.8.0 -- that's why I asked if you had tried using 1.8.1. I do remember there being a few terrain related problems that were addressed in the update.

I've successfully painted 15 different textures per terrain across 16 terrain blocks in one mission, and despite the quirks of the terrain editor I've not experienced anything like you've shown.
#4
04/07/2009 (7:31 pm)
OK, I've just clinched the nomination for Clueless Developer of the Year.

You're absolutely right Michael about that being 1.8.0 in the screen snap I uploaded. And I didn't lie when I said I'd grabbed the 1.8.1 update from the GG web site.

I've heard that updates have a much higher success rate if they're actually installed. How embarrassing...

So it looks like 1.8.1 has solved my terrain painting woes. I've been at it for about 45 minutes with the same jpg's that were failing me earlier, and the painting has been perfect so far.

The bad news is TGEA is still locking up and/or core dumping when I edit the actual terrain. A nasty looking core dump when I try to place a water block: I'll forward that on to the techs and see if it reveals anything. I can live without water for the time being if need be.

Thanks much for your help Michael. Hopefully some day I'll be up to speed enough to return the favor!



Process: Template [10575]
Path: /Users/webmaster/Desktop/TorqueGameEngineAdvancedSDK-Mac-1-8-1/Projects/Template/game/Template.app/Contents/MacOS/Template
Identifier: com.garagegames.Template
Version: ??? (1.0)
Code Type: X86 (Native)
Parent Process: launchd [90]

Date/Time: 2009-04-07 22:27:42.217 -0400
OS Version: Mac OS X 10.5.6 (9G55)
Report Version: 6

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
Crashed Thread: 0

Thread 0 Crashed:
0 com.garagegames.Template 0x002ba9e0 WaterBlock::initMaterials() + 814
1 com.garagegames.Template 0x002bae43 WaterBlock::onAdd() + 95
2 com.garagegames.Template 0x000dcb42 SimObject::registerObject() + 78
3 com.garagegames.Template 0x00296067 NetConnection::ghostReadPacket(BitStream*) + 375
4 com.garagegames.Template 0x00010af4 GameConnection::readPacket(BitStream*) + 944
5 com.garagegames.Template 0x00291ad1 NetConnection::handlePacket(BitStream*) + 255
6 com.garagegames.Template 0x002929a2 NetConnection::sendPacket(BitStream*) + 132
7 com.garagegames.Template 0x0029901f NetInterface::processServer() + 61
8 com.garagegames.Template 0x0009f690 processTimeEvent(int) + 482
9 com.garagegames.Template 0x0024abba Signal<void ()(int)>::trigger(int) + 36
10 com.garagegames.Template 0x0024ac95 void Journal::Call<Signal<void ()(int)>, int>(Signal<void ()(int)>*, void (Signal<void ()(int)>::*)(int), int) + 151
11 com.garagegames.Template 0x0024a9ca TimeManager::_updateTime() + 124
12 com.garagegames.Template 0x000129d0 Signal<void ()()>::trigger() + 28
13 com.garagegames.Template 0x001007be Process::processEvents() + 22
14 com.garagegames.Template 0x0009fd81 StandardMainLoop::doMainLoop() + 351
15 com.garagegames.Template 0x00256ac9 -[MainLoopTimerHandler fireTimer:] + 23
16 com.apple.Foundation 0x96d33ea7 __NSFireTimer + 279
17 com.apple.CoreFoundation 0x942b1b25 CFRunLoopRunSpecific + 4469
18 com.apple.CoreFoundation 0x942b1cd8 CFRunLoopRunInMode + 88
19 com.apple.HIToolbox 0x91db32c0 RunCurrentEventLoopInMode + 283
20 com.apple.HIToolbox 0x91db30d9 ReceiveNextEventCommon + 374
21 com.apple.HIToolbox 0x91db2f4d BlockUntilNextEventMatchingListInMode + 106
22 com.apple.AppKit 0x90655d7d _DPSNextEvent + 657
23 com.apple.AppKit 0x90655630 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
24 com.apple.AppKit 0x9064e66b -[NSApplication run] + 795
25 com.apple.AppKit 0x9061b8a4 NSApplicationMain + 574
26 com.garagegames.Template 0x00256c71 main + 137
27 com.garagegames.Template 0x00002522 _start + 216
28 com.garagegames.Template 0x00002449 start + 41
#5
04/07/2009 (7:59 pm)
Ah, cool, glad you got it worked out -- sometimes it's the little things such as the need to actually install the update ;) that get overlooked.

The Waterblock related crash bug in the Template is a known problem, it's been mentioned here and a fix has been posted on the Known Issues thread.
Quote:TGEA crashes when creating a waterblock in Template
First noted in: TGEA 1.8.1
FIX:
Add the following to Projects/Template/game/scriptsAndAssets/data/water/materials.cs

new CustomMaterial( Water_NoReflect )  
{  
   texture[0] = "noise02";  
   texture[2] = "$backbuff";  
   texture[3] = "$fog";  
   texture[4] = "$cubemap";  
   cubemap = Sky_Day_Blur02;  
   shader = WaterCubeNoReflect;  
   specular = "0.75 0.75 0.75 1.0";  
   specularPower = 48.0;  
   fallback = WaterFallback1_1;  
   version = 2.0;  
};
#6
04/07/2009 (7:59 pm)
OK. Now you've really done it Michael. I'm going to be up all night because that fix worked perfectly and I'm moving forward on my game dev efforts again.

Many thanks to you and also David Montgomery-Blake from GarageGames for your help and patience getting this Torque newbie up and running.

Now the only thing standing between me and a million dollar game development contract is a lack of time, money, and a killer game concept ;-) Thanks again guys!