fewes / bnao Goto Github PK
View Code? Open in Web Editor NEWA tiny, GPU-based Bent Normal and Ambient Occlusion baker for Unity.
License: MIT License
A tiny, GPU-based Bent Normal and Ambient Occlusion baker for Unity.
License: MIT License
I have a machine with 64 GB RAM, and it seems that something during the sample baking is eating up so much memory that basically the whole process grinds to a near-halt. I can see in TaskManager that memory is all eaten up by Unity and MemoryCompression/pagefile processes dominate the processing time.
First few seconds progressing at a hundred samples per second, after that it's like 10-20 seconds per sample (basically down to good ol' offline baking speeds).
To reproduce, take any chunked photogrammetry mesh. In my case it's 75 chunks with 5 LOD levels each (see pull request to allow for that) and a total of 150k vertices.
Subsets of the mesh work fine (like, only have 20 chunks active) and at high-speed-GPU-rendering rates.
While there's no error, baking results look broken when a Scriptable Render Pipeline is active while baking. My guess is that the depth format is different, but haven't really looked into it - workaround is to disable any SRP, switch material to "Standard" and bake in that mode, then switch back.
Would be cool as a workflow to be able to bake while URP / HDRP are active.
Best way to do this would probably be to add a post processing step to the bake function where the mesh is copied and the bake result texture is read and stored per-vertex, then create a new asset for the resulting mesh in the output folder. Could get complicated for skinned meshes?
Hello!
This looks super nifty, and I am interested in seeing if it works for my project.
Just a nitpick about the readme, I see in the description this is GPU accelerated. I have found recently this usually means Nvidia + WIndows only. Could you please clairfy the system/software requirements to run this?
Unity versions, if specific hardware is needed, if Windows is needed.
Thanks!
I was taking a look at the Shader Implementation Example.txt file and noticed it requires getting the ambient color and manually sampling the reflection. Is there a way to use this with a surface shader in the standard render pipeline or does that require a fragment shader that emulates the surface shader? I know HDRP supports bent normal maps out of the box, but given that it's still in preview, it would be great to be able to use this in existing standard render pipeline projects.
Unknown why. Might be an issue with using temporary RenderTextures. Restarting usually fixes it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.