News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Mapping

Reply
 
Thread Tools Display Modes
Old 17th Jul 2008, 07:59 PM   #1
KalypsoSig
Registered User
 
Join Date: Jul. 17th, 2008
Posts: 7
Possible to change an mesh's texture in-game?

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.
KalypsoSig is offline   Reply With Quote
Old 17th Jul 2008, 10:12 PM   #2
_N_
addicted to mapping
 
_N_'s Avatar
 
Join Date: May. 23rd, 2008
Location: Canada
Posts: 233
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 .
_N_ is offline   Reply With Quote
Old 18th Jul 2008, 01:01 AM   #3
CPTStewart
Registered User
 
CPTStewart's Avatar
 
Join Date: May. 10th, 2008
Posts: 33
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.
CPTStewart is offline   Reply With Quote
Old 18th Jul 2008, 02:03 AM   #4
Hourences
 
Hourences's Avatar
 
Join Date: Aug. 29th, 2000
Location: Belgium/Holland/Sweden
Posts: 5,050
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.
__________________
Hourences is offline   Reply With Quote
Old 18th Jul 2008, 10:43 AM   #5
CPTStewart
Registered User
 
CPTStewart's Avatar
 
Join Date: May. 10th, 2008
Posts: 33
Quote:
Originally Posted by Hourences View Post
Why would you need to copy the mesh from a stock package just to change the material?
Wait... I think I copied the material from genthly's package and got confused :P

So... nevermind what I said.
CPTStewart is offline   Reply With Quote
Old 18th Jul 2008, 02:15 PM   #6
_N_
addicted to mapping
 
_N_'s Avatar
 
Join Date: May. 23rd, 2008
Location: Canada
Posts: 233
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?
_N_ is offline   Reply With Quote
Old 19th Jul 2008, 11:43 AM   #7
Hourences
 
Hourences's Avatar
 
Join Date: Aug. 29th, 2000
Location: Belgium/Holland/Sweden
Posts: 5,050
you always have that risk, I wouldnt bother thinking about that for things like this.
__________________
Hourences is offline   Reply With Quote
Old 19th Jul 2008, 12:51 PM   #8
Kantham
Fool.
 
Kantham's Avatar
 
Join Date: Sep. 17th, 2004
Posts: 18,041
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.
__________________
Kantham is offline   Reply With Quote
Old 22nd Jul 2008, 09:48 PM   #9
KalypsoSig
Registered User
 
Join Date: Jul. 17th, 2008
Posts: 7
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?
KalypsoSig is offline   Reply With Quote
Old 23rd Jul 2008, 03:18 AM   #10
_N_
addicted to mapping
 
_N_'s Avatar
 
Join Date: May. 23rd, 2008
Location: Canada
Posts: 233
Yeah, I would suggest running through Hourence's tutorials on the material editor too . You would probably just multiply the emissive channel stuff by solid black (0 times anything is still 0 afterall ).
_N_ is offline   Reply With Quote
Old 26th Jul 2008, 10:11 PM   #11
KalypsoSig
Registered User
 
Join Date: Jul. 17th, 2008
Posts: 7
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?
KalypsoSig is offline   Reply With Quote
Old 27th Jul 2008, 04:06 AM   #12
Hourences
 
Hourences's Avatar
 
Join Date: Aug. 29th, 2000
Location: Belgium/Holland/Sweden
Posts: 5,050
http://www.hourences.com/book/tutori...dmaterials.htm

In this case I would not use another texture though, but I would work with VectorParam, and simply do a multiply with constant 1 vector on whats inputted on emissive, then changing that constant 1 vector from value 0.0 to 1.0 to toggle it on through kismet, or other way around for toggling it off...

Saves texturespace.
__________________
Hourences is offline   Reply With Quote
Old 27th Jul 2008, 11:33 AM   #13
KalypsoSig
Registered User
 
Join Date: Jul. 17th, 2008
Posts: 7
Very nice!! Thank you very much, this is exactly what I need to do here.
KalypsoSig is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 07:37 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer