love-DPBR - Deferred Physically Based Rendering library

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
Imagic
Prole
Posts: 45
Joined: Mon Sep 30, 2019 8:20 am
Contact:

love-DPBR - Deferred Physically Based Rendering library

Post 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.
Last edited by Imagic on Fri Jul 17, 2020 11:03 pm, edited 1 time in total.
User avatar
Varkas
Citizen
Posts: 83
Joined: Mon Mar 09, 2020 2:26 pm

Re: love-DPBR - Deferred Physically Based Rendering library

Post 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.
In soviet russia, code debugs you.
User avatar
Imagic
Prole
Posts: 45
Joined: Mon Sep 30, 2019 8:20 am
Contact:

Re: love-DPBR - Deferred Physically Based Rendering library

Post 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.).
wlf2789
Prole
Posts: 7
Joined: Wed Sep 16, 2015 12:07 am
Contact:

Re: love-DPBR - Deferred Physically Based Rendering library

Post 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.
User avatar
Imagic
Prole
Posts: 45
Joined: Mon Sep 30, 2019 8:20 am
Contact:

Re: love-DPBR - Deferred Physically Based Rendering library

Post 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.
User avatar
Imagic
Prole
Posts: 45
Joined: Mon Sep 30, 2019 8:20 am
Contact:

Re: love-DPBR - Deferred Physically Based Rendering library

Post 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
User avatar
SiENcE
Party member
Posts: 805
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: love-DPBR - Deferred Physically Based Rendering library

Post by SiENcE »

Looks totally stunning!
User avatar
Imagic
Prole
Posts: 45
Joined: Mon Sep 30, 2019 8:20 am
Contact:

Re: love-DPBR - Deferred Physically Based Rendering library

Post 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.

User avatar
Boiled Trash
Prole
Posts: 1
Joined: Thu Jul 30, 2020 1:45 pm

Re: love-DPBR - Deferred Physically Based Rendering library

Post by Boiled Trash »

Holy frick, this basically man created Autodesk Maya for LOVE and I am still learning Lua :o
Good job *applause*
<3 Curly Brace
User avatar
Jon
Prole
Posts: 9
Joined: Sun Aug 09, 2020 6:24 am

Re: love-DPBR - Deferred Physically Based Rendering library

Post by Jon »

Great project, thanks for sharing。
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests