Page 1 of 1

love-DPBR - Deferred Physically Based Rendering library

Posted: Sun Mar 29, 2020 8:13 pm
by Imagic
Hi,

love-DPBR is a Deferred Physically Based Rendering library.

The idea of using "3D" techniques for "2D" (ultimately the same on the screen) is not new, but I wanted to push this further and I can already see many possibilities. It's at the frontier between 2D and 3D, which explains the deferred part.

Project and documentation: https://github.com/ImagicTheCat/love-DPBR

Examples videos:



The library can be used for 2D or integrated into a 3D rendering pipeline. There is a lot of room for improvements, so any feedback is welcome; I'm interested to see what cool stuff people can do with it.

Re: love-DPBR - Deferred Physically Based Rendering library

Posted: Wed Apr 01, 2020 12:03 am
by Varkas
Looks totally voodoo and magic to me o.O

Edit: Please take this as a compliment. I'm very impressed and have no idea how this can be done.

Re: love-DPBR - Deferred Physically Based Rendering library

Posted: Wed Apr 01, 2020 2:12 am
by Imagic
It's amazing right ? It's a peculiar workflow for 2D, it has some drawbacks that I'm trying to solve (like anti-aliasing/filtering). I love pre-rendered graphics and 2D is perfect for that; this is like another level of baking. I have found similar projects like this one.

I can explain more how it works if people are interested (I'm also trying to figure how a specific kind of game could be done with the library; what is needed, what are the limitations, etc.).

Re: love-DPBR - Deferred Physically Based Rendering library

Posted: Wed Apr 01, 2020 7:40 am
by wlf2789
The texturing workflow you've made for this library is similar to Unreal Engine's and I can see you're using Roughness and Metallic in one texture, which is good.
It's just an idea, but maybe you could implement additional Ambient Occlusion texture along the Roughness and Metallic, so people can get more shadow details?
If it's not possible, then can you please explain why?

I'm also super interested in how you were able to implement normal maps.

I'm working on a 2D platformer game with ragdolls and skeletal animations and I'd like to use your library for rendering.
Not much have been done towards the game yet since I'm currently developing custom library for skeletal animations, so I'd be grateful if you tell me about those limitations you've mentioned.

Re: love-DPBR - Deferred Physically Based Rendering library

Posted: Wed Apr 01, 2020 1:32 pm
by Imagic
I don't know about an AO map, that would conflict with a potential SSAO; but it's possible. For now each material requires 4 textures, I don't want this number to grow (or the complexity), but there are slots to take for this kind of effects.

Normal maps are transformed in the material pass to follow the texture transformation (using derivatives), if that's what you were asking. So rotating/transforming elements will work fine with the normals.

The only "limitation" I know right now is anti-aliasing/filtering, since each pixel must have a correct depth, pre-rendered anti-aliasing or bilinear filtering can be an issue depending on the kind of rendering. I'm thinking about using SSAA (with pre-rendered higher resolution textures) + FXAA. The workflow is like a per-pixel 3D rendering (if depth is used), so you can't expect alpha blending to work intuitively. The depth issue can be solved with sorting, but there is the choice between anti-aliased/aliased normal maps too.

The limitations (about the idea) are mostly about figuring out what can be done at the frontier between 2D and 3D.

Re: love-DPBR - Deferred Physically Based Rendering library

Posted: Thu Apr 02, 2020 5:32 pm
by Imagic
After research, an AO map might be a good addition:
- SSAO is costly and can be ugly (not so easy to get right)
- the AO can be added as the blue channel of the MR map
- with improved ambient/indirect lighting it becomes an essential effect
- the lack of dynamic AO is probably less of an issue with a 2D workflow

Re: love-DPBR - Deferred Physically Based Rendering library

Posted: Fri Apr 03, 2020 7:53 am
by SiENcE
Looks totally stunning!

Re: love-DPBR - Deferred Physically Based Rendering library

Posted: Fri Jul 17, 2020 11:19 pm
by Imagic
Update:
- Lot of small improvements: bug fixes, clarification of some ideas, better API.
- Background/blend passes.
- Ambient / indirect lighting (constant light and IBL).
- Ambient occlusion map.
- More/improved examples.


Re: love-DPBR - Deferred Physically Based Rendering library

Posted: Fri Jul 31, 2020 11:52 am
by Boiled Trash
Holy frick, this basically man created Autodesk Maya for LOVE and I am still learning Lua :o
Good job *applause*

Re: love-DPBR - Deferred Physically Based Rendering library

Posted: Tue Aug 18, 2020 6:15 am
by Jon
Great project, thanks for sharing。