Game Development Community

AFX 2 for TGE - dynamic lights for weapons

by Thomas Bang · in Arcane FX (Public) · 01/19/2011 (7:55 am) · 8 replies

On the product page i found that: "...dynamic lights mounted on your player, weapons and props..."

Is it possible with AFX 2 for TGE to mount dynamic spotlights onto weapons? If so, i would buy AFX2.

#1
01/20/2011 (7:10 pm)
If your weapon is created as a ShapeBaseImageData and mounted to a player using mountImage(), such as:
%player.mountImage(CrossbowImage,0);

Yes, you can mount a spotlight (or any other supported effect) to a named node in the weapon model.

It's actually a special case that makes use of the transform modifier, afxXM_MountedImageNodeData. The spotlight effect would be constrained to the player holding the weapon, and then afxXM_MountedImageNodeData indicates the slot and weapon node name which effectively extends the constraint to the weapon node.

#2
01/21/2011 (1:25 am)
Very good. This way i can create very dark missions where the player has to activate the "spotlight" of the weapon.
#3
02/27/2011 (9:58 am)
@Jeff Faust: To be sure, i have to ask again. With AFX2 i can create dynamic spotlights in TGE?
#4
02/27/2011 (10:29 am)
If by "dynamic", you mean lights created at runtime rather than "static" lights used in pre-lighting to bake lighting into lightmaps, then the answer is yes. Dynamic lighting of this type is the only kind of lighting used for AFX effects.

If you mean something else by "dynamic", you'll have to clarify.

For TGE lighting effects, AFX specifically uses sgLightObject, voulumeLight, and afxLight (which directly manipulates the LightManager using LightInfo class). AFX does not fundamentally change the way lighting works but adds control over when and where lights appear.

#5
02/27/2011 (10:36 am)
@Jeff Faust: I want to create very dark levels, where the player has to activate his "dynamic spotlight" of the weapon to see parts of the level. In this case, it has to be a dynamic spotlight.
Currently, TGE does not provide dynamic spotlights.
#6
02/27/2011 (10:46 am)
Technically, TGE does have dynamic spotlights but they're not very good and fairly limited. They certainly fall short of what most people might think of as a spotlight. Bottom line in this case though, is if TGE does not provide an acceptable dynamic spotlight for your needs, AFX won't improve on that. AFX just manipulates whatever crummy splotlight TGE provides.
#7
02/27/2011 (11:08 am)
OK, thanks for the clarification.
#8
02/27/2011 (11:40 am)
Here is an example of a TGE dynamic spotlight (shown with the World Editor open and with it closed):
arcane-fx.com/visuals/forums_pics/tge_spotlight.jpg
It lights the character more or less correctly according to the specified spot angle but it is not lighting the terrain or the interior. A point light will light the terrain and interior although I believe the dynamic terrain lighting is faked with a texture and does not accurately reflect nuances like falloff characteristics.

So as I said, TGE does have a dynamic spotlight but it leaves much to be desired. They can be useful in combination with certain kinds of visual tricks to say, make stage spotlights for a music game, but if you want realistic spotlight behavior in the way it illuminates a scene, this will be very difficult in TGE.