Архитектура Аудит Военная наука Иностранные языки Медицина Металлургия Метрология
Образование Политология Производство Психология Стандартизация Технологии


There is no chart for the reflectance value of the Unreal engine 4, just let the value by default and apply a cavity map on it.



 

It is value between 0 and 1 and is used to scale the current amount of specularity on non-metallic surfaces. It has no effect on metals.

 

For very diffuse Materials, you may be inclined to set this to zero. Resist! All Materials have specular. What you really want to do for very diffuse Materials is make them rough.

 

Commonly, if we modify Specular, we do so to add micro occlusion or small scale shadowing, say from cracks represented in the normal map. These are sometimes referred to as cavities. Small scale geometry, especially details only present in the high poly and baked into the normal map, will not be picked up by the renderer's real-time shadows. To capture this shadowing, we generate a cavity map, which is typically an AO map with very short trace distance. This is multiplied by the final BaseColor before output and multiplied with 0.5 (Specular default) as the Specular output. To be clear this is BaseColor = Cavity*OldBaseColor, Specular = Cavity*0.5.

 

For advanced use, this can be used to control the index of refraction (IOR). We have not found this to be necesary for 99% of Materials. Below are Specular values based off of measured IOR.

 

Material Specular
Glass 0.5
Plastic 0.5
Quartz 0.570
Ice 0.224
Water 0.255
Milk 0.277
Skin 0.35

Additional charts and values.

Example measured Materials. Top: Charcoal, fresh concrete, worn asphalt. Bottom: Copper, iron, gold, aluminum, silver, nickel, titanium

 

 

Tips & Techniques

TL:DR (Summary) ( source )

Yes, metalness maps should generally be 0 or 1.

Metalness defines whether the surface is a raw metal or not (this is important, painted metal isn't metal for instance, its paint).

 

For metallic surfaces, the specular intensity is pulled from the albedo map, while the diffuse is darkened to 0 (raw metals reflect nearly 100% of light, so they don't really have a diffuse component). This basically means that the albedo for raw metals is black.

 

For insulators, or non-metals, the diffuse color is pulled from the albedo map, while the specular intensity is set to a fix value (0.04 or so), as most non metals reflect light in very narrow range of values.

 

Gloss/roughness maps define how glossy or rough a surface is, and how tight or wide the specular reflections are. Glossier surfaces have tighter, more intense highlights, while rougher surfaces have wider/blurrier and more dim highlights. This applies regardless of material type. If the surface is a glossy plastic, you make it glossy in the gloss map. For wear and tear and such, say for where the gloss coating on the plastic is worn off, you would make it more rough in the gloss map. You shouldn't be painting highlights or lighting of any sort into any maps with modern shaders.

 

Generally engines will use a full color spec map, or a metalness map. The biggest difference is really how the content is packed. Its true that the metalness workflow gives you less control, but its more efficient memory wise as you can pack more info into less textures. The theory with the metalness thing is that it is harder for artists to use incorrect specular values (artists have a tendency to eyeball stuff, which often looks ok under one set of lighting but totally wrong in another).

 

As far as glossy plastic goes, you should be able to do this just fine with a metalness map and your gloss map. Something like a car paint shader is more complex and would likely require a custom shader.

 

The best way to visualize these concepts is to load up TB2/EU4, add a sphere, and play with simple parametric materials. Adjust the gloss/roughness values, observe how the reflections change. Play with the metalness value, etc.

 

UE4 - Biggest Difference ( source )

UE4 does NOT use the Albedo map the same way another engine would strangely enough. It is referred to a “Base Colour” and instead of metals being more or less black, they are actually the opposite. Visit the source or visit UE4 - The Difference for more information.

sRGB Color Space (gamma) ( source )

Be aware that you are working in sRGB color space on your monitor when painting a texture. In sRGB space, a 50% mid-gray is not 0.5 or 127 but rather 0.5 raised by the inverse of gamma 2.2 which equals 187 in Photoshop. In a nutshell, the reason that sRGB is used is to avoid banding artifacts. In sRGB space you get more precision for darker colors to which the human eye is more sensitive. Before working on colors, please make sure that your screen is calibrated properly.

Spacing per Map ( source )

Diffuse/Albedo maps are generally gamma space.

Specular maps generally are Gamma space.

Gloss/Roughness maps should generally be linear space (sRGB off), but its not a big deal if you use sRGB/Gamma space.*

Normal maps should always be linear space (sRGB off).

There isn’t a huge emphasis on colour spacing for PBR but it is noted in many sources because those sources are trying to cover all basis and explain the nature of this genre.

 

Photoshop Setup ( source )

Verify that your Photoshop color management is set up properly. You can access the Color Settings from the menu via Edit->Color Settings...

RGB should be set to sRGB and Gray to Gray Gamma 2.2

By default, Gray is often set to Dot Gain 20% which will result in a color transformation in the alpha channel. A value of 127 will come into the engine as 104 in that case which can cause inconsistencies, so please make sure Gamma 2.2 is used instead.

 

Some Nifty Time-Saving Tips! ( source )

● The gloss map is one of the most important textures. With the gloss map you can give some history to an asset. For example, make parts of an object that were touched a lot by people less rough.

● For non-metal objects, don't waste time with a specular map but focus rather on the gloss map. This will also help to save memory, as a constant specular material color is enough in most cases.

● Put variation into the gloss map. Not just random noise but think really where the object would be less or more rough.

● Always test the specular reaction of objects/materials, by rotating them against a light source and viewing them from different angles. Specular is what gives objects the sense of volume and breaks the flat look.

● Make sure that the lighting is setup properly when testing assets (you can use a special asset test level with calibrated lighting).

● If an object has the correct physical specular color but you see hardly any specular highlights on top of the diffuse, the gloss is likely too low. Try to increase the brightness of the gloss map.

● [CE3] To see just the specular without any diffuse, put the Diffuse Color to black in the material editor.

● [CE3] Use the histogram in the material editor to identify issues in the material setup. You can easily judge the overall brightness of textures using the histogram.

Deciding Which Values to Use for Materials ( source )

Gather reference for each material type/part of the object.

Start by doing a rough block in for each material type, this doesn’t have to be exact but should be close enough so that you have a good base to start tweaking from.

 

For each material I start with the reflectance value, these can be found in various charts online, if I can’t find a reflectance value for a certain material, I try to determine it with logical reasoning (ie, worn out rubber will be less reflective, brass is a mix of copper and zinc, etc).

 

Reflectance values are the easiest to start off with, and give you a good base for the other maps. For insulators, its important to keep to keep the values within the small range that non-metals typically reflect. For metals, its important to make the diffuse black first, and then find the appropriate reflectance value. After this I will assign a quick roughness value, usually by just sorting materials into 3 categories (shiny, middle or rough). Then I pick an albedo color, paying attention here to keep things consistent and not too dark. I also toggle through various skies to make sure the materials are consistent in a variety of lighting conditions. Once this initial stage is over I fall back on observation for the fine tuning these values, since every material is different, keeping in mind the concepts of PBR. At this point I like to add a basic overlay to the normal map for materials that have a strong surface variation, such as bumpy plastic.

 

Its important to remember that values in the reflectance map only change when there is an actual change in material.

Colour Space Confusion and Why It Matters ( source )

Gloss/roughness maps and metalness maps tend to be linear space as well, but they don't necessarily have to be. From a practical perspective, any input that defines a percentage value (like gloss and metalness), makes sense to use linear color space for the texture input. This is so you can easily mock up a material will a parametric input in your shader (which tends to be linear space), and then easily duplicate that value in photoshop by selecting the color with the brightness input in the color picker. The values for these maps will not be accurately visualized in photoshop though (which works in gamma space by default), so its important to verify the results in the actual shader/game/renderer and not worry about what it looks like in 2D.

 

Generally it's important for this to be consistent throughout your project, which maps are in linear or gamma space. Its not something that should vary per asset, so talk to your technical artist, engineers, etc if you're confused about which to use. Again, you don't need to set photoshop up in a special way to use linear space textures, just remember to check the final result in game. There are some more technical things to consider, like if you're using gamma space specular but find a measured reflectance value in linear space. In that case you will need to convert the values.

 

Lastly, all your textures do not need to be linear space "to be pbr", I've heard this before, I'm not sure what the source of this information is but its factually incorrect. Color space simply defines how much precision is used for the darker values (more in the case of sRGB) vs a linear distribution of precision for the data (linear space). Color space in regards to texture inputs actually has nothing to do with physically based rendering (other than the fact that you may need to convert your measured base values - which depends on the source of said values). However, most renderers that have PBR shaders, the renderer itself is in linear space(for a variety of technical reasons), but this is something different entirely.

 

Dealing with Elements like Rust ( source )

[Metalness workflow] In 99% of cases, metals should be black or white but rust is an exception. You really don't want midtones unless you are blending between two materials ( non metal and metal). Especially with something like rust. You will end up with something that is giving off orange specular (which rust doesn't) and is very dark in the diffuse. I would keep it close to either end of the spectrum, but not in between. The areas which are only lightly rusted, are quite significantly less reflective than the un-rusted areas. But maybe you would still want a metalness value of 0.1 or 0.2 or something, as its probably a bit more reflective than 0.04.

 

Minor science bit here:

You may remember from school that chemical reactions are irreversible, and usually happen "instantly". the same is true of oxidation, once a molecule becomes oxidized it stays that way forever. That's why when you want to get a rust patch cleaned off of your car, you have to sand it right down to the bare metal and treat it from there.

 

Now, how to apply that to your metalness map:

Start off with white, this is your metallic layer, which will always be underneath the oxidized layer. then take a black brush, and adjust the opacity of the brush to reflect how THICK you want the layer of oxidation to be. the thicker the layer of oxidation, the blacker it becomes. It's possible to have a very fine/thin layer of oxidation that still allows a lot of light to be reflected by the underlying metal, but it's also possible for the oxidation to become so thick that no light can be reflected by the metal beneath.

 

Of course, as with everything, this isn’t the only way to approach this and is just one method someone prefers. Don’t get caught up with steps and following everything to the letter because another approach to the above would to alter the albedo/spec map more than the metalness map, etc. Refer to the tutorial/examples

section for more information.

 

Examples

Tileable Dirt & Pebbles Texture - click here

Some Environment Textures - click here

Cutting Torch - click here

PBR Stylized Dagger - click here

Video

PBR Theory Explained - click here

PBR in Substance Designer - click here

Additional Readings & References

Comprehensive Guide

Vol.1 - The Theory of Physically based Rendering - click here

Vol.2 - Practical Guidelines for PBR Texturing - click here

General

UDK Physically Based Lighting - click here

Free Engines Supporting Physically Based Lighting - click here

TGA Physically Based Lighting CGFX Shader for Maya Viewport - click here

Science & Theory

Water Drops & Wet Surfaces PBR - click here

Sebastien Lagarde’s Adopting a physically based shading model

Feeding a Physically Based Lighting Mode - click here

SIGGRAPH 2014 Course: Physically Based Shading in Theory and Practice - click here

John Hable’s excellent blog post: Everything Is Shiny

John Hable’s even better blog post: Everything Has Fresnel

The SIGGRAPH 2010 course on PBR

Always worth mentioning: The Importance of Being Linear

Slideshow of Real Shading in Unreal Engine 4

Mike Seymour’s Monsters University: rendering physically based monsters

Physically Based Rendering - From Theory to Implementation

Crytek’s PBR Presentation ft. Ryse - Moving to the Next Generation - The Rendering Technology of Ryse

Practice

Sébastien Lagarde’s summary of Rendering Remember Me

Discussions

Polycount discussion on PBR - click here

Polycount PBR Texturing Process Q&A - click here

Reddit Star Citizen PBR Discussion - click here

FAQ


Поделиться:



Последнее изменение этой страницы: 2019-04-01; Просмотров: 324; Нарушение авторского права страницы


lektsia.com 2007 - 2024 год. Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав! (0.046 с.)
Главная | Случайная страница | Обратная связь