Continuing my endeavours to make a better NVG, i've been trying particle effects all afternoon and decided that wasn't the way to go.
I always wanted to make the textures a certain color, bright, and alpha'ed (sort of like Natural Selection's Alien flashlight). I remembered from my HL1 days that SetRenderColor existed. That works to an extent, the materials are still opaque, but there is a blue color tint to it now (white parts became blue). Since i've been "messing" around with the material system these days, i'd figure i'd get pointers to all of the model's textures. Here's the current code, in debug the array of material pointers stays null after the call to GetModelMaterials. pEntity is the entity i'm trying to change the color on, I run a sphere query to fetch all players within PVS/3000 units of the local player and get all other players in range: IMaterial* pMaterial[64]; for (i = 0; i < 64; i++) { pMaterial[i] = NULL; } modelinfo->GetModelMaterials( const_cast<model_t*>(pEntity->GetModel()), modelinfo->GetModelMaterialCount(const_cast<model_t*>(pEntity->GetModel())), pMaterial ); for (i = 0; i < 64; i++) { if (pMaterial[i]) { pMaterial[i]->AlphaModulate(128); } } I don't know enough about shaders to manage to apply one to the model textures, plus some of them have proxies and such and i don't want to mess that up, PLUS if people make custom models for my mod later on, this has to be compatible with that... So yea, how do i make the model transparent, Valve? Thanks in Advance, Imperio59 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.322 / Virus Database: 267.4.0 - Release Date: 01/06/2005 _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders