The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VDrift lighting, materials, textures
04-22-2013, 05:05 PM, (This post was last modified: 04-22-2013, 05:06 PM by NaN.)
#1
VDrift lighting, materials, textures
This thread is meant to be a dump of info about VDrift lighting, materials, textures which will end up in the wiki in a more distilled form.

The second texture has been giving me some headaches. I will be reviewing the shader code and try to document what actually happens there.


RGB channels of the second texture store fresnel reflection at normal incidence (angle of incidence = 0°).

Fresnel reflectance describes the reflectivity of a surface in dependency of the view angle. It looks like this:

[Image: Fresnel_reflection.svg]

The reflectance will go up with increasing angle of incidence. VDrift is using Schlick's approximation, but with power of 3 instead of 5.

Why are 3 channels (RGB) used for it? It turns out that the reflectance is frequency dependent. For gold, silver and aluminium it looks like this:

[Image: reflectance.jpg]


What does that mean for an artist? With RGB set to 1.0 and A to 0.0 he should get a perfect mirror. This is unfortunately not what happens in VDrift currently, needs to be fixed.


So what is the deal with the A channel? The A channel stores the info about surface roughness. With higher values surface reflections should become blurrier, with reduced specular highlights. It will look more dull.

With higher roughness the diffuse component will be increased and the specular reduced:

[Image: Gloss2.jpg]
Reply


Messages In This Thread
VDrift lighting, materials, textures - by NaN - 04-22-2013, 05:05 PM
RE: VDrift lighting, materials, textures - by NaN - 05-02-2013, 02:57 PM
RE: VDrift lighting, materials, textures - by NaN - 05-02-2013, 05:34 PM
RE: VDrift lighting, materials, textures - by NaN - 05-02-2013, 06:55 PM
RE: VDrift lighting, materials, textures - by NaN - 05-12-2013, 06:30 AM
RE: VDrift lighting, materials, textures - by NaN - 05-18-2013, 04:59 AM
RE: VDrift lighting, materials, textures - by NaN - 07-18-2013, 02:11 PM
RE: VDrift lighting, materials, textures - by NaN - 07-18-2013, 03:29 PM
RE: VDrift lighting, materials, textures - by NaN - 07-28-2013, 03:29 AM
RE: VDrift lighting, materials, textures - by NaN - 08-04-2013, 11:32 AM
RE: VDrift lighting, materials, textures - by NaN - 09-15-2013, 07:11 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)