Exploring Ray Tracing in FLOW-3D POST
In the world of CFD, we use FLOW-3D POST to learn about our processes, analyze, visualize, and communicate the results of our simulations. We can now use the ray tracing option to increase the quality of our images and videos. While the ray tracing tool may not be necessary for every day simulation work, it is a great tool for presentation and outbound materials. Simulations can now be rendered with realistic-looking materials, depth of field, and lighting, and shadows to better engage viewers and guide them to the most interesting aspects of the results.
What is Ray Tracing?
The ray tracing engine can now start filling in the pixels on the image plane. View rays are constructed from the camera viewpoint, through the center of each pixel on the image plane, and then extend out into to the scene object. When the ray intersects our object, the color of the intersection point is determined and sent back to its respective pixel in the image plane. This process is done for every pixel in the image plane to construct an image.
Shadows and Lighting
Another variable we can specify in our ray tracing calculation is lighting. Light sources will affect the shade and intensity of the colors sent to the image plane from our view ray. This effect is defined mathematically by the rendering equation, which was first introduced by James Kajiya from CalTech in 1986. For a basic understanding, the equation can be broken down into three factors. Keeping these factors in mind will help guide you as you start incorporating light sources into your simulation.
1. How much light is incoming or falling on our scene object?
Here we can consider the intensity of our light source, the distance from the light source to the scene object, and the orientation of the scene object with respect to the light source.
2. How does the surface of our scene object reflect the light?
This is where we can consider the material of our object. Different materials have different reflectivity. For instance, materials can be shiny like water or dull like concrete. In FLOW-3D POST we have many material definitions ready to use. Note that dull objects are defined as diffuse and shinier objects are defined as specular.
3. Where is the location of your camera or viewpoint?
Moving the viewing angle will influence the perceived light reflection.
Ray Tracing in FLOW-3D POST
With a component selected, select Enable Ray Tracing in the Properties section. From here you can use either the OSPray Raycaster or OSPray Pathtracer engines for rendering. The path tracing approach is considered a more accurate representation of lighting and illumination, but this calculation can be more computationally intensive.
Now you can start exploring the ray tracing back end. You can experiment with materials from the pre-loaded options or define them from an imported material library:
- Adjust camera properties such as focal point and depth of field using the adjust camera panel
- Background settings can be defined as backplate or environment
We have had success using the backplate to define a ground or floor to the object. Finally, the light inspector can be used to set up your light sources; this includes area lights for softer shadows.
With this overview of ray tracing, you now can start incorporating ray tracing and light sources to create photo-realistic renderings of your simulation results. We will be following up this post with some of our suggested settings that our team likes to use for different applications.
Stay tuned for our next blog on the animation view and keyframing features in FLOW-3D POST.
At Flow Science we develop innovative solutions that help our customers conceptualize, create, and analyze their simulations with confidence. If you would like more information or a personal demonstration of FLOW-3D POST, please send an email to email@example.com.
Thank you and stay tuned for our next post!