Offline Light Propagation Volumes

Materials, textures, lighting, postfx
  • 1
  • 3
  • 4
  • 5
  • 6
  • 7
68 posts Page 5 of 7
andrewmac
Posts: 295
Joined: Tue Feb 03, 2015 9:45 pm
 
by andrewmac » Wed Feb 25, 2015 1:30 am
JeffR's voxelization is in and we've got it detecting proper UV coordinates from the verts and pulling the color from the textures. Also, emissive materials are now actually emissive! They're injected into the light grid and propagated like any other light source:

Image
jay1ne
Posts: 34
Joined: Thu Feb 19, 2015 2:24 am
by jay1ne » Wed Feb 25, 2015 1:47 am
sweet!!
buckmaster
Steering Committee
Steering Committee
Posts: 321
Joined: Thu Feb 05, 2015 1:02 am
by buckmaster » Wed Feb 25, 2015 10:01 pm
I think we need a little test house like this one ;) But seriously, that's looking fabulous. I had wanted to ask whether this would accommodate non-point lighting - I guess the answer is yes! Though is it possible to adapt the power of emissive materials to make them brighter?
andrewmac
Posts: 295
Joined: Tue Feb 03, 2015 9:45 pm
 
by andrewmac » Thu Feb 26, 2015 12:16 am
I've actually just recently added 4 new options for LPVs:

Light Intensity : multiplies the intensity of the lights injected into the grid
Emissive Intensity : same as light intensity only for emissive materials
Propagation Multiplier : multiplies the intensity of the light after each propagation step.
GI Multiplier : multiplies the intensity of the final result. This is useful if you like the spread but the overall result is too strong or too weak.

This allows a much greater degree of control over the final result. Also, while lighting rooms entirely with emissive I noticed a big missing piece. Ambient occlusion! We have SSAO, so I tossed it on. Unfortunately SSAO only applies to the sunlight, so I added support for it in the LPV shader:

Image

All these changes have been pushed. I'm pretty much out of new things to add at this point. The only thing left to do is tweak the algorithms to see if we can reduce light bleed and improve propagation. It's my first time doing anything with spherical harmonics so I'm sure it could be better. My goal was to make an Offline Light Propagation Volume and it's getting close to complete. There's lots more than can be done (dynamic lights, voxel cone tracing, etc) but it starts going outside the scope of an offline light propagation volume. I've got to get back to working on other things though so I'm going to try to wrap this up in the next few days.
buckmaster
Steering Committee
Steering Committee
Posts: 321
Joined: Thu Feb 05, 2015 1:02 am
by buckmaster » Thu Feb 26, 2015 11:12 pm
:D Does the light propagation itself not handle AO?
andrewmac
Posts: 295
Joined: Tue Feb 03, 2015 9:45 pm
 
by andrewmac » Fri Feb 27, 2015 2:36 pm
It's too low frequency to produce any kind of meaningful AO results :( All the LPV implementations I've seen supplement it with SSAO.
HeadClot
Posts: 58
Joined: Sat Feb 07, 2015 1:29 am
by HeadClot » Sun Mar 01, 2015 10:25 am
8bitprodigy wrote:Dude, that looks awesome, pretty soon we'll be close to Unreal Engine 4 level technology!


I hope that you mean Lighting wise because T3D looks awesome already but it will need some more work to get to Unreal Engine level of quality. :)

That said - I personally think after the graphics overhaul that we should focus on usability of T3D. But that is for another thread. :)
jay1ne
Posts: 34
Joined: Thu Feb 19, 2015 2:24 am
by jay1ne » Sun Mar 22, 2015 5:14 pm
@
User avatar
andrewmac

Unfortunately, I'm still unable to figure out what I'm doing wrong in getting this work in my build but I have faith it'll get figured out...Anyways I recall you saying that offline LPV would need an addition method to help things like shadows and what not. Then, I had a idea I recalled Lukas work with DSSDO a little over a year ago. Could this be added and solve some of the issues?
I was planning checking it out with my build once I get around this issues with why I can't get offline LPV working on any of my builds...Just something I figure I'd throw out there!
http://www.garagegames.com/community/forums/viewthread/136081/2#comments
jay1ne
Posts: 34
Joined: Thu Feb 19, 2015 2:24 am
by jay1ne » Mon Mar 23, 2015 2:41 pm
Finally figure out what I was doing wrong..The following is the instruction on install/merging offline LPV with your project or running it:

    If you are trying from the official branch, you'll need to download the zip
    before compiling, you must add the directory into my Tools/CMake/torque3d.cmake file at around line 255:
    addPath("${srcDir}/T3D/offlineLPV");
    If you're using ProjectManager, add this line to Tools/ProjectGenerator/T3D.inc at around line 60:
    addEngineSrcDir('T3D/offlineLPV');

Then compile and you should find it in the "level" tab..

If merging into your project, copy the following files into your project:
offlineLPV.h
offlineLPV.cpp

then you need the shaders from game/shaders/common:
offlineLPVPropagatedP.hlsl
offlineLPVPropagatedV.hlsl
offlineLPVReflectP.hlsl
offlineLPVReflectV.hlsl

Oh, and this script:
https://github.com/andr3wmac/Torque3D/b%20...%20lineLPV.cs

make sure you also do the steps above for Cmake and Project Manager also, or the icon will not show in your project...
I posted this for anyone that is interested, also because I ran into issues and figured it out and thought I'd share the steps to get it working...
Have fun!!!

Thanks to:
@
User avatar
andrewmac
and @
User avatar
Gibby
for the help!!
J0linar
Posts: 45
Joined: Thu Feb 05, 2015 8:50 pm
by J0linar » Fri Mar 27, 2015 10:02 am
hey jay1ne, the
https://github.com/andr3wmac/Torque3D/b ... lineLPV.cs
script ends up in a 404, would u mind uploading it? thx
  • 1
  • 3
  • 4
  • 5
  • 6
  • 7
68 posts Page 5 of 7

Who is online

Users browsing this forum: No registered users and 3 guests