Jump to content
  • Advertisement
Sign in to follow this  
NiGoea

CookTorrance, Microfacets models, Ward: do they worth it ?

This topic is 3342 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was reading about this models, all of which are kinda similar to the basic and simple Phong. The result, in some circumstances, can be better, but they require a bigger number of instructions. I mean, since the result is very similar to a the phong model, are those models used nowadays ? Does it worth to start studying them ? Thanks !

Share this post


Link to post
Share on other sites
Advertisement
If you are trying to do anything realistic, then yes.

The generic lighting model very crudely simulates a very rough surface (the diffuse component of the algorithm) covered in a shiny wax coating (the specular component) which is typically why when normal mapping came into play everything looked like plastic. You cannot create surfaces such as finely sanded wood, for example - as this is a very smooth surface which doesn't quite fit into the diffuse nor specular model.

They are definitely worth looking into, if only to understand more about how different surfaces can be simulated.

Oren Nayar is a good introductory (but somewhat expensive when not optimized) algorithm simulating surfaces of varying roughness.

Cook-Torrence, iirc, is purely a specular microfacet simulation but can get quite pleasing results

Personally i use a trick i haven't seen anyone else use which simulates surfaces of varying roughness & wetness, which works well for our needs.

Share this post


Link to post
Share on other sites
Quote:
Original post by Exorcist
If you are trying to do anything realistic, then yes.

The generic lighting model very crudely simulates a very rough surface (the diffuse component of the algorithm) covered in a shiny wax coating (the specular component) which is typically why when normal mapping came into play everything looked like plastic. You cannot create surfaces such as finely sanded wood, for example - as this is a very smooth surface which doesn't quite fit into the diffuse nor specular model.

They are definitely worth looking into, if only to understand more about how different surfaces can be simulated.

Oren Nayar is a good introductory (but somewhat expensive when not optimized) algorithm simulating surfaces of varying roughness.

Cook-Torrence, iirc, is purely a specular microfacet simulation but can get quite pleasing results

Personally i use a trick i haven't seen anyone else use which simulates surfaces of varying roughness & wetness, which works well for our needs.


As far as I'm concerned (and I'm NOT a professional engine programmer!), in my engine, for now, I can simulate different surfaces changing the phong parameters as usual, but also taking advantage of some detail maps, to perburb albedo, specular and, most importantly, the normals.

Perturbing the material's normal map with a detail texture using high frequency UV coordinates, gives you a very rough material. The frequency you choice, and the "smoothness" of the detail map you use, can help to achieve pleasing results.

Share this post


Link to post
Share on other sites
I've found that the results were subtle at best, and there's a simple reason for that: most of those models replace the Phong's specular component, which you will modulate with a relatively low strength, unless your surface is highly reflective or wet. So it really depends on the kind of surface you want to apply it to. In general, it is my personal opinion that they're not worth the additional instruction costs, and that they can be faked with good textures/colors/parameters.

Y.

Share this post


Link to post
Share on other sites
I did some BRDF shading years ago. Setting up the shaders wasn't so difficult, but generating these damn BRDF lookup textures on the other hand! But then again, I'm a disaster with math so maybe you'll find it easy. I only used the given cubeMaps that came with some demo. Another problem I had was combining it with normalMapping, but maybe that was because due lack of experience those days.

Anyhow, the shaders required 2 cubeMaps for retreiving the reflectance data. Not so bad for modern hardware, but keep in mind that you might need lots of different material. That means you also need to switch these cubeMaps as well, making your sorting more difficult. You can fix this by putting all possible BRDF's into 1 or 2 texture array's or 3D textures though. However, that also requires additional math to create the proper lookup texture coordinates.

When you plan to use Deffered Rendering, keep in mind that they ussually only use 1 lighting model. Either everything uses BRDF lighting, or nothing. Or you use 1 color channel to identify the lighting mode and let the lightSource shaders branch...


All together, it requires extra shader math, extra texture space, it makes material sorting more difficult, and it could conflict in case you use a deffered rendering approach. So I'd say use simplified models:
- High specular for plastic, metal
- Low specular for diffuse materials (rock, brick, terrain)
- Velvet/sheen shaders for skin, carpet, curtains

Share this post


Link to post
Share on other sites
Are they worth it?
depends on the game GranTourismo then yes!

but they are expensive GPU wise.
Ild argue that there are things further up the desirability list
decent shadowing, unified lighting, AO etc

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!