Rendering Improvements [WIP]

I have recently picked up work on improving the renderer, currently none of these changes are public but in the future they will likely be merged with the master branch of Uhro. All feedback is welcome as i want this to be the best it can.

Current features include:
[ul] [li]Physically based inverse square light falloff
[/li][li]Pre-filtered IBL(currently handled externally)[/li][/ul]

Upcoming features:
[ul][li]Screen space reflections[/li]
[li]Screen space soft shadows[/li]
[li]Area lighting[/li]
[li]Ambient occusion[/li]
[li]New water shader[/li]
[li]And more…[/li][/ul]

Screenshots
[color=red]To correctly view images you will need to open then in a separate window[/color]

Inverse square light falloff
This uses the technique shown in Epic’s PBR paper for unreal to get a realistic falloff of light.

Pre-filtered IBL
This may be difficult to see the difference but take my word for it performance is massively increased. likely not viable for mobile due to file size limits.

Looks really good man! One request I’d really like to see happen are improvements to the water shader (or perhaps a new water shader for oceans). The current shader is really cool, although I had a hard time trying to convert this example into Urho: shadertoy.com/view/Ms2SD1 (for oceans).

Now, this could be because I am still new to Urho so I don’t quite understand how everything is hooked up, but that’s my request. :smiley: Again, great job so far!

  • Sorry if this was not a valid request/feedback.

[quote=“Victor”]Looks really good man! One request I’d really like to see happen are improvements to the water shader (or perhaps a new water shader for oceans). The current shader is really cool, although I had a hard time trying to convert this example into Urho: shadertoy.com/view/Ms2SD1 (for oceans).

Now, this could be because I am still new to Urho so I don’t quite understand how everything is hooked up, but that’s my request. :smiley: Again, great job so far!

  • Sorry if this was not a valid request/feedback.[/quote]

Ill see what i can do :slight_smile:

[quote=“dragonCASTjosh”]
Ill see what i can do :slight_smile:[/quote]

You rock dude!

Looks good. Are you doing energy conservation? As the specs and diffuse look a bit blown out.
For example these are from Unity’s PBR:
Fully metalic: http://i.imgur.com/uVYZhkc.png
Fully diffuse: http://i.imgur.com/BsqDs9E.png
And this is going from one to the other: http://i.imgur.com/S12idNa.gif

[quote=“sabotage3d”]Looks good. Are you doing energy conservation? As the specs and diffuse look a bit blown out.
For example these are from Unity’s PBR:
Fully metalic: http://i.imgur.com/uVYZhkc.png
Fully diffuse: http://i.imgur.com/BsqDs9E.png
And this is going from one to the other: http://i.imgur.com/S12idNa.gif[/quote]

Energy conservation is something im looking into but i want to change some stuff with the BRDF first

This is looking pretty good, good work!

By the way the other day i tested the Urho3D las master version and the new PBR + Blurred shadows have big FPS drops and low FPS compared to other game engines. Drop to 80FPS and I’m in 780GTX in UE4 I can run a scene like that probably at constant 140FPS *but I need to check that better. And the shadows got some problems with the corners got an transparent aura

[quote=“Hevedy”]This is looking pretty good, good work!

By the way the other day i tested the Urho3D las master version and the new PBR + Blurred shadows have big FPS drops and low FPS compared to other game engines. Drop to 80FPS and I’m in 780GTX in UE4 I can run a scene like that probably at constant 140FPS *but I need to check that better. And the shadows got some problems with the corners got an transparent aura[/quote]

The current problem with PBR within Urho is all the calculations are handled at runtime, engines like unreal approximate this into a texture that they load into a shader, the second feature currently listed as complete is doing this calculation prior to even shipping the engine so that performance is as high as possible for everyone.

as for shadows im looking to a screen space solution similar to unreal contact shadows thats planned for 4.13. it will allow high quality shadows on even the smallest object in the scene

Good to see you working on these things, thanks !

still having the issues you pointed out to me a while ago where dds files from cmftStudio are not being imported by Urho. Im having to result to CubeMapGen but results are very inconstant.

I think after alot of tweeking i got the IBL system just right in terms of quality. The only downside is the amount of work needed in filtering and converting the textures extrenally

Looking good.

I’m testing the scene with a tree model to test the shadows and the quality and I’m into problems with the shader of the tree (first problem there is missing diff+normal+mask in PBR) second problem the bark of the tree looks like if the don’t are affected at all by PBR. And then I got a secondary problem with the leaves cause looks black in some parts, I will manage to send you the model tomorrow.

*As you can see the bark of the tree have a orange color at sides but not sure why is like if was metal or something.

[quote=“Hevedy”]Looking good.

I’m testing the scene with a tree model to test the shadows and the quality and I’m into problems with the shader of the tree (first problem there is missing diff+normal+mask in PBR) second problem the bark of the tree looks like if the don’t are affected at all by PBR. And then I got a secondary problem with the leaves cause looks black in some parts, I will manage to send you the model tomorrow.

*As you can see the bark of the tree have a orange color at sides but not sure why is like if was metal or something.

For now I recommend waiting till i commit the new changes. I think you will like the results :slight_smile:

I have created a performance test using the D3D11 build of the new PBR solution, can people please test and provide me the average and max tick rate of the renderer. this can be viewed by pressing F2.
Download : https://drive.google.com/file/d/0B7EwsKWU8ATkclZnM0NhUEIyU1E/view

Launched, ran around a few seconds, and here is the RunFrame stat liine

RunFrame: 198 - 5.038 - 5.786 - 5.038 - 997.589

[quote=“NiteLordz”]Launched, ran around a few seconds, and here is the RunFrame stat liine

RunFrame: 198 - 5.038 - 5.786 - 5.038 - 997.589[/quote]

Can you tell me the render frame and your hardware, because the RunFrame can be affected by external things, also hardware would help me understand how well its performing

Here is my performance report (I have a NVidia GTX 760):

Very nice work ! Is it some screen space reflections on the floor in the front of the door ? :slight_smile:

Nope not done SSR yet that is just cubemaps and lighting :slight_smile: also those results looks extremely nice 1MS on the renderer at the max

NVidia Quadro K2200

Seems to be hitting the 200 fps limiter, you can retry with -nolimit