Ling Sai
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- title: PBR Physically Based Rendering description: PBR research tags: PBR, RD, Public, Article --- # What is PBR > PBR 指的是 "Physically Based Rendering" > 也就是基於物理正確的方式來計算燈光與材質, > 實際上這個概念很早以前就有, > 並且很多已知的算圖引擎如 Vray、MR、 > 甚至近幾年的 Octane、Redshift 都是 Physically Based Rendering。 ## 為什麼 PBR 最近這麼夯? > 因為 "Physically Based Rendering" 需要花費大量計算資源, > 遊戲講求的是即時運算,每秒 30~60 fps, > 不可能像是 CG 那樣一張算個一小時以上, > 所以即便以前就有即時算圖非常厲害的技術, > 也沒有辦法應用在遊戲上。 ==Goodbye Specular,Hello Reflection== ![](https://i.imgur.com/gAiKbXu.png) > 以前的遊戲,大多只有即時反光(Specular) > 隨著硬體越來越強大,加上演算法的改良, > 這幾年開始加入即時反射(Reflection) > 使得遊戲的畫面效果變得更加真實, > 因為是 Realtime 就可以計算出很棒的效果, > 而不像 CG 那樣一張要算很久, > 所以 PBR 這三個字又突然開始熱門了起來。 > ==在遊戲界,It's Next Generation== ## We are talking about PBS > 實際上這裡的 PBR 應該稱 Physically Based Shading, > 只討論材質在真實物理環境下的反應, > 不討論 AO、GI,Shadow 這些燈光和其他的部份。 ==Simply using a PBR shader does not make your artwork physically accurate. A PBR system is a combination of physically accurate lighting, shading, and properly calibrated art content.== > PBR 在材質上有幾個重點: > 1.材質分為導體與電介質(Conductors/dielectrics)。 > 2.所有的材質都有 Specular/Reflection 和 Glossiness/Roughness 。 > 3.貼圖走線性流程。 > 4 PBR 遵守能量守恆 ## Conductors And dielectrics 金屬與非金屬(導體與電介質/非導體) > 這是 PBR 最重要的部份,所有的材質都會反射, > 通常電介質的 Specular Color 會是灰階, > 而導體的 Specular Color 則會帶有顏色。 ![](https://i.imgur.com/q5IPmHY.png) > 視覺上來看,導體都有較強的反射, > 大多數的電介質只要經過拋光處理就可以產生更強的反射(Specular), > 除了 Specular Color 上的差異,電介質的 Fresnel 也較低。 ![](https://i.imgur.com/JZTiKMC.png) > 因此我們大致上可以用 Fresnel/ior 來定義材質是導體或電介質, > 不過切記這只是個替代方案, > metalness/metalic 跟 Fresnel/ior 在物理上仍然是不同意義的。 :::info 如果材質經過電鍍或上漆後,材質的屬性會是最外層的屬性。 ![](https://i.imgur.com/tOw4a4V.png) ::: ### Albedo/Diffuse/BaseColor > 其實都是一樣東西,只是不同領域的講法, > 這張圖代表材質本身的顏色, > 需要去除光線、陰影、包括 AO 等等和燈光有關的資訊。 > > ![](https://i.imgur.com/G4vCTCc.png) > > 深入點來說, > Albedo 在非導體的時候會和 Diffuse 相同 > 在導體上會是黑色, > 在半導體的時候,Albedo 會比 Diffuse 暗, > 這是根據能量守恆,部份能量彈射不被材質吸收。 :::info 不過 Albedo 其實是反照率, 是描述大範圍面積,例如一片陸地、海洋,甚至星球等, 在接受太陽輻射後的反射與吸收平均比例值, 完全吸收為 0,完美反射為 1。 也就是說,Albedo 只能顯示出灰階,無法帶有顏色資訊, 必須再搭配光譜(spectrum)才能組合出我們一般認知的顏色。 在 PBR 使用 Albedo 這個字其實算是誤用, 但一方面也是為了和舊的遊戲製作流程做區隔, 因為舊的流程 diffuse map 會帶有反光和陰影。 ::: ### Specular/Metallic/Reflection > 如同 Albedo,這三個其實也是在描述反射現象。 > 但描述的狀況不同,所以得到的意思也不太一樣, > Specular 一般理解是反射上對光源的鏡面反射, > 而反射分為 Specular reflection 和 Diffuse reflection, > 差異在於反射的模糊程度, > Metallic 則定義材質屬於金屬或是非金屬, > ==所有的材質都有反射,只是反射率上的不同。== ![](https://i.imgur.com/DhNmYGl.png) 所以 -- Specular 其實就是沒有模糊的反射, Diffuse reflection 就是被 Glossiness 的 Specular, Metallic 是物理性質,材質越趨近金屬,反射率越強。 :::info 但是如同前面說過, 非金屬的 Reflection 會是白色,金屬則會帶有顏色, 所以當你用 Metallic 的方式來定義反射的時候, diffuse 和 reflection 會被改變顏色, 這是物理正確的。 ![](https://i.imgur.com/4Ce4y97.png) ::: ### Roughnes/Glossiness 用來描述材質表面的粗糙程度,越粗糙的會產生越模糊的反射。 ![](https://i.imgur.com/EUQZvNB.png) 物理性上,材質的反射強度是根據材質表面的光滑程度與 Fresnel, 反射的顏色會根據物質的導電性改變。 ![](https://i.imgur.com/whjieJ2.png) ### That's all **實際上 PBR 只使用三張貼圖 albedo、metalness、roughness** 它簡化了材質的作法,並且得到接近物理正確的效果, 重點是有了反射,一切都變得真實許多。 ![](https://i.imgur.com/KIIOeDj.png) 其他如 normal 之類的 Map,那是上個世代的技術了。 ## 所以到底怎麼用在 Vray 上? > 大部分的狀況下,PBR 的貼圖可以直接使用在 Vray 之類的算圖引擎。 :::warning Fresnel, in Toolbag 2 and most PBR systems, is approximated automatically by the BRDF, in this case Blinn-Phong or GGX, and usually does not need an additional input. However, there is an extra control for Fresnel for the Blinn-Phong BRDF, which is meant for legacy use as it can result in non physically accurate results. ::: > ![](https://i.imgur.com/YmEBEoZ.png) > Matelic 0~1 > ![](https://i.imgur.com/2qkgedf.png) > ![](https://i.imgur.com/fykux4C.png) > > Colored > ![](https://i.imgur.com/qd8e1K8.png) > ![](https://i.imgur.com/k7F0CLZ.png) > > Roughness 0~1 > ![](https://i.imgur.com/nqKNB7V.jpg) > ![](https://i.imgur.com/U8hlOxh.png) > > Shader Material > ![](https://i.imgur.com/ekkzkdE.png) > ![](https://i.imgur.com/VAxvtoL.png) > 畢竟是不同的解算引擎,所以你只能得到很近似的效果, > 顏色和數值強度上還是會有些落差, > 而且一開始就有提到,Matelic 和 Fresnel 本來就不相同, > 只是我們這裡用 Matelic 數值代替 Fresnel 得到近似值。 > :::info 這有點類似用單眼拍照時,你會有光圈先決,快門先決,也會有 M 模式。 PBR 提供了 Matelic 先決模式, 你調整 Matelic,其他 diffuse color、reflection color、fresnel 等等都會自動調整, 使用者可以很輕易的調出好看的材質。 Vray 材質提供的是 M 模式,你所有的數值都要自己調整, 可以更精準的調出各種想要的材質,但是也可能調出很奇怪的結果。 ::: > > 此外,雖然 PBR(PBS)聲稱是能量守恆, > 但實際上它忽略了燈光與陰影,以及 diffuse 散發的能量等等細節, > 而這些在 CG 用的算圖引擎都會加入計算, > 因此無法得到完全一樣的結果。 >==Simply using a PBR shader does not make your artwork physically accurate. A PBR system is a combination of physically accurate lighting, shading, and properly calibrated art content.== > 此外,以目前遊戲用的 PBR 規範, > 是有捨棄掉一部分的 Fresnel 範圍, > 最小值大約是 1.5~1.6 之間, > 低於 1.4 的材質,用 PBR 是模擬不出來的。 ![](https://i.imgur.com/qz7o42v.jpg) ![](https://i.imgur.com/JZTiKMC.png) > 另外,其實很多材質沒有辦法單純的用導體或非導體決定反射是否帶有顏色, > 例如半透明的物體,或是混合材質。 > > ![](https://i.imgur.com/nC7I3kn.png) --- ## 後記 > 其實以 "Physically Based Rendering" 來說, > 我們需要做的不是導入什麼軟體, > 或是用幾張貼圖來控制材質, > 而是如果我們要把 CG 做的寫實, > 那麼我們就應該用有根據的方式來製作材質, > 而不是依賴直覺或是經驗來調整參數。 > > 如果你今天要做塑膠材質, > 但是卻為了效果把反射加上顏色或全白, > 或是為了要反射強一點把 IOR 調很高, > 這些都會產生非真實的材質, > 即使看起來好看。 > > 如果你要做的是一個金屬材質, > 那 Reflection 和 Diffuse 的顏色應該要做相對應的處理, > 而不是單純只有把 ior 調高, > 也不要懷疑 Reflection Pass 可能會帶有顏色。 > 也許錯誤的是使用者,而不是算圖引擎。 === ### 參考文獻 * [Physically Based Rendering for Artists by -Andrew Maximov](http://artisaverb.info/PBR.html) * [Feeding a physically based shading model](https://seblagarde.wordpress.com/2011/08/17/feeding-a-physical-based-lighting-mode/) * [Defining PBR (Physically-Based Rendering) Graphics with Crytek Developers](http://www.gamersnexus.net/gg/1866-what-is-pbr-cryengine-star-citizen) * [IorInfo](http://refractiveindex.info) * [Albedo vs Diffuse](http://computergraphics.stackexchange.com/questions/350/albedo-vs-diffuse) * [diffuse, baseColor, albedo?? ](https://forum.allegorithmic.com/index.php?topic=4177.0) * [Physically Based Rendering from Toolbag](http://www.marmoset.co/toolbag/learn/pbr-practice) * [Monsters University: rendering physically based monsters](https://www.fxguide.com/featured/monsters-university-rendering-physically-based-monsters/) * [PHYSICALLY BASED RENDERING in 3Dcoat](http://3dcoat.com/pbr/) * [Why doesn't dielectric materials have coloured reflections like conductors?](http://physics.stackexchange.com/questions/213478/why-doesnt-dielectric-materials-have-coloured-reflections-like-conductors) * [Brief Considerations About Materials](http://www.manufato.com?p=902) ###### tags: `Article` `PBR` `Public`

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully