Jump to content

Mattline1

Members
  • Posts

    30
  • Joined

  • Last visited

Posts posted by Mattline1

  1. 4 hours ago, JMK said:

    a series of subpass settings in the JSON file

    That sounds like a great solution. It would cover all seperable filters.

    4 hours ago, JMK said:

    re there any other weird cases where a linear progression drawing from one buffer to the next one isn't going to be sufficient?

    Temporal anti-aliasing? That would need the current frame and a re-projected frame based on previous frame and a velocity buffer.

  2. Cool, sounds like it will be easier to set up simple post processing effects. Will it be as flexible as the old system? My main concerns would be with ordering of post effects and how modifiable default effects and settings are.

    A few questions:

    • Could default post effects be disabled or modified, in case the defaults don't match the art style of a project.
    • Can the amount of blurring be changed?
    • Does the blur just occur on the color map? depth too?
    • Is there still a way to manually blur? Box blur looks very different to a guassian, and both have uses.
    • Are shader settings modifiable at runtime?
    • If bloom, tone mapping, and SSAO are baked into the camera what happens if another post process effect needs to occur in between them, i.e SSR needs to happen before tonemapping.

    I guess if there's no Lua code running in the rendering thread it will never be as flexible, but the LE4 system was very powerful as a result of it's ability to be heavily controlled via scripting.

    Being able to manually modify default shader source would answer a lot of these questions, is that still possible?

     

     

    • Like 1
  3. I have been looking at the EmitEventHook 

    void hookFunction(void* ptr) {
    	// do whatever 
    }
    
    System::AddHook(System::EmitEventHook, hookFunction);

    I can't figure out the correct type for hookFunction's parameter(s). Event* seems the most logical but doesn't appear to be correct, other hooks tend to have pointers to relevant objects.

    Anyone know the correct parameters?

     

  4. The environments are looking nice. The latest images remind me of small west country english villages.

     

    You could perhaps do with some sort of ambient occlusion. It should soften up the ambient light and help with contact shadows.

  5. In the second image I had modified the sky shader to push values above 1.0. The brighter sky isn't reflected in the probe however.

    The same happens for any surface where brightness becomes >1, it appears clipped in the probes (often as grey as iris adjustment brings the clipped value down from 1.0, like in the image).

     

    The Sponza scene is here (pretty big, because of the textures :/). I had to do a quick convert back from PBR so the specular is a little shiny on most materials.

     

    The sponza is a worst case scenario, there is very little direct light so the probes have to do the heavy lifting.

    I've set the postprocessing to do gamma correction rather than full tonemapping as it's a simpler algorithm and therefore easier to discount as the cause. The artefacts are still visible. the tone-mapping shader is included as well.

     

    One last note, increasing the ambient term and rendering environment probes with that higher ambient can alleviate the problem. Though this feels like a workaround, as it ends up in washed out dark areas and means the probes can't be used on their own for nice GI.

     

    Hope that all helps.

  6. As in the title, my suggestion is to save and render environment probes into an HDR format whilst the HDR option is checked. The reasoning is below:

     

    I have been trying to take advantage of the HDR feature by implementing filmic tonemapping, but have been having issues with artefacts. The issue seems to be that environment probes store values in a low dynamic range.

     

    Because of this, when light values become >1 they begin to clip. For very small values the precision is low and causes banding and distortion issues. (see image)

     

    LDRissues.png

    In the above, the left image is close to black before tone-mapping is applied, whilst the right image is nearly completely white. If an ambient term is used rather than image based lighting, then no artefacts are present. this suggests the issue is with the precision of the probes not the HDR diffuse image passed to the tone-mapping post process.

     

    To note, these issues only become apparent when probes + HDR + custom tone-mapping is used. which is likely an edge case for most Leadwerks users. That said we are unable to fully take advantage of HDR whilst elements of the lighting pipeline (probes) do not support it.

     

    Cheers.

    • Upvote 1
  7. It's probably light bleeding through the geometry as the directional light switches to a lower resolution shadow map, as it does with distance.

     

    If so, the way to fix would be to increase the size of the ceiling csg tile so it overlaps the walls slightly.

    • Upvote 1
  8. It's a subtle issue, but around the edges of objects lit by an environment probe is a thin line of pixels, the colour of the pixels is determined by the diffuse buffer. This doesn't occur when anti-aliasing is disabled.

     

    Example:

    example1.png

     

    In the following image I modified the probe shader to simply fill it's volume with a solid colour. object boundaries within the volume display correctly (#2). However, where object edges meet areas that fall outside the volume, the artefacts are visible(#1).

     

    example2.png

     

    By looking at the edges close up it seems that material buffers are anti-aliased but the probe shader result is not, notice the jagged edge highlighted by the green line.

     

    example3.png

     

    (Speculation here, but I guess there is some kind of masking happening to cull pixels that fall outside the probes volume in worldspace. If so my guess would be aliasing on that mask is causing the issue. Unfortunately I don't think I can fix this purely in the shader.)

     

    It's not a huge issue, but can result in a quite visible outline on reflective objects.

    • Upvote 1
  9. Sounds good, that'll solve the issue. But I guess making the materials additive will introduce brightening on overlapping probes.

     

    Is it not possible to render the probes prior to other lights rather than as a post process? they could then use max blend without other lights affecting the result, then switch back to additive for the dynamic lights. Or is there performance concerns attributed with that?

    • Upvote 1
  10. In the following post by josh, it is mentioned that light from ambient probes is blended using glBlendEquation(GL_MAX);

     

    http://www.leadwerks.com/werkspace/blog/1/entry-1681-ambient-lighting-research/

     

    Is it possible to modify this functionality? I've been trying to port my PBR work over to the new environment probes system and have found them to be very useful, but this issue causes some quite noticeable artifacts. as shown below.

     

    IncorrectLighting.png

     

    The reflection should still be visible even underneath the suns light. There is commented out code within the probe shader labelled additive blending, but it doesn't produce correct results. Nor can I see how an in shader solution could work, given that the shader is clamped with glBlendEquation(GL_MAX);

     

    Any solutions? if this can be sorted without c++ it'll remove the "gotchas" from the PBR work.

    • Upvote 1
  11. I love these kinds of threads, its always interesting to see the small projects people are working on.

    Here's my contribution, I've been carrying on working on PBR and thought it'd be nice to show it off with Crytek's Sponza.

     

    CrytekSponzaPBR.jpg

    • Upvote 2
×
×
  • Create New...