Changing textures in realtime?
Quote from Maledicted on November 17, 2008, 12:23 pmHi. 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?
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?
Quote from Ricotez on November 17, 2008, 12:46 pmThe 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.
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.
"Duct Tape is the answer."
Quote from Maledicted on November 17, 2008, 12:59 pmYes, 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! 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.
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! 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.
Quote from PortalFan77 on November 17, 2008, 1:22 pmMaybe 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.
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.
Quote from Maledicted on November 17, 2008, 2:27 pmI've found (kind of) a way to do it : ) Thanks to you both for the helpful advice
I've found (kind of) a way to do it : ) Thanks to you both for the helpful advice
Quote from Hober on November 17, 2008, 2:29 pmMaledicted 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?
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?
Quote from Maledicted on November 17, 2008, 3:05 pm..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 hereBut 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..
..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
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..
Quote from msleeper on November 18, 2008, 5:55 pmWhy do you bold your posts.
Why do you bold your posts.
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.
Quote from Ricotez on November 19, 2008, 11:44 am'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...
'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...
"Duct Tape is the answer."
Quote from Maledicted on November 22, 2008, 6:16 pmHuh (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)
It's not like i wanna propagate my grandiosity anymore anyway
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)
It's not like i wanna propagate my grandiosity anymore anyway