TheEnginesOfCreation / EntityPlus

EntityPlus is a mod that offers a true single player experience in the Quake III Arena videogame.
34 stars 5 forks source link

Target_shaderchange? #99

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
could you make a entity called "Target_shaderchange" that can target a single 
piece of the worldspawn and changes textures/shaders on the targeted brush when 
activated?

Original issue reported on code.google.com by austinb...@gmail.com on 10 Aug 2011 at 7:03

GoogleCodeExporter commented 9 years ago
Unfortunately changing shaders is a call into the engine, which does all the 
work. I cannot change shaders on specific pieces of geometry or entities in the 
mod code. If you want to have different pieces of geometry that are textured 
the same but which can be shader remapped individually then you'll have to 
copy/paste your shader under a new name for each piece of geometry.

Remapping shaders can have some odd results though. I used the above method in 
the ep_example map for the buttons in the room where you fight Klesk. 
Unfortunately though, the buttons get a red hue over them after their shaders 
are remapped. I don't know why, I guess the code in the engine is just a bit 
quirky.

If it's static geometry you're building (and not an entity like a button or 
door), an alternative could be to just build the geometry twice, textured 
differently, turn those into two func_static entities and use target_unlink to 
add/remove them from the world. I tried this technique in a map I'm working on 
and at first glance it appears to work properly. Not sure if lighting turns out 
ok though, as they're brushes that occupy the same volume in the map. Haven't 
compiled with lighting yet.

Original comment by era...@gmail.com on 11 Aug 2011 at 8:39

GoogleCodeExporter commented 9 years ago
I'm closing this issue as it's not doable :-)

Original comment by era...@gmail.com on 29 Aug 2011 at 12:35