2015 |
G-Ray |
What is it?This is a ray tracer made inside Garry's Mod with Wiremod's Expression 2.
This was made quickly by using the same system that D-Ray uses. It differs by added more commands and functionality. The image on the right shows one of the earliest renders performed, completing 512 by 512 in a record time of around 5 minutes! The render times are much faster than D-Ray because the diffuse system uses point lights to determine whether or not to apply it's light to it or not, scaled by distance and how bright the light source is. Lights are by looking at an entity and adding it via chat command. |
This results in hard shadows across surfaces, to counter this, I developed a system that samples the point light, spread by it's size.
This worked, however, there has to be many samples for the shadow line to be smooth and not blocky. The image on the left shows this system taking affect with 13 shadow samples. During it's time of implementation I added progress notifications that can notify the player after a certain percentage has been completed and how long the render has left. After the render finishes it prints how many pixels it rendered and how long it took. This render printed: "Completed 262144 pixels in 55 minutes, 28 seconds." - A long time due to the soft shadow samples! |
This image below, using 6 point lights printed: "Completed 262144 pixels in 30 minutes, 10 seconds."