Game Development Community

Change dif's textures etc in runtime...

by Marcin Zygmunt · in Torque Game Engine · 12/01/2004 (7:48 am) · 5 replies

Hello.
I have a question. I wonder can I do something like this:
Lets assume that the player will throw a granade into a room(dif object), can I make a run-time effect (using dif) like: damaged walls, changing the wall texture to "damaged/dirty" and stuff like that?
I wonder if something like that would be possible...
I would be gratefull if someone could give me an answer and maybe some info on the subject.
Regards.

#1
12/01/2004 (8:02 am)
I think it's possible but you'll have to religt the building after the change has been applied. (anyone correct me if I'm wrong here). I would rather do it with a decal, though.

Oh and if you used your approach, then you would need a seperate texture (or handle) for each wall section. That's not very effective. Because if you change one texture, you will change them all if they are applied on multiple sections.
#2
12/01/2004 (10:14 am)
Quote:
I think it's possible but you'll have to religt the building after the change has been applied. (anyone correct me if I'm wrong here). I would rather do it with a decal, though.
It's impossible to change interiors whithout relight scene ?
i mean... it's some technique to "past" that...
#3
12/01/2004 (10:25 am)
I think you need to look at the decal manager. . .there is a resource on putting bullet hole decals on surfaces, including interiors. . .look into how it was achomplished
#4
12/01/2004 (10:42 am)
Quote:Oh and if you used your approach, then you would need a seperate texture (or handle) for each wall section.

Nah, you'd just need to point the surfaces at a new texture. I don't think the idea is to go into the previously used texture and draw on it.

I might be remembering wrong, but I don't think you need to relight either, since the textures don't impact the lighting. (Unless you've patched in radiosity.)

Decals are another way to go, certainly, but plenty of games get good results out of switching textures when an explosion goes off, especially during some kind of scripted sequence.
#5
12/02/2004 (12:01 am)
About the decals, is it possible to apply them on DIFs during level creation (Mission Editor) and not through script? Then later during runtime you can manipulate or replace them.

Nick