1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

UE2 - UT2kX FlashLight Mutator

Discussion in 'Mapping' started by Median12, Feb 17, 2016.

  1. Median12

    Median12 Mapper

    Joined:
    Sep 18, 2012
    Messages:
    129
    Likes Received:
    3
    Hi,

    Is there a Flashlight Mutator for UT2k4?

    I've been looking and found one off of a Mod/Mutator pack but the (Dynamic) lighting is no good, it greys the light cone out and looks unrealistic.

    I added a dynamic light on a weapon (old MP5 download) but the light stays on and isn't triggerable. Annoying :)

    I might change the weapons' mesh to a flashlight and remove it's firemode capabilites but then its only a flashlight and not a weapon.

    I was wondering if there is a mutator I haven't found yet. (Triggerable flashlight whilst holding a weapon)
     
  2. meowcat

    meowcat take a chance

    Joined:
    Jun 7, 2001
    Messages:
    800
    Likes Received:
    1
    I may have my old flashlight mutator hanging around on one of my old computers or harddrives. I'll either post it, or the code, or both. I had made a simple 'mini-maglight' mesh for the flashlight and it used the Inventory item system (so it could be activated while holding a weapon and turned on and off after binding a key to the Inventory activate command) so it appeared in the player model's hand along with the weapon.

    As for the lighting effect, it can be kind of tricky and I remember experimenting with several different combinations of dynamic lights and projectors (with various textures). The final flashlight effect I use now for my mod involves one dynamic light (actually just a subclass of 'effects' with bDynamicLight=true) placed several UnrealUnits back from whatever wall/object a 'trace' hits (using the distance from the flashlight to scale the light radius and inversely, brightness as I recall), and two projectors; one projector with one texture for BSP/terrain, and another projector (with slightly different texture) for staticmeshes and skeletal mesh actors (by altering the various bProject* default properties). I found that certain light spot textures and FrameBufferBlendingOp settings worked better on BSP and Terrain, and other settings worked better on SMs and SkeletalMeshes.

    [edit] depending on the texture used for the projector, they can definitely gray-out (or really any color used) or overpower the underlying texture color. I never did find a satisfying mixture of projector blend modes that appeared to just "lighten" the underlying triangle's texture. Since lights only affect the vertices of StaticMeshes, you kind of had to use projectors to simulate the flashlight otherwise the effect simply would not work (especially on larger SMs where the vertices were any more than 16-48 UUs apart).

    You might be able to use a DynamicLight with the LightEffect set to LE_Spotlight, but I seem to recall that it could easily cause crashes in UT2Kx engine because, unlike the old UT99 engine, the light could 'touch' some many more triangles (static meshes etc) that it eats too much memory or something and kills the game engine. Dynamically moving Projectors are pretty intensive too (they duplicate every triangle they project on, and crop themselves too, and apply the projector texture) but seem to work better.
     
    Last edited: Feb 18, 2016
  3. Median12

    Median12 Mapper

    Joined:
    Sep 18, 2012
    Messages:
    129
    Likes Received:
    3
    Right a Projector, your right, LE_Spotlight crashes the map, as soon as I entered a SM Cave it froze the game.

    It sounds like you had the same idea as me Meowcat about inventory. I'll bind my new flashlight to a weapon and see what happens. I'm not using many if not none of the original UT2k4 weapons so will try it on another. (I'm keeping the AssaultRIfle as It's re-textured and its firemode stronger)
     
    Last edited: Feb 19, 2016
  4. ROSoldier

    ROSoldier New Member

    Joined:
    Feb 1, 2015
    Messages:
    28
    Likes Received:
    0
    Hello, just check Killing Floor game. Theres plenty of mutators for it on SteamWorkshop, and the base game itself incorporates flashlight in the Pistol, shotgun and some SMG weapons, that can light terrain polygons, BSP and StaticMeshes. :)
     
  5. Median12

    Median12 Mapper

    Joined:
    Sep 18, 2012
    Messages:
    129
    Likes Received:
    3
    Thanks, I found one on BallisticWeapons.
     

Share This Page