Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2009
    Posts
    7

    Question Changing a light's mesh/texture when toggled on/off

    I'm using LT_Light.SM.Mesh.S_LT_Light_SM_Light01 and want it to switch to LT_Light.SM.Mesh.S_LT_Light_SM_Light01_Off when the lights are toggled off. I am trying the "set staticmesh" action in Kismet but nothing is happening. What do I need to do?

  2. #2
    Join Date
    Sep 2003
    Location
    Raleigh, NC
    Posts
    7,272
    The actor needs to be a dynamic actor in order to change the mesh, i.e. use an InterpActor instead of a StaticMeshActor.

  3. #3
    Join Date
    Sep 2009
    Posts
    7
    Thank you for a speedy reply! I'll try that.

    (I'm also now considering going with Matinee for the change rather than the Kistmet action, so I can have a smoother transition, but I believe I'll need an interp actor for that as well!)

  4. #4
    Join Date
    Sep 2009
    Posts
    7
    I am continuing to have trouble, sadly. For one thing it seems I am unable to duplicate any materials in packages I did not create myself.

    The main problem of course is that I can't seem to find a way to change an actor's static mesh during the matinee sequence. I can see how to change a material (I have the tutorials on that) but unless I can make a copy of the material to edit I am helpless. Is there a tutorial anywhere on how to change an actor's mesh with a matinee sequence?

    Edit1: Okay, I have it all working with the Set StaticMesh action, with the lights toggling on and off just fine. I'd still like to get a smooth transition between on light and off light eventually, so any help there would be appreciated.
    Last edited by Digital Paragon; 10-02-2009 at 10:39 AM.

  5. #5
    Join Date
    Sep 2003
    Location
    Raleigh, NC
    Posts
    7,272
    The easiest way to duplicate a material from a cooked package is just to create an empty new material in your package, open up the material you want to copy, select all the nodes, Ctrl+C to copy them, open up your new material, Ctrl+V to paste them, reconnect everything to the base material node.

    You should be able to use a parameter to drive the amount of emissive in the material so you can transition from on to off smoothly by modifying that parameter in Matinee.

  6. #6
    Join Date
    Sep 2009
    Posts
    7
    The copy-paste did the trick. From there it was easy to edit the material into one that could be turned on and off. Thanks!

  7. #7
    Marscaleb Guest
    You know for some reason I have never ever been able to copy-paste the data inside a material. Maybe I've been doing something wrong, even though I don't see how.

    You know, maybe its just me, but I am greatly irritated to have to use matinee for something as simple as a light breaking. It's not about the complications for using matinee, but its about the cost for performance. All you need is a simple instantaneous binary switch, and matinee is just too big of a tool for that.
    Now, I suppose I can understand that it would be excessive to create an entire new function to do such a binary action that most people wouldn't use for a static mesh, but it really gets my goat with the light itself. To make the light turn off, you'll have to use a dynamic light. How ridiculously costly! If I wanted a light to move and change range and throw a disco party, then sure, but to turn a light on or off wouldn't it make more sense to just build a special lightmap and dynamically control that, like how they used to do it back in the day?

  8. #8
    Join Date
    Sep 2003
    Location
    Raleigh, NC
    Posts
    7,272
    Quote Originally Posted by Marscaleb View Post
    You know for some reason I have never ever been able to copy-paste the data inside a material. Maybe I've been doing something wrong, even though I don't see how.
    Ctrl+C, Ctrl+V...hard to mess up.

    Quote Originally Posted by Marscaleb View Post
    You know, maybe its just me, but I am greatly irritated to have to use matinee for something as simple as a light breaking. It's not about the complications for using matinee, but its about the cost for performance. All you need is a simple instantaneous binary switch, and matinee is just too big of a tool for that.
    Hmmm...

    Changing the material/mesh to "break a light" without Matinee:
    • Set Material action to change the material in Kismet.
    • Set ScalarParam action in Kismet to simply set the value of a parameter in the material
    • Set StaticMesh action in Kismet to change to a mesh of the light broken/off


    Quote Originally Posted by Marscaleb View Post
    Now, I suppose I can understand that it would be excessive to create an entire new function to do such a binary action that most people wouldn't use for a static mesh, but it really gets my goat with the light itself. To make the light turn off, you'll have to use a dynamic light. How ridiculously costly! If I wanted a light to move and change range and throw a disco party, then sure, but to turn a light on or off wouldn't it make more sense to just build a special lightmap and dynamically control that, like how they used to do it back in the day?
    PointLightToggleable, DirectionalLightToggleable, SpotLightToggleable paired with a Toggle action in Kismet.

  9. #9
    Join Date
    Sep 2009
    Posts
    7
    Lots of good tips there, Thanks.

    For my next project I want to make it so that you can shoot out lights. I think that from what I've learned here I can get that working. Do you have any general advice on that?

  10. #10
    Marscaleb Guest
    Quote Originally Posted by ffejnosliw View Post
    PointLightToggleable, DirectionalLightToggleable, SpotLightToggleable paired with a Toggle action in Kismet.
    Is that really going to be cheaper than setting it up in matinee?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •