Flashlight and detail props
I'm getting into a complex problem with the Source engine, and I want to know if someone could have an idea around here. Here's the deal:
I'm making an Half-Life 2: Episode 2 map and I need to spawn a lot of low-poly models randomly on a material. I'm basically just using the detail props spawning system via a VBSP file. Now, the problem is that these models need to be not-solid AND unlit. Not-solid, OK not a problem, it's just little things that don't need to be solid. Unlit, no problem too for the same reason, little thingies... a rough lighting is OK with the UnlitGeneric shader on my models.
Now, a problem appears. If I try to light the detail props using the flashlight, nothing happens. They're still pitch black (the environment ambient color). I tried a lot of "unofficial/unsupported/undocumented" shader parameters, like $vertexcolor, $vertexalpha, $receiveflashlight, $halflambert, and so on (found in a vast quantity of valve's vmt), but nothing worked out very well. --NykO18 03:30, 20 Aug 2008 (PDT)
- Unlit is unlit, I'm afraid. --TomEdwards 10:38, 20 Aug 2008 (PDT)
- Yes, of course, but it seem to work with detail props as sprites, using $vertexcolor, $vertexalpha and $receiveflashlight in the detailsprites.vmt. Although the texture is indeed UnlitGeneric. That's why I'm wondering if there's a way to do the same with models. --NykO18 10:09, 22 Aug 2008 (PDT)
Well, I made a lot of research on this problem. So far, I got no result. This isn't working with models (prop_detail), and this is not working with textures either (prop_detail_sprite). I tried to use every possible shader I found, I even tried to use custom shaders , but unfortunately, the Orange Box Engine is somewhat closed to that kind of considerations... So, basically, is there a way to do a night ambience without suffering a slap in the face each time we need lighting ? First there was env_projectedtextures that don't allow us to move them while they're turned on, then it was impossible to light up displacements correctly using dynamic_lights, and now this... Come on. --NykO18 13:27, 2 Sep 2008 (PDT)