Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions profile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Sun shadow clarity has also been heavily improved, through both reducing the sun
| :-: | :-: |
| ![](/images/sun_shadow/shadow_rtx.png) | ![](/images/sun_shadow/shadow_brtx.png) |

***
## Revamped Atmosphere:
Previously, the atmosphere visuals were achieved by projecting a texture onto the sky and slowly animating it throughout a day/night cycle, with each frame corresponding to a different time of day. This approach exhibited several caveats. Due to the low resolution of the texture (64x32 per frame), artifacts such as colour banding were prevalent throughout the sky. There were even some downscaling artifacts between frames, with colour from one bleeding into the next (leading to a dark dot near the zenith). **BetterRTX** solves all of these issues through introducing a physically based simulation of Rayleigh and Mie scattering to render the atmosphere.
| Vanilla at Dawn | BetterRTX at Dawn |
Expand All @@ -47,6 +48,7 @@ Previously, the atmosphere visuals were achieved by projecting a texture onto th

The apparent brightness of the sky has also decreased, since before BetterRTX luminance from the atmosphere was not sampled when determining exposure value.

***
## Water Parallax Mapping:
The previous water rendering method has been widely considered lackluster by the community, as it relies solely on an animated normal map in order to exhibit the notion of waving water. The visual presentation of this effect is hindered even more through the poorly implemented LOD system in place: normal mapping stops applying to the surface of water at a disappointingly short distance from the camera. This led to water appearing completely static in most camera positions. **BetterRTX** includes several improvements to water directly addressing these issues. The height of water is now varied over time through multiple noise samples and visually displaced through a parallax mapping technique. Reflection quality has also been significantly improved through additions to the specular denoiser.
```cpp
Expand Down Expand Up @@ -74,6 +76,7 @@ float calcWaterSurfaceHeight(float3 stepPos)
| :-: | :-: |
| ![](/images/water/water_rtx.png) | ![](/images/water/water_brtx.png) |

***
## Rain Puddles:
During weather events such as rainfall, Minecraft RTX only employed one additional visual effect: the sky would transition from its normal colour to uniform grey. **BetterRTX** takes much better advantage of Ray Traced rendering to greatly improve the visuals during rainfall. The mod adds increased volumetric fog during rainy weather, and implements puddles through mapping a noise function to the terrain. A ray is traced upwards from the puddle surface with a random offset to determine if the sky is reachable, in order to naturally transition from wet to dry spaces under rain-blocking geometry.
```cpp
Expand Down Expand Up @@ -115,6 +118,7 @@ if (rainLevel > 0.0 && objectCategory != OBJECT_CATEGORY_WATER && dot(geometryIn
| :-: | :-: |
| ![](/images/weather/rain_rtx.png) | ![](/images/weather/rain_brtx.png) |

***
## Reflected Water Caustics:
**BetterRTX** introduces water caustics through sunlight reflections off of water to enhance the level of realism achieved with the renderer. From each point on a surface, the path sunlight would take to reflect off of water is traced backward to determine if reflected sunlight is capable of reaching that point. If so, the animated caustics texture is sampled and added to the illuminance of the surface.
```cpp
Expand Down Expand Up @@ -152,6 +156,8 @@ float3 sampleReflectedCaustics(float3 origin, float3 normal, float3 directionToS
| :-: | :-: |
| ![](/images/reflected_caustics/caustics_rtx.png) | ![](/images/reflected_caustics/caustics_brtx.png) |


***
## Motion Blur:
After a bit of research into different methods of implementing the feature, I based my implementation of motion blur on the method outlined in Nvidia's [GPU Gems 3](https://developer.nvidia.com/gpugems/gpugems3/part-iv-image-effects/chapter-27-motion-blur-post-processing-effect), and modified it with a custom weighted average. The motion vectors are pulled from the existing buffer, and are then used as the path that each colour sample is taken from for use in the final average. To make the blur respond to different magnitudes and directions of motion, I weighed each colour sample across the pixel path by its unique motion vector projected onto the origin pixel's motion vector. This prevents pixels undergoing significant motion from sampling static pixels for motion blur. Motion blur intensity is made inversely proportional to the current frame time to make the perceived motion blur intensity remain the same no matter the current framerate.
```cpp
Expand Down Expand Up @@ -187,6 +193,7 @@ finalColour /= mtotalWeight;
Demo Video:
[![](https://img.youtube.com/vi/vKGCLTsGEak/maxresdefault.jpg)](http://www.youtube.com/watch?v=vKGCLTsGEak)

***
## Depth of Field:
Depth of field is achieved through simulating a camera with a circular aperture. Primary ray origins are offset by a random distance within the bounds of the aperture size, and are traced towards a focal point. Focal distance is determined automatically by using the extent of a few primary rays cast from the center of the screen. Over each frame, the current focal distance is slowly incremented towards the target focal distance through a lerp function. Since the path tracer runs at one sample per pixel, rendering the effect with large apertures introduces significant noise. A Gaussian blur is applied to the scene with varying intensity, depending on the distance from the focal point to each primary ray intersection to account for the noise.
```cpp
Expand All @@ -212,6 +219,7 @@ RayDesc generateThinLensCameraRay(float2 posNdcXy, inout rand_seed randSeed, flo
Demo Video:
[![](https://img.youtube.com/vi/3kSjOb7tNYw/maxresdefault.jpg)](http://www.youtube.com/watch?v=3kSjOb7tNYw)

***
# Bug Fixes:
## Spectator Mode:
Spectator is a game mode within Minecraft meant to provide players with the opportunity to spectate their worlds without interacting with anything. One of the headlining features of the game mode is the ability to see through the back faces of blocks while inside of them, enabling players to see within enclosed spaces without needing to be positioned inside such spaces. This feature unfortunately isn't functional with Ray Tracing by default. **BetterRTX** fixes the issue through a simple check for primary rays, replacing them with new rays placed behind the back faces of blocks should the original ray hit the back face of one.
Expand All @@ -234,15 +242,25 @@ if (numBounces == 0 && primaryHitInfo.hasHit()) {
| :-: | :-: |
| ![](/images/spectator/spectate_rtx.png) | ![](/images/spectator/spectate_brtx.png) |

***
## Light Transmission:
Normally within Minecraft, placing any block with an explicit point light (Torches, End Rods, Lanterns) behind glass would fail to properly transmit its light through coloured materials. Emissive surfaces fail to properly transmit their emission in reflections as well. **BetterRTX** introduces a few changes that properly implement these missing features.
| Vanilla | BetterRTX |
| :-: | :-: |
| ![](/images/transmission/point_light_rtx.png) | ![](/images/transmission/point_light_brtx.png) |
| ![](/images/transmission/reflection_rtx.png) | ![](/images/transmission/reflection_brtx.png) |

***
## Status Effects:
The fog used by the darkness and blindness effects leaves a lot to be desired. Skylight leaks through the fog in both specular reflections and in transmission through water, ruining any sense of immersion these status effects could provide. The Darkness effect also failed to include the iconic exposure pulses present outside of the Ray Traced renderer. **BetterRTX** solves all of these issues, by properly implementing the fog gained from these effects into both specular reflections and in light transmission, making sure to implement periodic exposure pulses while under the Darkness effect to match the feature present in the rasterized Minecraft renderer.

Demo Video:
[![](https://img.youtube.com/vi/TVbaB-LQ1-g/maxresdefault.jpg)](http://www.youtube.com/watch?v=TVbaB-LQ1-g&t=43s)
## Various presets:
The **BetterRTX**'s community made multiple presets and show of to the world there vision of the RTX on Minecraft. A preset creator is actually here for help you to create YOUR own preset
> "Really thanks to created this preset editor, Vibrant preset was not only made by me but by you too !"
>
> -K3013
***
## Conclusion:
BetterRTX is really better than the made-in Minecraft RTX