Jump to content
  • Advertisement

Epaenetus

Member
  • Content Count

    26
  • Joined

  • Last visited

Community Reputation

276 Neutral

About Epaenetus

  • Rank
    Member
  1. Thanks!  Unfortunately, this was implemented into a custom-made game engine for my school project and so I don't really have any example apps or implementations.   Although, my implementation is far from perfect and I'm still getting grasp of SH;  I'd be more than happy to help you if you have any specific questions.
  2. First off, sorry for the late reply. Things have been pretty hectic this last week.    I decided to remove the ambient term as suggested and it has helped out a lot.   Here are some more pictures:   [No Indirect Light]   [Indirect Light 1 Bounce]   [Indirect Light 2 Bounce]   [Indirect Light 2 Bounce With Probes]   As you can see, these pictures look quite a bit different from my earlier ones. Originally, I was just adding the calculated irradiance, but now I am doing this: color += irradiance * diffuseColor * (1.0f / PI); However, by doing this there really doesn't seem like there is any other differences 1 bounce and 2 bounce.  Because, of this I think I'm still messing up somewhere.     Here are a few more pictures:   [No Indirect Light]   [Indirect Light 1 Bounce]   I am pretty happy with the progress so far, it really is thanks to all the help that I've received on this forum.    
  3. Maybe I'm misunderstanding and using the wrong term, but I was referring to the shadowing in the picture.     Darn, I was kind of hoping I could just do it with out a raytracer. I'm going to be taking a ray tracing class this year, so hopefully I can come back to this and replace the ambient term.       I've also noticed these weird arfiacts on my light probes. Is this "ringing"? Or am I just really messing up the projection step? 
  4. So it took awhile because of the holiday, but I finally got around to implementing everything. Now I am just trying to make sure everything is correct.   Here is a picture of what I have so far:   Robin Green's paper was super helpful. A lot of it still went over my head, but I've been able put together a few things.   I have a 3D grid of light probes like MJP suggested. I'm rendering a cubemap for every light probe and processing the cube map to construct 9 SH coefficients from it for each color channel.  When rendering the cubemap, I apply some ambient lighting to every object in order to account for objects in shadow. (I wasn't to sure about this one)   I'd like to try attempting to get the nice occlusion that Ready At Dawn has in their Siggraph presentation pg. 18 (http://blog.selfshadow.com/publications/s2015-shading-course/rad/s2015_pbs_rad_slides.pdf). How do I get something like this?   I'm also wondering if anything looks really wrong with my current implementation. 
  5. I'm attempting to go this route in terms of using the SH coefficients, but I am still unclear on some details. Would this approach mean that I would need to store all 27 SH coefficients (as I need one for each channel) into 3D textures? If so, then I can probably store them all into 7 to 9 3D textures. Am I on the right track?
  6. Thanks for the references!         Thanks for the suggestion. I actually may try going this route to start off with. How do you handle blending between two 3D grids?       These will help me out a ton thanks!       Thanks for the alternate approach. I'll probably look more into this after I get a basic version of Baked GI using Uniform Grids working.
  7. In the next week or so, I'm going to start implementing Baked GI for my custom engine. I'm not too familiar with Spherical Harmonics(SH), but I'm planning on doing some more research to understand the math behind applying SH to GI.   For Baked GI my plan is: Offline, for each light probe in the scene Render a Cube Map of the scene at the probes location. Calculate the Spherical Harmonics at that given point using the method explained here: https://cseweb.ucsd.edu/~ravir/papers/envmap/envmap.pdf Move the SH coefficients to the CPU and save them to a file. At run-time, I linearly interpolate the SH coefficients for an object on the CPU. Finally, I feed the SH coefficients to the GPU for each object. (This is done when I am creating the GBuffer.)  Questions: Is this a viable method to Bake GI and use it at run-time? I've looked through some old posts on this forum and this is what I could piece meal together; but I maybe completely missing the ball.  How do I interpolate between the SH coefficients (this is kind of a multi-part question): In Unity, it appears that they find the smallest fitting simplex of light probes that contains the center of the object.         How do I find that smallest fitting simplex?  Once I find probes to interpolate between, can I just use bilinear/trilinear interpolation on each of the coefficients?  Is there a way to defer applying the SH coefficients?   I'm currently only looking at Baking GI as most of the Dynamic GI that I've researched is out of my breadth at the moment.   Thanks for reading all that!
  8. Epaenetus

    Bloom Flickering

      What I meant was: do a 1/1, 1/2, 1/4 and so on (depending on how many layers you want) and sample them all in a final pass, adding them together - that's what I've always done and works just fine for me.. Did not mean "do only a 1/1 pass", but "also do a 1/1 pass"..   I misunderstood you, my bad.   I tried this out and I got some pretty blocky results. (I went all the way down to 1/16)   I applied a blur to the final composite bloom and it helped but is still slightly blocky.     First off, thank you for taking the time to write that explanation, the pictures were very helpful.  I am using 1/float2(destWidth, destHeight) so I don't think I have the point filtering problem.       This is a pretty neat trick, thanks!       My bright pass shader was originally something like this: float4 main(in PSIn input) : SV_TARGET { float4 color = max(g_colorTexture.Sample(g_point, input.m_texCoords) - threshold, 0.0f); return color; } I've now changed it to multiplying by 0.1f like you described and I like the results.   I have however noticed in cases of sharp contrast there is bloom bleeding that occurs (it's kinda hard to see here, but it's pretty noticeable in engine):           I did this to test my down sample shader, I got the correct result 50% gray. Thanks for suggesting this test, now I know there isn't anything really messed up with my downsample shader.     After implementing many of the suggestions, the flickering has reduced.  Here is a video that better describes this (Pay attention to the glowing parts around the support beam) :   I think it may just be a temporal aliasing problem, so I'll try that next unless there are any other suggestions.
  9. Epaenetus

    Bloom Flickering

      The issue is that I want to have a large bloom radius and my compute shader gaussian blur can only do a max tap of 33. However, I may be able to get similar results by just concatenating my blur filters.  Even so I'd still like to find out what I'm doing wrong as I think its pretty standard to do a downsample for bloom.   Thanks! I'll give that a try and see what the results are.       Should I do the bright pass at full resolution?       For down sampling I am using this code: static const float2 c_downSample4UV[4] = { float2( 0.5f, 0.5f), float2(-0.5f, 0.5f), float2( 0.5f,-0.5f), float2(-0.5f,-0.5f), }; void FillDownSample4UVs(in float2 texCoords, in float2 rcpFrameSize, out float2 outSampleUVs[4]) { [unroll] for (int i = 0; i < 4; ++i) { outSampleUVs[i] = texCoords + rcpFrameSize * c_downSample4UV[i]; } } float4 main(in PSIn input) : SV_TARGET { float4 color = 0; float2 uv[4]; FillDownSample4UVs(input.m_texCoords, g_rcpFrameSize, uv); [unroll] for (int i = 0; i < 4; ++i) { color += g_colorTexture.Sample(g_linear, uv[i]); } return color * 0.25f; } I think I am doing something similar to this as I am blending the result of the DownSampled bright pass at each resolution and the resultant blur from the previous lower resolution. However, I am not adding all the steps together, I am simply taking the final blended result.  Wouldn't adding all the filters add even more bloom to the final image? (This may not be a problem as I can probably tweak it by modifying the bloom multiplier)   I will try out the method that you suggested and get back to you on the results.       Thanks everyone for all the help!  I'll post back when I implement some of the suggestions that you gave.
  10. Epaenetus

    Bloom Flickering

    I've been having some issues with how I am doing bloom: DownSample to 1/2 resolution Perform bright pass at 1/2 resolution DownSample BrightPass to 1/4 resolution DownSample BrightPass  to 1/8 resolution DownSample BrightPass  to 1/16 resolution Apply Separable Gaussian Blur tap= 11 sigma=.25 UpSample Blurred Image to 1/8 resolution Blend BrightPass at 1/8 and Blurred Image Apply Separable  Gaussian Blur tap= 11 sigma=.25 UpSample Blurred Image to 1/4 resolution Blend BrightPass at 1/4 and Blurred Image Apply Separable Gaussian Blur tap= 11 sigma=.25 UpSample Blurred Image to 1/2 resolution Blend BrightPass at 1/2 and Blurred Image Apply Separable Gaussian Blur tap= 11 sigma=.25 Add final blurred image to the result from tonemapping. For some reason, using this method makes it so that I have aliasing:   Here is what I think the problem is. The issue really occurs when I am moving around as the rasterizer chooses a different set of pixels to approximate its triangles.  This results in certain pixels being filled in one frame and not in the other.  I believe this what causes the flickering in the bloom.   I was thinking of applying some anti-aliasing methods to the bright pass filter, but I'm not even sure if I am on the right track.   Has anyone else encountered this issue? 
  11. Epaenetus

    Banding Problem

      In what sense ?  I'm only doing a very simple gamma correction in my shaders by using 2.2 for my constant gamma value: float4 gammaToLinear(float4 color) { return float4(pow(color.rgb), (float3)(c_gammaValue)), color.a); } float4 linearToGamma(float4 color) { return float4(pow(color.rgb, (float3)(1.0f / c_gammaValue)), color.a); }   I actually hadn't seen this before and it was very helpful. Thank you for posting this!   After implementing a random dithering from the post that I referenced in my original post, I was able to almost completely remove the banding.     As you can see, the dithering introduces a graininess to the image.  Any idea of how to remove this graininess?
  12. Epaenetus

    Banding Problem

    I've been trying fix a banding problem that I've been having for quite a while, but I'm not really making much progress.  I found this post a while back : http://www.gamedev.net/topic/640733-direct3d-11-deferred-shading-banding/   One suggestion they gave was that much of the banding would be removed with textures. I've placed textures on the floors and it does help, but the banding is still noticeable. I also have done gamma correction as well. Are their any other techniques that may be able to help remove the banding?   Edit: I'm currently experimenting with adding some random values to my image as someone suggested in the linked post.  This does help a bit, but it makes the resulting picture very grainy.
  13. Epaenetus

    Lighting in Warframe

    Yeah, it's pretty difficult for me to tell as well. I've downloaded the game to get a closer look.     Thanks for the analysis.  I'll take a look at the Remember Me presentations for the reflection shadows.  BPCEM looks very interesting as well.  Next week I'm going to reworking my IBL so I'll definitely take a look at that.
  14. Thanks for the info!   Did you guys use any SSAO?
  15. I've been trying to figure out how the lighting is done in this particular scene in Warframe.     At least for this area at the start of the clip, there doesn't appear to be any point or spot lights that I can see. Maybe there is a point light, if there is how do the cover up to lobe of specular reflection?   Also, it appears like there is a constant shadows under the player and enemies, how is this done? Is there simply a directional light that only has casters that are players, enemies, dynamic objects?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!