Improving Graphics Rendering

Sure thing!

Before getting into the details of the specific items I raised in my previous posts, I just want to share a few quick comments:

  • Firstly, great job! My overall impression is that the graphical quality of Boundless has vastly improved with these lighting changes.
  • Specular highlights look more plausible and aesthetically pleasing.
  • Materials appear to have more depth, especially in areas that are not lit by the sun. The ‘directionality’ of light interacting with surfaces is more noticeable. The effect of normal mapping appears to be more consistently visible than before.
  • Did you tweak the filmic tone-mapper? It seems better to me - like it’s a bit more filmic and less linear.
  • Metallic surfaces look better. The titanium tools, for example, look great (where previously, they didn’t look particularly metallic).
  • The availability of per-pixel lighting at all distances is a massive improvement.

Ok, on to the specific points (in the same order I raised them in my previous posts):

Bloom

The bloom is definitely better now. Previously, only the very brightest surfaces (white or nearly white) would cause any blooming. Now there is nice, colourful bloom coming from most bright surfaces. It’s nice to see a variety of gleam blocks glowing properly now, as well as bioluminescent plants creating a bloom effect at night.

With that said, it’s still not as good as I think it could be. One of the changes that I don’t like is that the radius of the blur appears to have been reduced. It was small before but now it’s really tiny. If I had to guess, it looks to me like the current bloom effect in Boundless is made by taking a single copy of the main-rendered image at one-third of its original width and height and applying the tiniest of blur operations (a small box blur, perhaps) before adding it over the main-rendered image.

I believe some people have complained about “blurriness” since the lighting update. When people complain about bloom effects having the side-effect of “blurring” the final image, I think that it’s often the result of:

  • using too small a radius on the bloom effect, and
  • using only a single linear blur or Gaussian blur.

Bloom may seem like a simple effect but I think there’s more finessing required to build a good bloom effect than just one quick-and-dirty blur. To make the effect feel natural and unobtrusive, you’ll need to try and simulate the way light scatters inside a lens. The way that light diffuses outwards from a hot spot in the image needs to have a particular ‘falloff’.

That falloff is not the same as a single linear or Gaussian blur. I don’t know the correct mathematical terminology (exponential? quadratic?) but my understanding is that a good bloom effect will diffuse light outwards from bright spots in a non-linear ‘decelerating’ way. The initial falloff will be fast but it will decelerate and continue to spread light quite far from the bright spot.

falloff

I don’t think that a quality bloom effect can be achieved with the single Gaussian blur operation. For example, the documentation for the Unreal Engine talks about combining several blurs:

…we combine multiple Gaussian blurs with different radius. For better performance, we do the very wide blurs in much lower resolution. In UE3, we had 3 Gaussian blurs in the resolution 1/4, 1/8, and 1/16. We now have multiple blurs name Blur1 to 5 in the resolution 1/2 (Blur1) to 1/32 (Blur5).

We can simulate this idea in Photoshop:

I think that the option with 3 different blurs is the only one that looks like a plausible, pleasing glow.

(By the way - due to the fact that these example images are quite dark, please click on them to view them at full size and with the dimmed surroundings. Also, make sure there isn’t too much light shining near your workstation. If your pupils are constricted because of the white forum background or other lights in your surroundings, then you won’t be able to see these images properly.)

Ok, moving on… The option with 3 blurs was made by blurring the original resolution image using very large blur radii. But, for performance reasons, you’d want to do the blurs at a lower resolution. So, I’ve recreated something similar to my previous example but this time simulating the image scaling steps. (I set Photoshop’s resampler to Bilinear for authenticity).

These are the logical steps for compositing the above image:

  1. Start with image called “render” (480x480)
  2. Divide render dimensions by 3 (160x160) → Save as image1
  3. Gaussian blur image1 with radius 2 (effective radius 6) → Save as image1-blur
  4. Divide image1 dimensions by 4 (40x40) → Save as image2
  5. Gaussian blur image2 with radius 2 (effective radius 24) → Save as image2-blur
  6. Divide image2 dimensions by 2 (20x20) → Save as image3
  7. Gaussian blur image3 with radius 3 (effective radius 72) → Save as image3-blur
  8. Combine colours from image1-blur, image2-blur, image3-blur giving each a one-third contribution → Save as image-combined
  9. Add image-combined to render with whatever opacity you think is tasteful. (The example is 100%.)

I’m sure all of this would require some significant ‘adapting’ before it could conceivably be used. Hopefully, it can at least serve as inspiration. I’d be interested to know your thoughts on these ideas.


Bloom (cont.)

I’m not done with bloom yet. :stuck_out_tongue: I think I actually preferred the bloom in the initial release of the lighting changes. In release 225.2, you implemented a change to the bloom:

I’ve noticed something that might be a side-effect of this change. There appears to be a subtle discolouration on the fringes of the bloom effect in certain cases. I’m wondering if the threshold may have been introduced at the wrong place within the chain of operations that produces the bloom effect. It looks to me as if the threshold might be applied onto the bloom after it’s been blurred when it really should be applied to the image before it gets blurred.

I’ve made an example image in Photoshop to try and illustrate this “discolouration” that I’m talking about. I’ve done this by applying a Levels filter onto a blurry glow. The shadow input level has been raised to 31 on the blurry glow on the right:

Notice how the hue of the glow is not uniform on the right. It fades towards red on the edges. I have seen something similar to this in the latest version of Boundless in certain places.

I’ve also occasionally noticed a very subtle distortion within the bloom that is similar to a ‘shadow blistering effect’, which is another reason why I suspect the threshold was applied after the blur operation.

I would be interested to see Boundless again without the threshold for comparison purposes.


Unfortunately, I have run out of time today. My comments on the other items will have to wait for another day (tomorrow probably).

10 Likes

tone-mapper was tweaked yes, mainly making the shoulder much longer to allow compressing 8 levels of luminance to LDR instead of just 2, but also making its linear section more accurate.

bloom; yes it would be better to have multiple blur passes; as it stands we only have a single (As you guessed, at 1/3rd resolution) blur pass, but it “is” a gaussian blur, rather than a box blur. When looking at the bloom for this release, it was a case of trying to improve it with as little work as possible, mainly in terms of combining the bloom with the screen contents; we no longer add to the screen, but blend with the bloom target instead as adding the bloom to the screen contents just makes everything brighter (eg, twice as bright for a solid area of bloomed blocks) which then screws with the scene luminance for tone mapping far too much (and means turning bloom on/off vastly changes the luminance of the scene, rather than just being a visual candy addition). The thresholding does happen before the blur though.

2 Likes

That’s very interesting that you’re blending instead of adding now. Now that I think about it, I’m not sure that adding the bloom to the screen makes sense from an energy conservation perspective. The light that’s diffused within the bloom effect would have to come from somewhere so adding it to the screen would be like making new light energy. :thinking:

As a matter of interest, which Photoshop blend mode do you think is the most similar to the blending method you’re using for bloom now? Screen? Lighten? Lighter Color?

Ok cool, I guess that maybe I was just noticing a side-effect of the different blending method that I’m not used to. Please ignore that ‘issue’ because I don’t think it’s a big deal. I only raised it because I was worried that there might have been a mistake.


Ok, moving on to the remaining items that I didn’t have time for yesterday…

Night-time lighting

I’m very pleased to say that I think this issue is 100% fixed. There’s no longer any weird lighting coming from under the ground - it’s now coming from the direction of the moon. I also like that it’s overall a bit darker.

I decided to go a take some new screenshots to compare with the ones in my original post. Let’s have a look:

1. Before:

1. After:

2. Before:

2. After

3. Before

3. After

In every case, the new look is way better!


Water reflection compositing

This was never a really big deal in the first place. However, I decided to do some comparisons anyway.

I’m not sure but it seems like you guys have turned off the Fresnel effect. The water reflections now seem to have the same intensity regardless of the angle of incidence. I could have sworn that the reflections used to be less intense when looking straight down towards a water surface.

Furthermore, I noticed that the eye adaptation effect seems to misbehave sometimes during the daytime when a water surface occupies a large portion of the screen. It seems to make the exposure way to bright - as if it’s not taking the water surface into account. Could it be that the water reflections are added after the exposure is decided?

Have a look at these two screenshots, which I captured at the same location as the one in my original post:

In the above screenshot, everything seems pretty much fine. The water reflections are a nice blue because they’re reflecting the blue sky. In the next screenshot, I rotate my view downwards to look at the water:

The exposure suddenly goes way upwards. The reflection on the water is now just pure white. When I took this screenshot, I watched the eye adaption effect shift the exposure upwards until the blueness of the sky turned white and the whole reflection was overexposed.

So, I guess this might be something to look into. I’m not sure what’s going on here or how frequently it occurs. I didn’t have time to go looking to see if it happens under any other lighting conditions.


Shiny, blocky trees (from my second post in this topic)

This issue appears to be 100% fixed. Yay! :smiley:

The combination of several changes seems to have fixed this. Firstly, the availability of per-pixel lighting at all distances helps mitigate any blocky, flat appearance of leave blocks. Secondly, the availability of increased foliage detail hides the flat faces of leaf blocks better. And thirdly, the improvements in the material lighting system seems to contribute significantly to fixing this issue as well. In fact, I tested using the lowest foliage quality and it still looks better than it ever did. The flat, shiny, waxy effect is gone!


And that concludes my reevaluation.

I wanted to finish this post with a series of comparison screenshots but I ended up only being able to find one suitable screenshot that I had taken before the update. (I have some other nice screenshots but the locations have changed since I captured them.) So here’s Lauer’s Food **** before and after:

Before

After

There are a lot of detailed things I could say about why the ‘after’ scene is better than the ‘before’ scene but I’ve said a lot already and much of what I’d point out has already been mentioned at the start of my previous post, so I’ll spare you all. :stuck_out_tongue:

This update certainly represents a big change and some people might feel a bit put out by it but I know it’s for the best. This lighting update has made the graphics better in almost every way and this has raised the ceiling for the potential beauty that can be achieved by skilled builders.

6 Likes

I honestly don’t know how those blend modes work to guess sorry.

The exposure issue should be resolved in the next update hopefully.

The reflections are still fresnel (they were actually more hacky before and less so now), but the index of refraction of boundless water is quite a bit higher than real life water

2 Likes

I think the discolouration is due to the bloom currently being done per-channel on the final blend, changing the blend operation to use luminance and the same blend value for all channels removes discolouration. I figured per-channel was “more accurate” but doesnt really work when you have only rgb “wavelengths” instead of full light spectrums involved :stuck_out_tongue:

2 Likes