Cubemap vs phong shading.

Got problems with your models? Struggling with textures? Get help with your custom assets.

Cubemap vs phong shading.

Postby oOCaptainCrazyOo on Sat Nov 23, 2013 8:43 am

So for static props such as a safe and such, what would be better to use? Phong shading or env_cubemap? I remember using phong shading years ago when messing around with walls and such but for something like a prop which would be better? For now I'm only going to be using it for props and not weapons so it's not an issue as of yet but I'd really like to familiarize myself with it again/

Also could somebody remind me of what the console command is to "see" its effects in the game? I've tried looking through pages of search results on Google but can't seem to find anything and i only ask on a forum as a last resort.

Thanks!
oOCaptainCrazyOo
Member
Member
 
Joined: Sat Nov 23, 2013 8:37 am

Re: Cubemap vs phong shading.

Postby Sathor on Sat Nov 23, 2013 9:56 am

Really depends how well you execute the masks, tbh. Both can look very good for smaller objects. For a metal object like a safe with mostly sharp corners, I'd prefer cubemaps...

But without the right masking, both won't look good. Phong tends to add a plastic-look if not used correctly.
User avatar
Sathor
Senior Member
Senior Member
 
Joined: Sat Jan 20, 2007 10:31 pm
Location: Germany

Re: Cubemap vs phong shading.

Postby oOCaptainCrazyOo on Sat Nov 23, 2013 10:42 am

Sathor wrote:Really depends how well you execute the masks, tbh. Both can look very good for smaller objects. For a metal object like a safe with mostly sharp corners, I'd prefer cubemaps...

But without the right masking, both won't look good. Phong tends to add a plastic-look if not used correctly.


Thanks i know all about masking and such as I've done it before :D In something like GMod will i need to run a command line each time i put an object down? I'm guessing I'll also need an env cube next to it to make it work though right?
oOCaptainCrazyOo
Member
Member
 
Joined: Sat Nov 23, 2013 8:37 am

Re: Cubemap vs phong shading.

Postby jimonions on Sun Nov 24, 2013 4:55 am

the cubemaps are placed in the map editor and compiled there. The buildcubemaps command is run once ingame to build them after which they are automatically attributed to that map. Any models using a cubemap shader will look for the nearest cubemap and use it.
User avatar
jimonions
Regular
Regular
 
Joined: Tue Feb 01, 2011 10:41 am

Re: Cubemap vs phong shading.

Postby SotaPoika on Sun Nov 24, 2013 9:08 am

jimonions wrote:the cubemaps are placed in the map editor and compiled there. The buildcubemaps command is run once ingame to build them after which they are automatically attributed to that map. Any models using a cubemap shader will look for the nearest cubemap and use it.


Isn't it twice? Once for LDR and once for HDR.
* Portfolio: http://sp0n3.carbonmade.com/
* No More Room In Hell - Level Designer
* Zombie Panic! Source - Level Designer
User avatar
SotaPoika
Pheropod
Pheropod
 
Joined: Thu Nov 16, 2006 6:07 pm
Location: Finland

Re: Cubemap vs phong shading.

Postby Dives on Sun Nov 24, 2013 9:26 am

if you use -both. Not even worth it to use -both because but who has a computer that can't run HDR in 2013?
User avatar
Dives
May Contain Skills
May Contain Skills
 
Joined: Sat Feb 28, 2009 9:54 pm
Location: Moorpark, CA

Re: Cubemap vs phong shading.

Postby oOCaptainCrazyOo on Sun Nov 24, 2013 10:06 am

Thanks for all of the insightful info and tips, now i need to find a tutorial to brush up on making one but i doubt that's hard.
oOCaptainCrazyOo
Member
Member
 
Joined: Sat Nov 23, 2013 8:37 am

Re: Cubemap vs phong shading.

Postby kraid on Sun Nov 24, 2013 11:29 am

You're question implies that you have to use either envmap or phong.
These two are a completly different effect and can be used at the same model if neccessary.
Phong isn't there for creating reflections, it just has an impact on highlights and general light distribution arround a model. It alters the material appeareance. (even to a point where toon shading ala TF2 is rendered)
Envmap on the other hand is used to create the reflections on the surface of a prop.

While it's true that some envmap parameters don't work if you're using phong, it's still there to cause reflections.
So the question if you should use envmap, phong or both on the prop simply depends on the model itself (what material appeareance to achive) and overal performance.

After all, an important prop or even character will use both in combination with a phongmask and an enviroment mask that was put into the normalmaps alphachannel.
So there are quite a few textures to load beside the calculation of the shader.
Goldeneye Source v4.2.3
get it now and play for FREE!!!
http://www.goldeneyesource.net
kraid
Been Here A While
Been Here A While
 
Joined: Thu Jan 22, 2009 12:09 pm

Re: Cubemap vs phong shading.

Postby MrTwoVideoCards on Mon Nov 25, 2013 10:07 am

everything in the real world uses both, if you're going for something realistic. Baiscally what kraid said, they are two completely different things, and every object tends to have a specular highlight and an environment reflection unless it's a rough surface thus creating no environment reflection.
User avatar
MrTwoVideoCards
Monothetic
 
Joined: Thu Aug 02, 2007 11:18 am
Location: IN YOUR SOUL

Re: Cubemap vs phong shading.

Postby Black_Stormy on Tue Nov 26, 2013 4:36 am

Unfortunately in source, you can't use both in the same .vmt (please tell me I'm wrong?).

Since we're doing it, which is cheaper to render? Cubemaps or Phong? And what about Rimlight? Usually if I use phong I'll use rimlight purely because it's part of the phong package in source so why not.
User avatar
Black_Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: Cubemap vs phong shading.

Postby WhiteDevil on Tue Nov 26, 2013 8:29 am

wut? I made some chrome using both. But I don't recommend it. Spent something over an hour tinkering the settings to get looking even barely similar.
Image
User avatar
WhiteDevil
Been Here A While
Been Here A While
 
Joined: Sat May 28, 2005 1:09 pm

Re: Cubemap vs phong shading.

Postby MrTwoVideoCards on Tue Nov 26, 2013 12:01 pm

cubemaps are cheaper, also that looks pretty good whitedevil. Chrome has a specular highlight and reflects the scene, not sure why you'd have problems with doing both on the model.

Image
User avatar
MrTwoVideoCards
Monothetic
 
Joined: Thu Aug 02, 2007 11:18 am
Location: IN YOUR SOUL

Re: Cubemap vs phong shading.

Postby jRocket on Wed Nov 27, 2013 4:25 am

I use both. I think they added support for using both with the orangebox engine. I know you couldn't combine phong with cubemapped reflections when phong was introduced with episode one, so there may be some confusion there.

WhiteDevil - is that phong on world brush geometry??
jRocket
Dumpling
Dumpling
 
Joined: Sat Aug 29, 2009 3:56 am

Re: Cubemap vs phong shading.

Postby WhiteDevil on Wed Nov 27, 2013 5:28 pm

No, phong is a vertex shader so you can't put it on world brushes.
User avatar
WhiteDevil
Been Here A While
Been Here A While
 
Joined: Sat May 28, 2005 1:09 pm

Return to Custom Asset Help

Who is online

Users browsing this forum: Google [Bot]