Changing textures in realtime?

Avatar
Maledicted
7 Posts
Posted Nov 17, 2008
Hi. I'm new here and i'm working on a map that requires mechanics that i don't yet know how to implement, so after quite a bit of searching at Valve's official developer wiki *and this site's i'm still stumped, so any help will be appreciated : )

So - is there an entity or something that can, when triggered, change the texture/material of a certain face/brush in realtime*?

Advertisement
Registered users don’t see ads! Register now!
Avatar
Ricotez
738 Posts
Posted Nov 17, 2008
Replied 23 minutes later
The env_texturetoggle is the one you need.

Behead! It will only work on actual entitybrushes, like a func_brush. Also, the texture you try to switch must have those other textures 'built-in', like the Indicator Light textures.

If you want to do something like this with textures that have no built-in switch, you could try to draw 2 brushes through each other, have only one visible and use entities to make the visible one invisible and the invisible one visible at the same time.

Avatar
Maledicted
7 Posts
Posted Nov 17, 2008
Replied 13 minutes later
Yes, you kind of got my idea - env_texturetoggle of course is for textures that have *states - like the indicator lights, yes. But what i want to do is really change one material with another. And i did think of making my own toggleable textures, but that would mean creating a separate material for each and every one texture change i want to do! :eek: Yeah, sure i could get down and try to do it, but i was wondering if there wasn't an easier way?

Also, with creating two brushes over each other won't there be a problem with lighting? As i recall someone had posted a thread here about a similar problem.. I think his static 'world' architecture was lit in one way, and his entity brushes in another or something like that. :neutral: *

Avatar
PortalFan77
432 Posts
Posted Nov 17, 2008
Replied 22 minutes later
Maybe this will help, make a VERY VERY VERY thin piece of wall and put a texture on it, then when you want to the wall can go away and reveal an Identical wall with the different texture, may look cheap who knows. That way you wont need to use a texture like the Indicator lights.
Avatar
Maledicted
7 Posts
Posted Nov 17, 2008
Replied 1 hour later
**I've found (kind of) a way to do it : ) Thanks to you both for the helpful advice :biggrin: **
Avatar
Hober
1,180 Posts
Posted Nov 17, 2008
Replied 1 minutes later

Maledicted wrote:
Hi. I'm new here and i'm working on a map that requires mechanics that i don't yet know how to implement, so *after quite a bit of searching at Valve's official developer wiki and this site's i'm still stumped, so any help will be appreciated. *

Damn. Most people start off in the "hello, world" thread, but this is a much more impressive way to say "hi".

Welcome to TWP; enjoy your stay.

And, for the public edification, would you mind posting the details of your solution, or even making a short wiki article detailing it, so that if anyone ever has this problem again we can just point them to that?

Avatar
Maledicted
7 Posts
Posted Nov 17, 2008
Replied 36 minutes later
..the thing is.. it's not really anything new, i actually needed to switch *texture lights on/off but in the end i just used triggerable lights and faked the default selflit texture with a purely white non-light-emitting one, with the light placed a nano-centimeter away from it ;
Oh.. i need the mechanic in question for other ideas as well, but i'm not going to share them now because who knows.. maybe if i get my map just the way i want it i'll release it here :biggrin:

But my initial idea was to be able to toggle the selflit texture lights on/off and although i knew the long way, i wanted a short way : ) heh..*

Avatar
msleeper
4,136 Posts
Admin
Posted Nov 18, 2008
Replied 1 day later
Why do you bold your posts. :neutral:
Avatar
Ricotez
738 Posts
Posted Nov 19, 2008
Replied 17 hours later
'cause we all have some strange behaviour, I guess? I have seen worse, for example a guy who capitalized the first letter of all his words (it's almost as bad as allcaps), and a guy who wrote everything in pink...

I do wonder, though. When writing everything in bold, how do you put extra stress on certain words?
You just leave the bold away? Or do you use *italic or __underline*?

*How 'bout a combination of both?*__

Sorry, I'll stop now, before the BBcode gets out of hand...

Avatar
Maledicted
7 Posts
Posted Nov 22, 2008
Replied 3 days later
Huh (sorry in advance for the OT) - it's just inferiority complex habits from the old days : ) Bold makes you stand out (and that <- is reverse psychology) :biggrin:
It's not like i wanna propagate my grandiosity anymore anyway :rolleyes:
Avatar
Remmiz
631 Posts
Posted Nov 25, 2008
Replied 2 days later
Bold make it seem like you don't know what to put emphasis on, so you emphasize everything...by yelling.
Avatar
Ricotez
738 Posts
Posted Nov 25, 2008
Replied 4 minutes later
Still, it's better than allcaps...
Advertisement
Registered users don’t see ads! Register now!
Avatar
sbrown
303 Posts
Posted Nov 27, 2008
Replied 2 days later

http://www.youtube.com/watch?v=v7xPlNWj2wU