Game Development Community

fxForceField, Collision Object, Walls - request for beta tester

by Jaimi McEntire · in Torque 3D Professional · 08/27/2009 (2:09 am) · 36 replies

I've written a force field object for T3D. This lets you create force fields, walls that you can turn on and off, and generic invisible collision objects for those statics that just don't collide right. I'd like to have it tested a little more before I release it as a resource, and am requesting a beta tester or two.

To use this, you would need to be able to apply the following fixes to your T3D Beta 5:

www.garagegames.com/community/forums/viewthread/100447
www.garagegames.com/community/forums/viewthread/100449

Here is what it currently does:

It blocks player movement.
It does NOT block projectiles (you can shoot right through it).
It can be visible, or invisible (and still have collision)
You can turn it on or off (off will stop rendering and collision)
You can adjust the UV scaling.
It can use any material.
If you use a translucent material, it does not cast shadows.
If you use an opaque material, it casts shadows.

Here is a mysterious glowing yellow force field in the middle of the ruins:
www.aztica.com/images/fft1.jpg
Here are some steps made out of light (I was going to make a bridge of light, but then just got tired)
www.aztica.com/images/fft2.jpg
Here are the same steps, but with a stone material:
www.aztica.com/images/fft3.jpg
To test this, add this function to ObjectBuilder.Ed.Gui:

//------------------------------------------------------------------------------
// Environment
//------------------------------------------------------------------------------

function ObjectBuilderGui::buildfxForceField(%this)
{
   %this.className = "fxForceField";
   %this.addField("enabled","TypeBool","Enabled","true");
   %this.addField("visible","TypeBool","visible","true");
   %this.process();
}

And add this line to your "level" group in creator.ed.cs:

%this.registerMissionObject( "fxForceField");

Next, download this file:

www.aztica.com/images/fxforcefield.zip

And add the code to engine/source/t3D/fx, add it to your project, and rebuild. You should now have an fxForceField in the editor (under "level").

The following is a known issue:

A raycast will NOT select the item. I'll probably add the ability to process raycasts while the editor is open, and the ability to enable/disable raycasts, but for now, just select them in the tree.
Page«First 1 2 Next»
#21
10/26/2009 (10:40 am)
@Elvince - I've been working on another project. I'll try to put up an "official" 1.01 version soon. For the bug with the forcefield acting like it is on (when it's not), I think that is something related to the player code caching the collision mesh. I had the same problem with the earlier (unreleased) TGEA version, though I didn't have it in B5 (or at least I just didn't see it). I'll see if I can figure it out.
#22
10/27/2009 (4:55 am)
Thanks, if you need help to test don't hesitate.

Perhaps a stupid question, if they used a translucent DTS shape in Tribes it could be because it's managed differently by the player code?

#23
08/19/2010 (10:11 pm)
Hi Jaimi;

Haven't seen you around in a while. Is there any chance of updating this to work in 1.1 Beta 2? I couldn't get it to compile.
#24
09/02/2010 (1:57 am)
Hi Steve - what sort of errors are you seeing? I don't have time to dig into it right now, but I might be able to help out with some debugging.
#25
09/03/2010 (6:22 pm)
Here they are. Looks like something(s) was changed that your code relied on.

Error 23 error C2027: use of undefined type 'BaseMatInstance' c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\fx\fxforcefield.cpp 244

Error 24 error C2227: left of '->getMaterial' must point to class/struct/union/generic type c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\fx\fxforcefield.cpp 244

Error 25 error C2227: left of '->getName' must point to class/struct/union/generic type c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\fx\fxforcefield.cpp 244

Warning 26 warning C4150: deletion of pointer to incomplete type 'BaseMatInstance'; no destructor called c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\fx\fxforcefield.cpp 247

Error 27 error C2027: use of undefined type 'BaseMatInstance' c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\fx\fxforcefield.cpp 294

Error 28 error C2227: left of '->getMaterial' must point to class/struct/union/generic type c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\fx\fxforcefield.cpp 294

Error 29 error C2227: left of '->isTranslucent' must point to class/struct/union/generic type c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\fx\fxforcefield.cpp 294

Error 30 error C2039: 'allocXform' : is not a member of 'RenderPassManager' c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\fx\fxforcefield.cpp 309

Error 31 error C2039: 'allocXform' : is not a member of 'RenderPassManager' c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\fx\fxforcefield.cpp 310

Error 32 error C2039: 'allocXform' : is not a member of 'RenderPassManager' c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\fx\fxforcefield.cpp 311

Error 33 error C2039: 'getLightManager' : is not a member of 'SceneState' c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\fx\fxforcefield.cpp 317

Error 34 error C2227: left of '->getDefaultLight' must point to class/struct/union/generic type c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\fx\fxforcefield.cpp 317

Error 35 error C2039: 'getLightManager' : is not a member of 'SceneGraph' c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\fx\fxforcefield.cpp 324

Error 36 error C2039: 'setupLights' : is not a member of 'LightManager' c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\fx\fxforcefield.cpp 327

Error 37 error C2039: 'getBestLights' : is not a member of 'LightManager' c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\fx\fxforcefield.cpp 328

Error 38 error C2039: 'getSfxBackBuffer' : is not a member of 'GFXDevice' c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\fx\fxforcefield.cpp 335

Error 39 error C2039: 'resetLights' : is not a member of 'LightManager' c:\torque\torque 3d 2009 pro 1.1 beta 2\engine\source\t3d\fx\fxforcefield.cpp 360
#26
09/11/2010 (3:20 am)
Add these:

#include "materials/baseMatInstance.h"
#include "lighting/lightManager.h"

at the bottom of the includes in fxforcefield.cpp

and change the getLightManager call to:

LightManager::getActiveLM()

example:
lm = state->getSceneManager()->getLightManager();
should now be:
lm = LightManager::getActiveLM();

and
ri->lights[0] = state->getLightManager()->getDefaultLight();
should be:
ri->lights[0] = LightManager::getActiveLM()->getDefaultLight();

#27
09/12/2010 (12:56 am)
Thanks for the help, Jaimi. Your code above got rid of most of the errors. If you are too busy to continue, of course I understand, but if not, the remaining errors are:

Error 22 error C2039: 'allocXform' : is not a member of 'RenderPassManager' c:\Torque\Torque 3D 2009 Pro 1.1 Beta 2\Engine\source\T3D\fx\fxForceField.cpp 312

Error 25 error C2039: 'setupLights' : is not a member of 'LightManager' c:\Torque\Torque 3D 2009 Pro 1.1 Beta 2\Engine\source\T3D\fx\fxForceField.cpp 332

Error 26 error C2039: 'getBestLights' : is not a member of 'LightManager' c:\Torque\Torque 3D 2009 Pro 1.1 Beta 2\Engine\source\T3D\fx\fxForceField.cpp 333

Error 27 error C2039: 'getSfxBackBuffer' : is not a member of 'GFXDevice' c:\Torque\Torque 3D 2009 Pro 1.1 Beta 2\Engine\source\T3D\fx\fxForceField.cpp 340

Error 28 error C2039: 'resetLights' : is not a member of 'LightManager' c:\Torque\Torque 3D 2009 Pro 1.1 Beta 2\Engine\source\T3D\fx\fxForceField.cpp 365
#28
07/24/2011 (11:44 pm)
..with this already made, you would think it would be a stock piece. ..hmmph.
#29
07/25/2011 (3:29 am)
I concur!
#30
03/02/2012 (8:58 pm)
any chance of getting a working link to the zip file?
#31
03/03/2012 (5:26 am)
I am pretty sure I have this file. Where would you like me to email it to? It will have to be upgraded for 1.2, I never got it to work even in 1.1. Start with Jaime's instructions above, maybe. If you do get it running, please share the changes with us.
#32
03/03/2012 (7:38 pm)
@Steve
sounds interesting actually. can you possibly email me a copy also at pyoskowitz (at) winterleafentertainment (dot) com

thank you~
#33
03/05/2012 (5:36 am)
@Paul -- sent. @Martian -- still need your email.
#34
03/05/2012 (7:34 am)
@steve - ty much!
#35
03/05/2012 (12:22 pm)
hey steve themartians(at)yahoo(dot)com

thanks!
#36
03/06/2012 (9:10 am)
so apparently there have been some significant changes to the rendering management/code. The files do not work with T3D1.2, in fact it needs lots of changes to even get it to compile, but the rendering portion needs a re-write. If anyone manages to get it to work correctly please post the changes. Thanks!
Page«First 1 2 Next»