Global Illumination

Moderator: andrewmac

35 posts Page 3 of 4
Chelaru
Posts: 223
Joined: Wed Jul 01, 2015 10:33 am
by Chelaru » Thu Sep 03, 2015 10:25 am
andrewmac any new stuff to show? :D
andrewmac
Posts: 295
Joined: Tue Feb 03, 2015 9:45 pm
 
by andrewmac » Thu Sep 03, 2015 2:25 pm
Nothing visually, but I've been doing a lot of code cleanup. I've actually taken all the existing features I've been playing with and restructured them into what I call SceneFeatures. A SceneFeature can be added/removed to any scene and its setting are easily tweakable. The biggest difference between a SceneEntity and a SceneFeature is that a feature doesn't have a location in the scene and, at least for now, only one instance of a feature can be added to the scene. Example of SceneFeatures: HDR, SSAO, DLAA, FXAA, Directional Light, SkyLight, Realtime GI.

They're easy to add via script and will have a simple interface in the editor:
https://github.com/andr3wmac/Torque6/bl ... .cs#L3-L21

This is similar to the PostFX system in T3D except its not limited to only post processing effects. SceneFeatures will make up any scene-wide feature that doesn't require a location in the scene.
Chelaru
Posts: 223
Joined: Wed Jul 01, 2015 10:33 am
by Chelaru » Thu Sep 03, 2015 7:57 pm
That sound's really good. Can't wait to see what's next :D
andrewmac
Posts: 295
Joined: Tue Feb 03, 2015 9:45 pm
 
by andrewmac » Sat Sep 05, 2015 6:37 pm
I'm working on shadows today and I've decided to remove all the fancy techniques and go back to good old PCF. I got the idea from Unity 5. They use optimized PCF 5x5. What it does it utilize directX and openGLs built in PCF functions. Instead of sampling 25 spots you use those functions and sample 3x3 strategically positioned and get similar results. It's really fast (3x faster than some of the variance methods) and I think the results are pretty good:

Image
(There a little shadow acne on the left wall but I haven't added any kind of bias calculations yet.)

Image

They're smooth, not noisy, and not wobbly like the variance ones. Also this is with 1024x1024 shadowmap resolution. You can up it to 2048x2048 per cascade to get better results. They'll only get better when I implement SDSM later.
Timmy
Posts: 378
Joined: Thu Feb 05, 2015 3:20 am
by Timmy » Sun Sep 06, 2015 4:02 am
Interesting approach, how does it go with large outdoor scenes?
Chelaru
Posts: 223
Joined: Wed Jul 01, 2015 10:33 am
by Chelaru » Sun Sep 06, 2015 1:39 pm
Hmm, looks a bit odd. But if you get results like this : http://http.developer.nvidia.com/GPUGem ... ter17.html . Then you are on the right track.

From what i know this technique is good for indoor scene.
What would be the approach for outdoor scene ?
andrewmac
Posts: 295
Joined: Tue Feb 03, 2015 9:45 pm
 
by andrewmac » Sun Sep 06, 2015 4:00 pm
@ Chelaru what looks odd about it? I think it looks great for what it costs, but maybe that's because I've been trying so many techniques I got to compare them. Most of the techniques fall apart when you get up close to the shadows unless you have extreme cascade optimization like SDSM. The variance techniques have wobbly edges that look terrible up close. You spend a bunch of passes blurring the shadowmaps trying to get them closer to what PCF looks like.

I have no reason to suspect it won't work for large outdoor scenes. The biggest issue there is stretching a low resolution cascade over a large area in the distance, but this is true for any of the techniques. PCF doesn't fall apart at those points in my tests, but we'll just have to see. In the event that using a different technique on the final cascade is beneficial I can add that as an option. My biggest issue with the variance techniques was getting a smooth shadow edge up close so using it on the furthest cascade won't be a problem if it's beneficial.

You both should check out Matt Patteo's A Sampling of Shadow Techniques:
https://mynameismjp.wordpress.com/2013/ ... adow-maps/

It lets you test a variety of shadowmap techniques in a couple of good test scenes. I spent awhile trying them all out and optimized PCF 5x5 seems to have the best cost/benefit ratio in my opinion.
JeffR
DEVGRU
Posts: 957
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Sun Sep 06, 2015 5:32 pm
From what I've seen, most edge softening techniques are designed for lots of surface noise to help hide the grain of the edge blur. I know that was the hope for the softening method that Torque uses, which is based off Crysis 1's method.

But in cases where the textures are low-to-no noise(the cornell box being an example of the absolute worst case scenario) the grainy-ness or janky edges of the softening methods become extra-apparent. If you have lots of small detail on the surface due to detailed/busy textures, the brain tends to write the grain off as an effect of the surface, rather than a limitation of the technique.

Of course, if the shadow looks good in a low-to-no noise scene, it'll ALSO look good in a noisy scene too ;)

I agree though, the results with that method look pretty slick.
Chelaru
Posts: 223
Joined: Wed Jul 01, 2015 10:33 am
by Chelaru » Sun Sep 06, 2015 8:53 pm
@Chelaru what looks odd about it? I think it looks great for what it costs, but maybe that's because I've been trying so many techniques I got to compare them. Most of the techniques fall apart when you get up close to the shadows unless you have extreme cascade optimization like SDSM. The variance techniques have wobbly edges that look terrible up close. You spend a bunch of passes blurring the shadowmaps trying to get them closer to what PCF looks like.

I have no reason to suspect it won't work for large outdoor scenes. The biggest issue there is stretching a low resolution cascade over a large area in the distance, but this is true for any of the techniques. PCF doesn't fall apart at those points in my tests, but we'll just have to see. In the event that using a different technique on the final cascade is beneficial I can add that as an option. My biggest issue with the variance techniques was getting a smooth shadow edge up close so using it on the furthest cascade won't be a problem if it's beneficial.

You both should check out Matt Patteo's A Sampling of Shadow Techniques:
https://mynameismjp.wordpress.com/2013/ ... adow-maps/

It lets you test a variety of shadowmap techniques in a couple of good test scenes. I spent awhile trying them all out and optimized PCF 5x5 seems to have the best cost/benefit ratio in my opinion.
This is just my opinion. From looking at older pictures this one look a bit dark or grayis and a bit muddy .

Image

Image
LukasPJ
Site Admin
Posts: 450
Joined: Tue Feb 03, 2015 7:25 pm
 
by LukasPJ » Sun Sep 06, 2015 10:08 pm
@
User avatar
Chelaru
I'm pretty sure those 2 pics you have at the top there, are with GI and the bottom one is without.
35 posts Page 3 of 4

Who is online

Users browsing this forum: No registered users and 3 guests