تنفيذ تقنية "تتبُّع أثر الشعاع" في لعبة Krafton Abyss of Dungeons
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
أهمية ميزة "تتبُّع أثر الشعاع" على الأجهزة الجوّالة
توفّر تقنية "تتبُّع أشعة الضوء" إضاءة وانعاكسات وظلالًا واقعية لتحسين تجارب مستخدمي Abyss of Dungeons في عالم الخيال المظلم. على الرغم من أنّ
الرسومات المذهلة من العناصر المهمة في الألعاب على الأجهزة الجوّالة، إلا أنّ تحقيق أثر
عالي الدقّة، مثل الرسومات المستندة إلى تقنية تتبُّع أشعة الضوء، كان يشكّل تحديًا كبيرًا. في السابق، كانت قيود الأداء في ألعاب الأجهزة الجوّالة تحدّ من استخدام تقنيات التقديم المتقدمة، ما يفرض إجراء تسويات في الجودة المرئية مقارنةً بتجارب ألعاب الكمبيوتر الشخصي ووحدات التحكّم في الألعاب.
تهدف لعبة Krafton Abyss of Dungeons إلى التغلب على هذه القيود.
كان الهدف من ذلك دمج تكنولوجيا تتبُّع أشعة الضوء، التي تُستخدَم عادةً في منصّات الأداء العالي، في الإصدار المخصّص للأجهزة الجوّالة من Unreal Engine 5 (UE5). سعى هذا
المشروع إلى تحسين تجربة اللعب بشكل كبير من خلال تقديم رسومات
أكثر واقعية وغنية بصريًا على الأجهزة الجوّالة. كان على الفريق
معالجة نقاط الأداء المنخفضة، وتعديل قنوات العرض المعقدة، مثل
Lumen في Unreal Engine 5، وضمان الثبات على الأجهزة الجوّالة المختلفة، ما يشكّل
خطوة مهمة نحو توفير رسومات بجودة وحدات التحكّم في الألعاب على الأجهزة الجوّالة.
القفزة المرئية من التقطيع إلى تتبع الأشعة
إنّ التجميع العادي هو المعيار لعرض الصور على الأجهزة الجوّالة بسبب
سرعته. وهي تعرِض الأجسام الثلاثية الأبعاد على شاشة ثنائية الأبعاد بكسلًا تلو الآخر. هذه الطريقة فعالة، ولكنها تبسط تفاعلات الإضاءة، ما يؤدي إلى ظهور ظلال وانعاكسات أقل واقعية.
توفّر تقنية تتبُّع الأشعة نهجًا مختلفًا. تحاكي هذه الطريقة مسار شعاع
الضوء الفعلي وتحسب تفاعلاته مع الأجسام. ويؤدي ذلك إلى إنشاء إضاءة وظلال وانعكاسات فائقة الدقة والواقعية. ومع ذلك، فإنّ هذا الواقع المعزّز
يتطلب كثافة حسابية عالية. يتطلّب احتساب مسار كل شعاع ومقدار تفاعله مع الأجسام قدرة معالجة كبيرة.
مقارنة بين التظليل وتقنية "تتبُّع أثر الشعاع"
يلخِّص الجدول التالي الاختلافات الرئيسية بين التجميع المسحّبي وطريقة
تتبُّع الأشعة:
الميزة
التحويل إلى صور نقطية
تقنية تتبع أثر الشعاع
السرعة
سريعة
سرعة بطيئة
درجة الواقعية
منخفض
جودة أعلى
استخدام الموارد
ضعيفة
مرتفع
تُشكّل كثافة الموارد هذه تحديًا للأجهزة الجوّالة التي تتمتع بقدرة معالجة محدودة مقارنةً بأجهزة الكمبيوتر المكتبي. وقد أدّى هذا القيد في السابق إلى صعوبة استخدام ميزة "تتبُّع أشعة الضوء" على المنصات الجوّالة.
اختيار تقنية "تتبُّع أشعة الضوء" وتنفيذها على Android: نهج منهجي
لتنفيذ تقنية "تتبُّع أشعة الضوء" على Android باستخدام Vulkan، تم مراعاة طريقتَين أساسيتَين: طلبات البحث عن الأشعة وعمليات معالجة الأشعة. وقدّمت طلبات البحث عن الأشعة أسلوبًا أبسط، ما يتيح إدارة الأشعة يدويًا ضمن أدوات التظليل، وكان من السهل دمجها في الأنظمة الحالية.
ومع ذلك، قدّمت قنوات أشعة الضوء حلًا أكثر قابلية للتوسع، ما سمح لفوليكان بإدارة
عبور الأشعة وتقاطعها. على الرغم من أنّ طلبات الأشعة كانت في البداية
أسرع قليلاً في المشاهد البسيطة، أظهرت قنوات الأشعة قابلية توسيع نطاق أفضل
وأداءً أفضل لتطبيقات تتبُّع الأشعة الأكثر تعقيدًا، ما يجعلها
خيارًا أفضل للتطوير على المدى الطويل والطلبات المرئية المعقدة. لقد اخترنا
موازنة سهولة التطوير الأولي مع قابلية التوسيع في المستقبل والأداء العميق
بشكل عام، مع التركيز على سلامة المظهر المرئي للعبة على المدى الطويل.
تكييف تقنية Lumen في Unreal Engine 5 للأجهزة الجوّالة: مهمة ضخمة
غيّر نظام Lumen في Unreal Engine 5، وهو نظام إضاءة وانعكاس عام في الوقت الفعلي،
من الإضاءة في بيئات الألعاب. ومع ذلك، تم تصميمه في الأصل
للكمبيوترات المكتبية ووحدات التحكّم بالألعاب العالية الأداء، وليس للأجهزة الجوّالة. شكّلت طلبات Lumen
المعقدة والموارد المطلوبة تحديًا كبيرًا لعملية دمج
الأجهزة الجوّالة. تطلبت عملية تكييف Lumen لنظام التشغيل Android إجراء تعديلات كبيرة على مسار معالجة العروض وبرنامج تجميع البرامج النصية في Unreal Engine 5، بالإضافة إلى تحسين Acceleration
Structures (AS) لإدارة بيانات المشهد المعقّدة بكفاءة. كان هدف الفريق هو
سد الفجوة، ما يتيح للأجهزة الجوّالة التعامل مع العمليات المعقدة لقياس الإضاءة
في Lumen بدون التأثير في الأداء أو الثبات. ساهمت جهود التكيف هذه أيضًا في قاعدة بيانات Unreal Engine الرسمية، ما يعود بالفائدة على منتدى تطوير الألعاب الأوسع نطاقًا ويعزّز إمكانات التقديم المرئي على الأجهزة الجوّالة.
الظلال والانعكاسات باستخدام تقنية "تتبُّع أثر الشعاع": تحسين المرئيات الواقعية
يتضمن تنفيذ ميزة "تتبُّع أشعة الضوء" تتبُّع أشعة الضوء مباشرةً من السطوح إلى مصادر الضوء، ما يقدّم دقة أعلى مقارنةً بتكنولوجيا "خرائط الظل" التقليدية. وتضمنت العملية عملية تمويه مسبقة للعمق، وظلالاً لطلبات البحث عن الأشعة، وإزالة الضوضاء،
ودمجها في عملية الإضاءة. تمّت إضافة الظلال الناعمة بكفاءة
باستخدام شعاع واحد مع تشويش متكرّر متبوعًا بإزالة الضوضاء. بالنسبة إلى الانعكاسات، نفَّذ الفريق
عملية متعددة المراحل تشمل تمريرة G-buffer، وتتبع الأشعة
للانعكاس وتخزين بيانات الارتطام، وتحويل معرّف المادة، ومرحلة المعالجة
(إنشاء الصورة المنعكسة)، ومرحلة الدمج (دمج الانعكاسات
في المشهد الرئيسي). أدّت التحسينات، مثل إعادة قراءة وحدة المعالجة المركزية (CPU) والطرق المُقسّمة
وتجميع النُسخ وعمليات إنشاء AS غير المتزامنة، إلى تحسين الأداء بشكلٍ كبير
وتقليل النفقات العامة، ما يعالج الطبيعة المستهلكة للموارد لهذه العمليات
على الأجهزة الجوّالة.
تأثير الأداء واستراتيجيات التحسين
Samsung Galaxy S24 Xclipse 940، الجزء العلوي (الأزرق المحسَّن) الجزء السفلي (الأصفر قبل التحسين)
كان تأثير تقنية "تتبُّع أشعة الضوء" في الأداء، خاصةً مع الانعكاسات، يعتمد بشكلٍ كبير
على المشهد. في المشاهد التي تحتوي على مساحات عاكسة كبيرة، يمكن أن تستهلك الانعكاسات
جزءًا كبيرًا من وقت عرض اللقطة (من %30 إلى %40). كانت التحسينات
حاسمة لجعل تقنية "تتبُّع أشعة الضوء" قابلة للاستخدام. استخدَم الفريق العديد من الأساليب لمحاولة
تقليل الوقت المستغرَق في العمليات غير الضرورية وزيادة الكفاءة: استخدام أسلوب عرض يستند إلى الوحدات المربّعة
لتقليل الوقت المستغرَق في العمليات غير الضرورية، وتجميع نُسخ من المادة والأشكال الهندسية نفسها
لتقليل عدد عمليات الرسم، وإنشاء "هياكل التسارع" للأشكال الهندسية المرئية فقط، واستخدام العمليات الحسابية غير المتزامنة لإنشاء "هياكل التسارع". تقلّل هذه الاستراتيجيات
بشكل كبير من وقت المعالجة وتقليل عبء وحدة معالجة الرسومات، ما يجعل ميزة "تتبُّع أشعة الشمس" في الوقت الفعلي ممكنة على الأجهزة الجوّالة.
مراجع إضافية
أثبت فريق Samsung DevTech ولعبة Abyss of Dungeons من Krafton أنّه من الممكن استخدام تقنيات التقديم المتقدّمة، مثل تتبع الأشعة، على الأنظمة الأساسية للأجهزة الجوّالة من خلال عمليات التكيّف والتحسينات الاستراتيجية. ونجح الفريق في
تكييف نظام Lumen في Unreal Engine 5 وتنفيذ حلول عرض مخصّصة وحلّ
العديد من العقبات الفنية لتقديم تجربة ألعاب محسّنة من الناحية المرئية.
لم تؤدّ هذه المحاولة إلى تحسين الدقّة المرئية في Abyss of Dungeons فحسب، بل قدمت أيضًا إحصاءات وأساليب قيّمة لأجل تطوير الألعاب المستقبلية على الأجهزة الجوّالة. ويُبرز هذا الحدث مدى فعالية التعاون بين مطوّري الألعاب
وموفّري التكنولوجيا من أجل ابتكار تجارب ألعاب متقدّمة على الأجهزة الجوّالة،
وجعلها قريبة من الجودة التي توفّرها أجهزة الكمبيوتر الشخصي ووحدات التحكّم في الألعاب.
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-03-05 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-03-05 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Implementing Ray Tracing in Krafton Abyss of Dungeons\n\nYour browser doesn't support the video tag.\n\nWhy Ray Tracing on Mobile Matters\n---------------------------------\n\nRay Tracing unlocks realistic lighting, reflections, and shadows to level up\nplayer immersion in the dark fantasy world of [Abyss of Dungeons](https://play.google.com/store/apps/details?id=com.krafton.dndm). While\nvisually stunning graphics are crucial in mobile games, achieving high fidelity\neffects like ray-traced visuals has been a significant challenge. Historically,\nmobile gaming performance limitations have restricted advanced rendering\ntechniques, forcing compromises in visual quality compared to PC and console\nexperiences.\n\nKrafton Abyss of Dungeons aimed to overcome these limitations.\nThe objective was to integrate ray tracing technology, typically reserved for\nhigh-end platforms, into the mobile version in Unreal Engine 5 (UE5). This\nendeavor sought to significantly enhance player immersion by delivering more\nrealistic and visually rich graphics on mobile devices. The team needed to\naddress performance bottlenecks, adapt complex rendering pipelines like\n[UE5's Lumen](https://dev.epicgames.com/documentation/en-us/unreal-engine/lumen-global-illumination-and-reflections-in-unreal-engine), and ensure stability on varied mobile hardware, marking a\nsignificant step towards bringing console-quality graphics to mobile gaming.\n\nThe Visual Leap from Rasterization to Ray Tracing\n-------------------------------------------------\n\nConventional rasterization is the standard for mobile rendering due to its\nspeed. It projects 3D objects onto a 2D screen pixel by pixel. This method is\nefficient, but simplifies light interactions, resulting in less realistic\nshadows and reflections.\n\nRay tracing offers a different approach. It simulates the actual path of light\nrays and calculates their interactions with objects. This creates highly\naccurate and realistic lighting, shadows, and reflections. However, this realism\ncomes at the cost of computational intensity. Calculating each ray's path and\ninteractions requires significant processing power.\n\n### Comparing Rasterization and Ray Tracing\n\nThe following table summarizes the key differences between rasterization and ray\ntracing:\n\n| Feature | Rasterization | Ray Tracing |\n|--------------|---------------|-------------|\n| Speed | Fast | Slow |\n| Realism | Lower | Higher |\n| Resource Use | Low | High |\n\nThis resource intensity poses a challenge for mobile devices, which have limited\nprocessing power compared to desktops. This limitation has historically hindered\nthe adoption of ray tracing on mobile platforms.\n\nChoosing and Implementing Ray Tracing on Android: A Methodical Approach\n-----------------------------------------------------------------------\n\nFor implementing ray tracing on Android with Vulkan, two primary methods were\nconsidered: Ray Queries and Ray Pipelines. Ray Queries offered a simpler\napproach, enabling manual ray management within shaders, which was more\nstraightforward to integrate into existing systems.\n\nRay Pipelines, however, provided a more scalable solution, allowing Vulkan to\nmanage ray traversal and intersection. Although Ray Queries were initially\nslightly faster in simpler scenes, Ray Pipelines demonstrated better scalability\nand performance for more complex ray tracing applications, making them a\nsuperior choice for long-term development and intricate visual demands. We chose\nto balance initial development ease with future scalability and overall\nperformance, focusing on the long-term visual integrity of the game.\n\nAdapting UE5 Lumen for Mobile: A Monumental Task\n------------------------------------------------\n\nUE5's Lumen, a real-time global illumination and reflection system,\nrevolutionized lighting in game environments. However, it was originally\ndesigned for high-performance PCs and consoles, not mobile devices. Lumen's\ncomplexity and resource requirements presented a major challenge for mobile\nintegration. Adapting Lumen for Android required extensive modifications to\nUE5's rendering pipeline and shader compiler, along with optimizing Acceleration\nStructures (AS) to manage complex scene data efficiently. The team's work aimed\nto bridge the gap, enabling mobile devices to handle the sophisticated lighting\ncalculations of Lumen without sacrificing performance or stability. This\nadaptation effort also contributed to the official Unreal Engine codebase,\nbenefitting the broader game development community and advancing mobile\nrendering capabilities.\n\nRay Tracing Shadows and Reflections: Elevating Visual Realism\n-------------------------------------------------------------\n\nImplementing Ray Tracing Shadows involved tracing light rays directly from\nsurfaces to light sources, offering superior accuracy compared to conventional\nshadow maps. The process included a depth prepass, ray query shadows, denoising,\nand integration into the lighting pass. Soft shadows were achieved efficiently\nusing a single ray with jitter followed by denoising. For reflections, the team\nimplemented a multi-stage process involving a G-buffer pass, ray tracing\nreflection and hit data storage, material ID conversion, a resolve pass\n(constructing the reflected image), and a blend pass (integrating reflections\ninto the main scene). Optimizations such as CPU readback, tiled approaches,\ninstance batching, and asynchronous AS builds significantly improved performance\nand reduced overhead, addressing the resource-intensive nature of these\nprocesses on mobile devices.\n\nPerformance Impact and Optimization Strategies\n----------------------------------------------\n\nSamsung Galaxy S24 Xclipse 940, Top (optimized, blue) Bottom (before optimization, yellow)\n\nThe performance impact of ray tracing, particularly with reflections, was highly\nscene-dependent. In scenes with large reflective surfaces, reflections could\nconsume a significant portion of the frame time (30-40%). Optimizations were\ncrucial to making ray tracing viable. The team employed numerous techniques to\nreduce overhead and increase efficiency: using a tile-based rendering approach\nto minimize wasted processing, batching instances of the same material and\ngeometry to reduce draw calls, building Acceleration Structures only for visible\ngeometries, and using asynchronous compute for AS construction. These strategies\ndrastically cut down on processing time and reduced GPU load, making real-time\nray tracing possible on mobile hardware.\n\nFurther Reading\n---------------\n\nThe Samsung DevTech team's and Krafton's Abyss of Dungeons demonstrated that,\nwith strategic adaptations and optimizations, it is possible to bring high-end\nrendering techniques like ray tracing to mobile platforms. The team successfully\nadapted UE5's Lumen system, implemented custom rendering solutions, and resolved\nnumerous technical hurdles to deliver a visually enhanced gaming experience.\nThis endeavor has not only improved the visual fidelity of Abyss of Dungeons but\nalso provided invaluable insights and techniques for future mobile game\ndevelopment. It highlights the power of collaboration between game developers\nand technology providers to innovate and elevate the mobile gaming experience,\nbringing it closer to the quality found on PCs and consoles."]]