Forum

Chrome

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Chrome

Postby behind_you » Mon May 02, 2011 9:14 am

chrome effect is most notable in half life. i don't know how to describe it to those who don't know what it is. is it possible in quake? ie in dp, have a texture names model.mdl_chrome.tga?

doesn't seem too hard to implement. i could be wrong tho
User avatar
behind_you
 
Posts: 237
Joined: Sat Feb 05, 2011 6:57 am
Location: Tripoli, Libya

Postby leileilol » Mon May 02, 2011 10:04 am

the method to pull this off is to use a shader. like say you had a MD3 with a surface "shinyshinyshiny" with a texture path "models/imsoshiny.tga" there, you'd have a shader file in scripts/ with this in it:

Code: Select all
models/imsoshiny
{
      {
         map models/imsoshiny.tga
         tcGen environment
         rgbGen lightDiffuse
       }
}


tcGen environment is the magic maker here.

This advice applies to Darkplaces and FTEQW as well as id tech3 and qfusion
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby behind_you » Mon May 02, 2011 10:17 am

sweet. simple and effective. thanks!


ps. congrats on ur 1800th post!
User avatar
behind_you
 
Posts: 237
Joined: Sat Feb 05, 2011 6:57 am
Location: Tripoli, Libya

Postby Baker » Mon May 02, 2011 2:41 pm

Qrack had an effect you can turn on with a cvar called gl_shiny. Not really much different than the mirror effect in Kurok (which wasn't actually a mirror). I think both implementations were from a likely lost tutorial at quaksrc.org (that was posted in the tutorial section of the forum, which was not the same as the "Old Tutorials" section).

Didn't affect models, just the map. Being Q1, the feature works on hardcoded texture names being affected by the feature and likewise uses a hardcoded texture as the material.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby Spike » Mon May 02, 2011 6:01 pm

that qrack feature would be more effective if it used the glossmaps provided by many texture packs.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby r00k » Tue May 03, 2011 8:50 am

true. its simple environment mapping, I haven't played with it in years...

(that was posted in the tutorial section of the forum, which was not the same as the "Old Tutorials" section)


Qrack is like a bar of soap made from old bars of soap... ;)
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest