UE3 - UT3 Possible to change an mesh's texture in-game?

  • 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.

KalypsoSig

New Member
Jul 17, 2008
7
0
0
Hey everyone. So I'm just wondering if there's a way to change a texture on a mesh in-game, maybe through kismet? Perhaps for a lamp that has both "on" and "off" state texture maps.
 

_N_

addicted to mapping
May 23, 2008
233
0
0
Canada
If by "texture" you mean Material, then yes. I did something like that for the core status screens in my recent warfare map. Apparently, it doesn't work for Static Meshes though, so you'll need to add your static mesh as an interp actor instead (and simply not have it move at all).

To actually change the material, you can do it easily in Kismet. Simply connect the trigger event node (whatever it is that you have triggering this change) to a "Set Material" node. (i.e. New Action->Actor->Set Material).

Good Luck ;).
 

CPTStewart

New Member
May 10, 2008
33
0
0
Or, you can copy the mesh from the stock package into your own and change the material that way. That's what I did for the skydome in my Valhalla map.

You can find the instructions for copying the mesh in this tutorial.
 

Hourences

New Member
Aug 29, 2000
5,050
0
0
40
Belgium/Holland/Sweden
www.Hourences.com
Why would you need to copy the mesh from a stock package just to change the material?

What _N_ said is correct, and I have a tutorial on my website on triggering materials via Kismet if you need additional help.

You dont need to make an all new lamp texture for the off state, you only need to disable the emissive to save memory.
 

_N_

addicted to mapping
May 23, 2008
233
0
0
Canada
Oh wow, Hourences, your solution is much better than mine :). It gets rid of the need for those pesky inefficient interp actors (which I could never get to accept static lights). Do you know if there's any risk of there being one of those crazy texture-streaming artefacts (like a lower detail texture being used) if the texture was not previously used elsewhere in the map?
 

Kantham

Fool.
Sep 17, 2004
18,034
2
38
From what I recall, yes you can do it from kismet depending on your goals. If you want something to trigger it then it's definitively in Kismet that you're going to do it.
 

KalypsoSig

New Member
Jul 17, 2008
7
0
0
Thanks for all the information guys!

I can see how this would work now in kismet. However, Hourences suggested that I simply disable the emmisive channel instead.

How would I go about doing that?
 

_N_

addicted to mapping
May 23, 2008
233
0
0
Canada
Yeah, I would suggest running through Hourence's tutorials on the material editor too :rolleyes:. You would probably just multiply the emissive channel stuff by solid black (0 times anything is still 0 afterall ;)).
 

KalypsoSig

New Member
Jul 17, 2008
7
0
0
Yes I know how to hook up and disable the emissive channel, my question is how would I trigger that with kismet... is there a way to target a specific channel in a single material or do I need two copies of the that material, one with the effect on and one with it off?