Please or Register to create posts and topics.

Changing textures in realtime?

Page 1 of 2Next

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?

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.

Image

"Duct Tape is the answer."

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! :shock: 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. :|

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.

I've found (kind of) a way to do it : ) Thanks to you both for the helpful advice :D

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?

"Games are made out of smaller games ? turtles all the way down, until you hit the game that is so trivial and stupid it isn?t deserving of the name." --Raph Koster

..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 :D

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

Why do you bold your posts. :|

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
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.

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

Image

"Duct Tape is the answer."

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) :D
It's not like i wanna propagate my grandiosity anymore anyway
:roll:

Page 1 of 2Next