Lighting

Moderator: andrewmac

  • 1
  • 2
19 posts Page 1 of 2
andrewmac
Posts: 295
Joined: Tue Feb 03, 2015 9:45 pm
 
by andrewmac » Sun May 10, 2015 8:48 pm
I've been working on lighting this weekend. I've got normal maps (on the floor) and metalness/glosiness in however in this progress video the whole scene has hardcoded metalness/glossiness so that's why it all looks shiny:



I still have to add metalness and glossiness to the gbuffer before those maps can be loaded in and/or fixed values per material can be supplied. The equations I have in place can easily take environment and irradiance maps so I might try making environment map volumes that capture those either in real time and/or bake them.
buckmaster
Steering Committee
Steering Committee
Posts: 321
Joined: Thu Feb 05, 2015 1:02 am
by buckmaster » Mon May 11, 2015 6:20 am
Looks nice!
andrewmac
Posts: 295
Joined: Tue Feb 03, 2015 9:45 pm
 
by andrewmac » Sat May 16, 2015 5:43 pm
Early version of environment mapping, everything in the scene is set to 0.8 metallic, 0.8 glossiness:



Still trying to get all the equations right (spoiler: they're wrong at the moment, but getting closer) and then I'll add some volumes for generating static cubemaps for areas. Should allow pretty cheap and good looking lighting. I don't plan on going into real-time GI until later when the engine is more stable. Much more pressing matters. However, I will try to do SSR sooner rather than later so we can have some real-time reflections to go with the baked ones.
andrewmac
Posts: 295
Joined: Tue Feb 03, 2015 9:45 pm
 
by andrewmac » Sat May 16, 2015 9:03 pm
Still not quite perfect but we're making progress for sure:

andrewmac
Posts: 295
Joined: Tue Feb 03, 2015 9:45 pm
 
by andrewmac » Sun Jun 07, 2015 11:17 pm
I finally replaced the crappy simple shadowmapping with something more robust. It's Cascaded Variance ShadowMaps. There's a couple of options that can be tweaked related to them. I'll refine them later and perhaps expand them to expontential variance shadow maps.

Cascade debug:
Image

Early version with no blur:
Image

Again, no blur:
Image

Blurred. Getting better, still at 512 per cascade:
Image

Blurred at 1024 per cascade, good enough for now:
Image
andrewmac
Posts: 295
Joined: Tue Feb 03, 2015 9:45 pm
 
by andrewmac » Wed Jun 10, 2015 12:46 am
Early version of screenspace reflections:

Image
andrewmac
Posts: 295
Joined: Tue Feb 03, 2015 9:45 pm
 
by andrewmac » Wed Jun 10, 2015 3:51 am
Got the SSR shader in a more stable state. In the previous screenshot as you flew around the reflections went all wacky, but I got it to the point where they're actually video worthy:



Keep in mind it's lacking error correction, blurring, and actually taking metalness into account. Right now everything in the scene reflects.
andrewmac
Posts: 295
Joined: Tue Feb 03, 2015 9:45 pm
 
by andrewmac » Thu Jun 11, 2015 2:17 am
I put in some error handling on the SSR shader. It works by calculating how much the angle of reflection is coming towards the camera as well as how close we're getting to the edge of the screen while travelling the ray. It fades smoothly based on those factors. I also increased the step size in the ray which means you can see more in the reflections now. The downside is increased banding in the reflections. I have a few ideas on how to fix that, we'll see how they go.

andrewmac
Posts: 295
Joined: Tue Feb 03, 2015 9:45 pm
 
by andrewmac » Mon Aug 03, 2015 2:24 am
Finally implemented a proper PBR lighting setup. Lambert diffuse, GGX specular, IBL for ambient.

Image
LukasPJ
Site Admin
Posts: 348
Joined: Tue Feb 03, 2015 7:25 pm
 
by LukasPJ » Mon Aug 03, 2015 9:08 am
That's all fine and dandy, but what about puppy shader? :(
Image
  • 1
  • 2
19 posts Page 1 of 2

Who is online

Users browsing this forum: No registered users and 2 guests