Η ιχνηλάτηση ακτινών (ray-tracing) αποτελεί τεχνική για την αναπαράσταση φυσικών φαινο- μένων φωτισμού μέσω της ιχνηλάτησης της διαδρομής του φωτός ως εικονοστοιχεία σε ένα επίπεδο απεικόνισης, προσφέροντας μεγαλύτερο ρεαλισμό σε σύγκριση με την συμβατική διοχεύτεση τον γραφικών. Εντούτοις, ως τεχνική είναι ακατάλληλη για εφαρμογές πραγματικού χρόνου, όπως βιντε- οπαιχνίδια, λόγω των ιδιαίτερα αυξημένων υπολογιστικών απαιτήσεων της. Σημαντικό κομμάτι της έρευνας γραφικών εστιάζει σε υβριδικές αρχιτεκτονικές και σε αλγορίθμους μείωσης θορύβου, με τις NVIDIA και Microsoft να επενδύουν στην εκμετάλλευση του υλικού για την επιτάχυνση των μεθόδων ανίχνευσης ακτίνων (Turing αρχιτεκτονική, DXR) επιδιώκοντας να εκμεταλλευτούν τον φωτορεαλι- σμό της τεχνικής. Η παρούσα διπλωματική εστιάζει στην ανίχνευση μονοπατιού (path tracing) σε πραγματκό χρόνο, παραλλαγή της ιχνηλάτησης ακτινών, ώστε να επιταχυνθεί η ροή εργασιών των επαγγελματιών γρα- φικών (technical artists) οι οποίοι, ελλείψει επαρκούς υπολογιστικής ισχύος, καταφεύγουν σε εκτός σύνδεσης υπολογισμούς των φωτοχαρτών (lightmaps) και του ολικού φωτισμού (global illumination) για τον υπολογισμό του έμμεσου φωτισμού του περιβάλλοντος τους, διαδικασία χρονοβόρα και δίχως ποιοτικές εγγυήσεις. Αντιθέτως, η ανίχνευση μονοπατιού σε πραγματικό χρόνο προσφέρει άμεση ανά- δραση και καθοδηγήση σχετικά με την τοποθέτηση των φωτεινών πηγών και των καθετήρων φωτός (light probes), με δυνατότητα δε ποιοτικής βελτίωσης μέσω συμπληρωματικών εκτός σύνδεσης υπο- λογισμών. Για την ταχύτερη σύγκλιση συνδυάζονται διαφορετικές τεχνικές δειγματοληψίας, με τα μονοπάτια του κάθε δείγματος να τερματίζουν είτε ντετερμενιστικά χρησιμοποιώντας ένα σταθερό μέγιστο βάθος, είτε στοχαστικά βάσει της μεταφοράς ενέργειας του φωτός. Μέσω της χρονικής επα- ναπροβολής (temporal reprojection) και της επαναχρησιμοποίησης των δειγμάτων διαδοχικών καρέ επιτυγχάνεται μείωση του θορύβου που οφείλεται στην υποδειγματοληψία, ενώ εμπειρικές ευρετι- κές σχέσεις (heuristics) αναπτύχθηκαν ώστε να μειωθεί η χρονική καθυστέρηση και τα είδωλα που εισήγαγε η χρονική συσσώρευση (temporal integration). Κατέστη, λοιπόν, δυνατή η κατασκεύη δυνα- μικών περιβαλλόντων με μειωμένο χρόνο αντίδρασης σε πιθανές αλλαγές. Ένα χωρικό a-trous φίλτρο αφαιρεί τον παραμένοντα θόρυβο εισάγοντας, ωστόσο, μία ελαφρώς ανεπιθύμητη θόλωση.

According to experts ray tracing is and will always be the future of Computer Graphics. This algorithm is responsible for implementing physically-based lighting effects more realistically than its predecessor, the rasterization pipeline. For many years it has been named unsuitable and impossible for real-time applications like video-games because of its high computation cost. In the last two years, NVIDIA designed the Turing architecture which implemented on hardware fast triangle intersection algorithms. Meanwhile, Microsoft announced DXR an extension of DirectX12 which exposes ray tracing API for native hardware support. However, even with these new technologies, researchers and rendering engineers have barely scratched the surface. On the upcoming years, research will focus on hybrid architectures and fast denoising algorithms on making ray tracing possible in real-time applications. This thesis focuses on providing real-time path tracing, a type of ray tracing, in order to accelerate and improve technical artists’ workflow. For years, artists have been using offline solutions to calculate their environments’ indirect illumination, since the hardware is not capable enough to calculate in realtime. Their workflow consists of baking lightmaps and calculating global illumination in a preprocessing stage, storing the results in light probes. This meant minutes and hours of calculations only to be left unsatisfied by the result and restarting the whole process. Real-time path tracing, on the other hand, can provide real-time feedback and guide their decisions on probe and light placement. When they feel satisfied by the result, which the path tracer provides, then they can continue on the higher quality offline methods. The implementation consists of various sampling techniques to accelerate the convergence rate. Meanwhile, paths on each sample terminate either deterministically, using a fixed maximum depth or stochastically based on the light transfer capability. Later post-processing stages focus on minimizing the available noise caused from undersampling. This is achieved by temporal reprojection and reusage of samples across multiple frames. Furthermore, emprirical heuristics were developed in order to reduce temporal lag and ghosting introduced by temporal integration. This achieved the construction of dynamic scenes with minimal response time on changes. Lastly, a final spatial a-trous filter removes any remaining noise introducing a mild blur as a drawback.

 

Author : George Psomathianos