Bigger, Fatter, Faster ...
by Melv May · in Torque Game Engine · 05/18/2002 (7:04 pm) · 155 replies
Hi Folks,
To start with, here are some images of my latest light object in action (animation difficult to show!) ...
www.melv.may.btinternet.co.uk/garagegames/fxflare1.jpg
www.melv.may.btinternet.co.uk/garagegames/fxflare2.jpg
www.melv.may.btinternet.co.uk/garagegames/fxflare3.jpg
www.melv.may.btinternet.co.uk/garagegames/fxflare4.jpg *lost from FTP site*
www.melv.may.btinternet.co.uk/garagegames/fxflare5.jpg
www.melv.may.btinternet.co.uk/garagegames/fxflare6.jpg
www.melv.may.btinternet.co.uk/garagegames/fxflare7.jpg
www.melv.may.btinternet.co.uk/garagegames/fxflare8.jpg
I improved my fxLight last week in many areas but I never got around to packaging it up. I have now done so and here it is for you.
For those who don't know about this, it is a dynamic light that with an animation system built-in to allow you to create a huge range of effects. I have now coupled it with a lens-flare effect which can also be animated to produce some spectacular effects. The lens-flare effect uses a pretty accurate line-of-sight test coupled with a fade-in/out effect to produce a very realistic flare.
There is also a version that has full datablock support plus the ability to be attached to any GameBase object. This includes things like the player, lightning, items, projectiles etc.
The version I host on my personal site has an addition of a terrain/mission file as an example of how to use this object effectively. Use F8 to move around the level, go inside the building and look up. You should see the lens-flare as it appears through the slats in the roof! Cool!
I have updated the resource here www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2660.
You can also find it hosted at www.melv.may.btinternet.co.uk/garagegames/light.zip (which includes the bonus terrain/mission files).
A previous post regarding this object can be found at www.garagegames.com/index.php?sec=mg&mod=forums&page=result.thread&qt=5042
Hopefully, there are not many problems with it. Jeez, it's 3:14am here now ... must sleep. !)
Enjoy.
- Melv.
To start with, here are some images of my latest light object in action (animation difficult to show!) ...
www.melv.may.btinternet.co.uk/garagegames/fxflare1.jpg
www.melv.may.btinternet.co.uk/garagegames/fxflare2.jpg
www.melv.may.btinternet.co.uk/garagegames/fxflare3.jpg
www.melv.may.btinternet.co.uk/garagegames/fxflare4.jpg *lost from FTP site*
www.melv.may.btinternet.co.uk/garagegames/fxflare5.jpg
www.melv.may.btinternet.co.uk/garagegames/fxflare6.jpg
www.melv.may.btinternet.co.uk/garagegames/fxflare7.jpg
www.melv.may.btinternet.co.uk/garagegames/fxflare8.jpg
I improved my fxLight last week in many areas but I never got around to packaging it up. I have now done so and here it is for you.
For those who don't know about this, it is a dynamic light that with an animation system built-in to allow you to create a huge range of effects. I have now coupled it with a lens-flare effect which can also be animated to produce some spectacular effects. The lens-flare effect uses a pretty accurate line-of-sight test coupled with a fade-in/out effect to produce a very realistic flare.
There is also a version that has full datablock support plus the ability to be attached to any GameBase object. This includes things like the player, lightning, items, projectiles etc.
The version I host on my personal site has an addition of a terrain/mission file as an example of how to use this object effectively. Use F8 to move around the level, go inside the building and look up. You should see the lens-flare as it appears through the slats in the roof! Cool!
I have updated the resource here www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2660.
You can also find it hosted at www.melv.may.btinternet.co.uk/garagegames/light.zip (which includes the bonus terrain/mission files).
A previous post regarding this object can be found at www.garagegames.com/index.php?sec=mg&mod=forums&page=result.thread&qt=5042
Hopefully, there are not many problems with it. Jeez, it's 3:14am here now ... must sleep. !)
Enjoy.
- Melv.
About the author
#142
-Melv.
10/02/2002 (8:46 am)
Will do soon Stefan. Bit busy at the moment so sorry for the delay getting back. :(-Melv.
#143
03/30/2004 (8:06 pm)
Any updates? Any way to integrate this with the fxLight in HEAd.. or should I replace the one in HEAD?
#144
(Also posted as a reply to another post)
There have been no updates since 01/02/2003 on this. The [HEAD] version got modified to suit the requirements of the demo. All in all, the modified version is much better.
Attaching lights to objects was never finished, sorry. :(
Didn't want to remove this resource as some people still find it useful. Technically, the DB version of the fxLight is obsolete although again, some people find it useful.
Spotlight support is not in the basic light support that this object uses. Don't forget, this object only adds the flare, it gets the light from core Torque.
I will be updating various resources for the new TSE sometime soon.
Hope this helps,
- Melv.
03/30/2004 (9:12 pm)
Cameron,(Also posted as a reply to another post)
There have been no updates since 01/02/2003 on this. The [HEAD] version got modified to suit the requirements of the demo. All in all, the modified version is much better.
Attaching lights to objects was never finished, sorry. :(
Didn't want to remove this resource as some people still find it useful. Technically, the DB version of the fxLight is obsolete although again, some people find it useful.
Spotlight support is not in the basic light support that this object uses. Don't forget, this object only adds the flare, it gets the light from core Torque.
I will be updating various resources for the new TSE sometime soon.
Hope this helps,
- Melv.
#145
-Barzahd
06/09/2004 (9:49 pm)
I tried the links to get to the zip file but it's saying url is not found... I think all I need to know is what datablock information I need to put in and what file to put it in and it should work fine. Help is much appreciated.-Barzahd
#146
06/10/2004 (10:56 am)
Do you realize this is part of TGE already?
#147
-B
06/10/2004 (6:01 pm)
Yeah, I know it is, but I dont know how to work it. When I click on fxLight, it asks for fxLight data, which doesn't give me anything to choose. Then when I click ok, it does nothing. Can anyone help me on this?-B
#148
Have fun
06/11/2004 (12:23 am)
Travis, download the file called light.zip from this resource. Inside you will have a exampledatablock.txt and a description of the settings in the DrinkMe fxlight.txt(way to go melv).Have fun
#149
Sorry, but I didn't see this post until recently. Jorgen has got good advice here. Also, I've updated the links as they are pointing to an old site I had and I thought I'd updated most of the links I'd posted. Obviously missed a few.
You're definately better off using the code within the engine but the example datablock should still work fine and the "DrinkMe" file contains descriptions of all the fields.
Cheers,
- Melv.
06/11/2004 (8:51 am)
Travis,Sorry, but I didn't see this post until recently. Jorgen has got good advice here. Also, I've updated the links as they are pointing to an old site I had and I thought I'd updated most of the links I'd posted. Obviously missed a few.
You're definately better off using the code within the engine but the example datablock should still work fine and the "DrinkMe" file contains descriptions of all the fields.
Cheers,
- Melv.
#150
06/11/2004 (9:38 am)
*looks at the updated screenshots* Wow, the original blue spotted crossbow. Man, this thread takes me back. :)
#152
I just ran into your old issue with
This happened after I added the Synapse Gaming Lighting Pack. But it only happened in Linux (both debug/release). Windows runs fine in both debug/release. After much tinkering of moving the linking order around in the project (my best guess as what was happening based upon this thread) and coming up with nothing. I got this to work after commenting out the following sections from /engine/game/fx/fxLight.cc,
Now I'm not too sure at this point what the adverse effects of this are. Seems like it could be big.
Something seems to go haywire with this Con::registerType under certain build conditions where it's trying to call the REF_SETDATATYPE(fxLightData) implementation for every GameBaseData object that gets set. I was getting tons of 'Object "x" is not a member of the "fxLightData" data block' messages in the log.
07/05/2004 (9:17 am)
Stephan,I just ran into your old issue with
Object "Observer" is not a member of the "fxLightData" data block
This happened after I added the Synapse Gaming Lighting Pack. But it only happened in Linux (both debug/release). Windows runs fine in both debug/release. After much tinkering of moving the linking order around in the project (my best guess as what was happening based upon this thread) and coming up with nothing. I got this to work after commenting out the following sections from /engine/game/fx/fxLight.cc,
//IMPLEMENT_GETDATATYPE(fxLightData) //IMPLEMENT_SETDATATYPE(fxLightData) ... /* Con::registerType( "GameBaseDataPtr", TypeGameBaseDataPtr, sizeof(fxLightData*), REF_GETDATATYPE(fxLightData), REF_SETDATATYPE(fxLightData)); */
Now I'm not too sure at this point what the adverse effects of this are. Seems like it could be big.
Something seems to go haywire with this Con::registerType under certain build conditions where it's trying to call the REF_SETDATATYPE(fxLightData) implementation for every GameBaseData object that gets set. I was getting tons of 'Object "x" is not a member of the "fxLightData" data block' messages in the log.
#153
I just talked with Justin about this issue. I've also noticed this and have posted info regarding it here:
www.garagegames.com/mg/forums/result.thread.php?qt=19522
Sorry that the fix was hidden in a random post, soon we'll have a private Lighting Pack forum up where this information won't get lost.
Anyway the code can be safely removed or changed to:
The original code was overwriting the real entry for 'GameBaseDataPtr', but for some reason the problem only occurs when a class inherits from fxLightDataPtr (or any other class with similar code) and compiling with GCC.
Oh there are a number of other places where this code is used. Do a search on 'Con::registerType' you'll notice a good number of them using wrong definitions like this.
Hope this helps!
-John Kabus
07/08/2004 (3:43 pm)
Hi Mike,I just talked with Justin about this issue. I've also noticed this and have posted info regarding it here:
www.garagegames.com/mg/forums/result.thread.php?qt=19522
Sorry that the fix was hidden in a random post, soon we'll have a private Lighting Pack forum up where this information won't get lost.
Anyway the code can be safely removed or changed to:
Con::registerType("fxLightDataPtr", TypefxLightDataPtr, sizeof(fxLightData*),
REF_GETDATATYPE(fxLightData),
REF_SETDATATYPE(fxLightData));
(Assuming TypefxLightDataPtr has been defined with all of the other Type<*>Ptr enums)The original code was overwriting the real entry for 'GameBaseDataPtr', but for some reason the problem only occurs when a class inherits from fxLightDataPtr (or any other class with similar code) and compiling with GCC.
Oh there are a number of other places where this code is used. Do a search on 'Con::registerType' you'll notice a good number of them using wrong definitions like this.
Hope this helps!
-John Kabus
#155
I have been trying to use this resource on the latest version of torque 1.4 and get some errors when trying to compile the game engine.
Is anyone else getting this problem and if so do you know how to fix it?
04/16/2006 (7:33 pm)
Don't know if anyone is still using this thread,I have been trying to use this resource on the latest version of torque 1.4 and get some errors when trying to compile the game engine.
Is anyone else getting this problem and if so do you know how to fix it?
Associate Stefan Beffy Moises