Game Development Community

Synapse Lighting

by Howard Dortch · in Torque Game Engine · 06/26/2004 (7:05 am) · 28 replies

I have a couple of questions on this upgrade if anyone can answer.

1. How did you get an interior object to penetrate the landscape without terrain showing?!!!

2. Will my artist that creates interiors have to make any changes in exporting models with lights inside or are the lights added afterwards?

3. How many changes are there to current HEAD? Are the changes seperate files that need added and compiled or changes in current files?

My credit card is at the ready......
Page «Previous 1 2
#1
06/26/2004 (8:23 pm)
Hi Howard,

Blocks of the terrain can be removed via the Mission Editor. First start the Mission Editor (F11), select the Terrain Editor (F6 or 'Window/Terrain Editor' in the menu), select 'Action/Set Empty' in the menu - now any terrain blocks you select are removed ('Action/Clear Empty' will allow you bring back removed blocks). The real trick is getting interior objects to fit consistently into the terrain holes, but with a little practice it becomes easier.


The Lighting Pack allows you to use mission lights and map2dif light entities together in the same interior with both taking advantage of the bright lighting, so all of your existing content can be used with the pack out of the box. If you check out the Lighting Pack demo you'll notice that the example interior uses light entities in the entry way and for the red warning lights, and mission light objects are used for the spotlights, firelight, and the radioactive goo light.

With existing content it may be necessary to turn down the intensity of really bright light entities, however the Modeler's Guide for the pack gives very detailed explanations on how to easily handle this.


The Lighting Pack changes are easier to implement with a TGE release (like 1.2.2), because patch files can be used instead of hand integrating the pack. Recently I've been building off of HEAD too - here's the process I use:

-Retrieve 1.2.2 (I keep a local copy, for these occasions).
-Read the Install Guide for the base setup (it'll have you add a few files to your project).
-Apply the Lighting Pack patch to 1.2.2 (adds all changes except the volLight resource, see Install Guide for details).
-Retrieve HEAD.
-Use merge (I use WinMerge) to move HEAD changes into your patched 1.2.2+Lighting Pack tree.

The process of patching takes seconds and the merge of 1.2.2 and HEAD is very minimal. I suggest carefully reading over the Install Guide and all of its changes to become familiar with them, so when you're merging HEAD into 1.2.2 you'll recognize the Lighting Pack changes and avoid removing them (most are very easy to recognize macros named 'SG_').

Hope this helps, if you have any more questions feel free to ask!

-John Kabus
#2
06/27/2004 (6:00 am)
Thanks John. my credit card number is xxx-xx-xxxx-xx
#3
06/27/2004 (7:47 am)
I would prefer not to use any merge mechanism last time I did that it took me 2 days to get things running again.
I notice the *.cc and *.h files in the light pack, can I just include them in the vc6 engine project and do a build?
#4
06/27/2004 (9:17 am)
Ok The last version of the engine I have was 2 weeks ago so I assume that is 1.2.2

1. I added the 3 cc files into the project
2. Applied the patch

3. Dont know what you mean by merging HEAD to 1.2.2, I thought the latest version of head WAS 1.2.2

Exatcly what needs merged to what?

The engine builds fine but none of my games will run with it now.
#5
06/27/2004 (10:10 am)
If you downloaded the latest "stable" then its 1.2.2
If you got your sources from CVS, then its most likely HEAD
#6
06/27/2004 (10:23 am)
I got them from cvs so I guess I patched the wrong files?
The docs dont show a patch for HEAD and the latest version of HEAD listed is 01/24/2004 so what should I do here?
#7
06/27/2004 (10:50 am)
Hi Howard,

I would recommend grabbing TGE release version 1.2.2, instructions for retrieving releases can be found here:

www.garagegames.com/docs/torque/general/ch02s02.php

Just remember to use the 'Release_1_2_2' tag.

Then add the .cc files to your project, patch TGE (with the Lighting Pack patch), and build. Keep an eye on the console while patching Torque to make sure there are no errors.

-John
#8
06/27/2004 (11:15 am)
I got the latest version, added the files, patched, built with no errors.

None of my games will run now. errors of all kinds in the log files, too many to list.

sigh, I knew better.....
#9
06/27/2004 (11:23 am)
Would you mind posting the errors? Also what platform are you on?

-John
#10
06/27/2004 (11:33 am)
Bunch of these:
Executing starter.fps/data/missions/stronghold.mis.
Object 'SpawnSphereMarker' is not a member of the 'fxLightData' data block class
starter.fps/data/missions/stronghold.mis (0): Register object failed for object (null) of class SpawnSphere.
Object 'SpawnSphereMarker' is not a member of the 'fxLightData' data block class
starter.fps/data/missions/stronghold.mis (0): Register object failed for object (null) of class SpawnSphere.
Object 'SpawnSphereMarker' is not a member of the 'fxLightData' data block class
starter.fps/data/missions/stronghold.mis (0): Register object failed for object (null) of class SpawnSphere.
Object 'SpawnSphereMarker' is not a member of the 'fxLightData' data block class
starter.fps/data/missions/stronghold.mis (0): Register object failed for object (null) of class SpawnSphere.
Object 'SpawnSphereMarker' is not a member of the 'fxLightData' data block class
starter.fps/data/missions/stronghold.mis (0): Register object failed for object (null) of class SpawnSphere.

Then these:
Object 'DemoPlayer' is not a member of the 'fxLightData' data block class
starter.fps/server/scripts/aiPlayer.cs (68): Register object failed for object (null) of class AIPlayer.
Set::add: Object "0" doesn't exist

Is there a way I can send you the whole file?
#11
06/27/2004 (11:43 am)
No need - I've see this before on very rare occasions. Here's the fix:

In fxLight.cc line 124 comment out the following lines:

Con::registerType(	"GameBaseDataPtr", TypeGameBaseDataPtr, sizeof(fxLightData*),
						REF_GETDATATYPE(fxLightData),
						REF_SETDATATYPE(fxLightData));

The problem is that 'GameBaseDataPtr' is being redefined instead of defining 'fxLightDataPtr', but seeing as 'fxLightDataPtr' is not being used neither one are necessary. Why this causes a problem in so few instances is a mystery to me, however this fix is included in the 1.1 Integration Guide, so this will not be an issue in the future.

-John
#12
06/27/2004 (12:20 pm)
As if by MAGIC!
Ok I ran my test program hit the F11 and tried to see if I could plant a light down. Apparently there are some changes need to be made to the editor?
Is the fxLight the thing I want to use?
I selected it and no datablocks are associated with fxLight.

Over all the scene is way brighter like gama on drugs, so I turned down the ambient on the sun and lowered the color setting is that how you get lower light levels?

Sorry for being a pain in the arse but im short time on a demo project.
#13
06/27/2004 (1:09 pm)
Check the Install Guide under 'Currently Supported Torque Versions', select your Install Doc (currently 'tag_11182003.htm') and follow the section 'Required Script Changes' - this will add the Universal Light objects to the Mission Editor.

Then check the Modeler's Guide under the section 'SG Universal Static Light' this will explain how to use the objects and also gives an example datablock to get you started.

-John
#14
06/27/2004 (3:44 pm)
So that's what have been causing the problems eh! :)
#15
06/28/2004 (4:11 am)
Yup, that was it and it was a serious pain to find too. Mainly because I was searching the Lighting Pack code for the problem, but also because deriving from any object other than fxLightData would prevent the problem from popping up.

Originally I thought the problem was introduced in the Lighting Pack 1.1 code. Then I had difficulty getting 1.0 to work, which obviously worked in the past I built the demos with 1.0. When you sent me an email describing the same issue I realized that the difference was in TGE - the demos were built with HEAD from 11/18/2003, at one point I updated my main tree to HEAD from sometime in May, you were also using a more recent HEAD. Anyway without a clean HEAD 11/18/2003 to compare a current HEAD to I had to hunt for the problem manually.

Anyway all fixed. :)

-John
#16
06/28/2004 (4:57 am)
@John I get this error trying to make a volume light

editor/newObject.cs (0): Unable to instantiate non-conobject class volumeLight.

I notice you dont have this file in your demo but you make reference to it in ObjectBuilder.gui

I do have the file and it contains this

ObjectBuilderGui.newObject = new volumeLight(Volume1) {
dataBlock = "sgSpotDataBlock";
};

which is causing the error.
How should I resolve this?
#17
06/28/2004 (5:15 am)
Sorry to high jack this thread a little, but i was wandering on the progress of any patches especially around the MAC version of the lighting pack.
#18
06/28/2004 (5:52 am)
Howard,

Did you include the volume light resource and make the Lighting Pack related C++ changes? Check the Install Doc, section 'Volume Light Changes' (or similar name, I'm not near the docs right now) for details.

Adrian,

I posted a follow up in the Mac demo thread here. As for time frame on the 1.1 release, I really dislike setting dates, but I can say this development was completed a while ago, the past few weeks have been devoted to heavy testing and updating the docs, both of which are very close to done.

Feel free to email me if you need the Mac fixes now, there are only a handful of changes.

-John
#19
06/28/2004 (6:33 am)
I dont have fx/volLight.cc or h files in my project the Docs send me to a link for this? So I can only assume I have to get these files add them in the project then modify them..right?

Is there a special area we can move all the sgLighting chat like a owners forum?
#20
06/28/2004 (6:42 am)
Yes, you'll need that resource if you choose to use the volLights.

Actually that's a really good idea. I've answered a number of emails addressing things like lighting techniques, performance, and helpful tricks. These would have been better answered in an owners forum where others could benefit from the info too.

I'll talk with the GG guys tonight to see if it's possible.

-John
Page «Previous 1 2