Git Product home page Git Product logo

bnao's Introduction

BNAO

alt text alt text

Features

  • Supports baking ambient occlusion or bent normal maps from low-poly geometry, right in the editor.
  • Supports baking with alpha-tested materials.
  • Bakes textures for selected objects and automatically groups meshes into same output textures based on material usage (with option for overriding grouping).
  • Can bake tangent, object and world-space bent normal maps.
  • Automatically uses normal maps present in original materials for a higher quality result.
  • Can bake objects with or without occlusion from other scene objects.
  • Can convert normal maps from tangent to object space and vice-versa.

Requirements

BNAO runs on regular (as in, not compute) shaders and thus does not demand much from your GPU. However, it does require support for floating point and shadow map format render textures. To check if this is supported on your platform, use these functions:
SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGBFloat);
SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.Shadowmap);

What are bent normals?

alt text
Bent normal maps store the direction of least occlusion (in other words, the direction in which the most ambient light is coming from) in a texture.
They can be used to occlude cubemap reflections based on the view direction in a much more realistic way than just multiplying with an ambient occlusion term. They can also be used to get an ambient color value which more closesly resembles a ray traced result.
For details on how to implement these effects in your own shader, see the file "Shader Implementation Example.txt".

Can I specify a max distance for the ambient occlusion?

No. The baker uses depth textures (similar to shadow mapping) to determine ray intersections, which makes it impossible to bias the result based on distance.

The normals convertor outputs weird results!

Make sure your texture settings for the input texture are correct. For TS normals just set "Texture Type" to "Normal Map". For OS normals, leave it at "Default" but uncheck "sRGB (Color Texture)".

bnao's People

Contributors

fewes avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.