Abstract

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

Abstract.

Voxel-based technology has already been present in the early


years of computer visualization. However its usage was almost entirely
confined to the field of medical image synthesis. Due to the continuous
development of the CPU and graphics hardware, its role has increased
again nowadays. It came to the fore especially in the field of computer
games because of its specific properties. This publication presents a
simplified visualization model and optimization techniques, which are
able to visualize smaller (perhaps animated) voxel sets in real-time with
certain compromises. The objective of the solution is not to reach the
level of photorealistic image synthesis, but a provide a well applicable
and simple method which can be applied for computer games and other
graphical applications

‫ملخص‬.
‫ كان استخدامها يقتصر تقريًبا بالكامل على‬،‫ ومع ذلك‬.‫كانت تقنية الفوكسل موجودة بالفعل في السنوات األولى للتصور الحاسوبي‬
‫ زادت دورها من جديد في الوقت‬،‫ نتيجة للتطور المستمر لوحدات المعالجة المركزية واألجهزة الرسومية‬.‫مجال توليد الصور الطبية‬
‫ تقدم هذه النشرة نموذج تصور مبسط‬.‫ أصبحت تبرز بشكل خاص في مجال ألعاب الكمبيوتر بسبب خصائصها المحددة‬.‫الحاضر‬
‫ الهدف من‬.‫ التي تستطيع تصور مجموعات فوكسل أصغر (ربما متحركة) في الوقت الفعلي مع تسويات معينة‬،‫وتقنيات تحسين‬
‫ ولكن تقديم طريقة بسيطة وقابلة للتطبيق بشكل جيد‬،‫الحلول المقدمة ليس الوصول إلى مستوى توليد الصور الواقعية بالغة الدقة‬
‫يمكن تطبيقها في ألعاب الكمبيوتر وتطبيقات الرسومات األخرى‬.

1. Introduction Almost the entire area of the computer visualization is dominated today by GPU
rasterized polygon models. Although the voxel-based approach has been available from the very
beginning, but the early slow hardware were not yet ready in performance for an approach based on
atomic model structure. They were strongly limited in memory and storage, so it is no wonder that
the filling based (scanline, half space approaches) polygon image synthesis has become dominant.

1. ‫مقدمة‬

‫تهيمن في الوقت الحاضر معظم مجاالت تصور الحاسوب على نماذج البوليجونات المقسمة بواسطة وحدة المعالجة‬
‫ إال أن األجهزة البطيئة في البداية لم تكن جاهزة‬،‫ على الرغم من توفر النهج المعتمد على الفوكسل منذ البداية‬.‫الرسومية‬
‫ لذا ال عجب أن‬،‫ كانت محدودة بشكل كبير في الذاكرة والتخزين‬.‫بعد من حيث األداء لنهج مبني على هيكل النموذج الذري‬
‫ وتقنيات نصف الفضاء) سائدة‬،‫تصبح عملية توليد الصور البوليجونية المستندة إلى الملء (مثل تقنيات المسح الضوئي‬.

In the early ages, the process of rasterization was performed entirely and exclusively by the CPU, the
graphics accelerator hardware appeared only later.
However, the technology has been continuously evolved over the years, mainly
due to the computer games. Today it seems that voxel based technology is
a major trend in the area of photorealistic visualization. Besides the growing of hardware
performance, the expectation about visualization have also
increased. A modern computer game has millions of polygons on the screen
at the same time. All of the voxelized versions of these would consume a lot
of memory and CPU/GPU time. Today’s GPUs are able to render a smaller
scene with various real-time effects (e.g. lighting, depth of field, shadows etc),
but in cases where many models are on the screen, the available GPU memory is probably
insufficient. This led to the unfolding techniques of real-time
background data streaming into GPU memory.
To summarize, we can state that modern computer graphics stands before
the introduction of the effective voxel technology. Companies, the greatest
players in the computer game industry are constantly looking for voxel based
complementary solutions to achieve a more realistic view. These techniques,
algorithms are complicated, require a high level of knowledge from different
areas. This article therefore does not focus on photorealistic visualization,
rather displaying smaller voxel sets in a simple way. To answer the question
how voxel sets can we visualize without a deep mathematical knowledge beside
acceptable quality compromises.

‫ وظهرت أجهزة‬،‫ كانت عملية التقسيم بالبكسل ُتنفذ بالكامل وحصرًيا بواسطة وحدة المعالجة المركزية‬،‫في العصور األولى‬
‫ ويرجع ذلك أساًسا إلى األلعاب‬،‫ تطورت التكنولوجيا باستمرار على مر السنين‬،‫ ومع ذلك‬.‫تسريع الرسومات الحًقا‬
‫ باإلضافة إلى تحسين أداء‬.‫ اليوم يبدو أن تقنية الفوكسالت هي اتجاه رئيسي في مجال التصور الواقعي للصور‬.‫الحاسوبية‬
‫ تحتوي لعبة كمبيوتر حديثة على ماليين البوليجونات على الشاشة في‬.‫ فإن التوقعات حول التصور أيًض ا قد زادت‬،‫األجهزة‬
‫وحدة‬/‫ ستستهلك جميع النسخ المقوسة لهذه البوليجونات الكثير من الذاكرة ووقت وحدة المعالجة المركزية‬.‫نفس الوقت‬
‫ يمكن لوحدات معالجة الرسومات الحديثة أن تقوم بتقديم مشهد أصغر بمؤثرات في الوقت الفعلي‬.‫المعالجة الرسومية‬
،‫ ولكن في الحاالت التي تظهر فيها العديد من النماذج على الشاشة‬،)‫ والظالل إلخ‬،‫ وعمق المجال‬،‫متنوعة (مثل اإلضاءة‬
‫ هذا أدى إلى تطور تقنيات تدفق البيانات الخلفية في الوقت‬.‫فإن الذاكرة المتاحة لوحدة المعالجة الرسومية ربما غير كافية‬
‫الفعلي إلى ذاكرة وحدة المعالجة الرسومية‬.

‫ أكبر‬،‫ الشركات‬.‫ يمكننا القول أن الرسومات الحاسوبية الحديثة تقف أمام إدخال تكنولوجيا الفوكسل الفعالة‬،‫للتلخيص‬
‫ هذه التقنيات‬.‫ تبحث باستمرار عن حلول فوكسلية مكملة لتحقيق رؤية أكثر واقعية‬،‫الالعبين في صناعة ألعاب الكمبيوتر‬
‫ فإن هذا المقال ال يركز على التصور‬،‫ لذلك‬.‫ وتتطلب مستوى عاٍل من المعرفة من مجاالت مختلفة‬،‫والخوارزميات معقدة‬
‫ لإلجابة على السؤال حول كيفية تصور‬.‫ بل على عرض مجموعات الفوكسالت الصغيرة بطريقة بسيطة‬،‫الواقعي للصور‬
‫مجموعات الفوكسالت دون الحاجة إلى معرفة رياضية عميقة إلى جانب تسويات الجودة المقبولة‬.

3.5

The voxel-based, alternative rendering technology has already appeared in


the early years of the computer visualization. Because early hardware did
not allow to use displaying models which are able to provide professional,
high images quality, thus voxel-based techniques became less known. The
main area of its application was the medical diagnostic image synthesis, but
some interesting computer games were born applying ray base solutions at
the rendering. Although the CPUs were not yet fast enough, but owing to
the so-called Wave Surfing algorithm, low-end hardware were able to visualize
three dimension models (mainly terrains) in real time. Good examples are:
Comanche - 1992, Delta Force - 1998, Armored Fist - 1994, Blade Runner -
1997, Hexplore - 1998 etc. The early consoles (Amiga, Nintendo, Gameboy)
used similar technology with the help of software rasterization.
After the continuous spread of the GPU based rendering, which supported
the polygon based approach, the software based (voxel) solutions fell more
and more into the background. Although there have always been software
products (Outcast - 1999, Motocross Stunt Racer - 2002, Red Alert series) which used the
voxel approach, the polygon-based technologies come to the
fore.
In recent years, voxels have become to a frequented area again. Due to the
evolution of the GPU, mainly the approaches using some kind of ray-based
technology (ray-tracing, cone tracing etc.) are showing progress. Solutions applying tree
structures for faster rasterization are also popular. In publication
[3], one of the leader of the GPU market, the NVidia examines the possibilities of using voxel
representations as a generic way for expressing complex and
feature-rich geometry on current and future GPUs. Their benchmarks show
that the octal tree based voxel representation is competitive with trianglebased
representations in terms of ray casting performance. Szymon and Marc
[4] describe a system for representing and progressively displaying complex
meshes that combines a multiresolution hierarchy based on bounding spheres
with a point based rendering system. In [11] sparse voxel database structure
(GVDB) was investigated based on the voxel database topology. GVDB introduces an
indexed memory pooling design for dynamic topology, and a novel
hierarchical traversal for efficient raytracing on the GPU. They method can
give large performance improvements over CPU methods.
Global illumination is a modern trend to make scene lighting more realistic.
The voxel representation is becoming more important in this area. The leading company,
Unreal Technologies presented a voxelisation based model for
global illumination, applying Deferred rendering [6]. The importance of this
technique lies in the fact that the technology is ready for the modern computer
games. Paper [7] and [8] also approach the problem of modern lighting using
voxel-based technology.
The voxel-based image synthesis is constantly evolving, it will be seen on the
screen of every average computer within a few years.

‫نوات األولى‬¥¥‫ل في الس‬¥¥‫رت بالفع‬¥¥‫ديم ظه‬¥¥‫ة للتق‬¥¥‫ات التقليدي‬¥¥‫ديل للتقني‬¥¥‫تقنية التقسيم بالفوكسل كب‬
‫ودة‬¥¥‫وفر ج‬¥¥‫تي ت‬¥¥‫اذج ال‬¥¥‫ نظًر ا لعدم قدرة األجهزة األولية على عرض النم‬.‫للتصور الحاسوبي‬
‫ كان المجال الرئيسي لتطبيقها في‬.‫ أصبحت تقنيات الفوكسل أقل شهرة‬،‫صور احترافية عالية‬
‫ول‬¥¥‫ لكن بعض األلعاب الحاسوبية المثيرة ظهرت باستخدام حل‬،‫توليد صور التشخيص الطبي‬
،‫ ورغم أن وحدات المعالجة المركزية لم تكن بعد سريعة بما يكفي‬.‫تقديمية مبنية على األشعة‬
‫ كانت األجهزة ذات‬،Wave Surfing ‫إال أنه بفضل خوارزمية موج التموج المعروفة باسم‬
‫اريس) في‬¥¥‫اد (على األغلب تض‬¥¥‫ة األبع‬¥¥‫اذج ثالثي‬¥¥‫ور نم‬¥¥‫ادرة على تص‬¥¥‫توى المنخفض ق‬¥¥‫المس‬
Comanche - 1992، Delta Force - :‫ ومن األمثلة الجيدة على ذلك‬.‫الوقت الحقيقي‬
،1998، Armored Fist - 1994، Blade Runner - 1997، Hexplore - 1998
‫وما إلى ذل‪¥‬ك‪ .‬اس‪¥‬تخدمت األجه‪¥‬زة المحمول‪¥‬ة في العص‪¥‬ور األولى (‪Amiga، Nintendo،‬‬
‫‪ )Gameboy‬تقنية مماثلة باستخدام تقسيم بالبرامج‪.‬‬

‫بعد انتشار مستمر للتقديم المستند إلى وح‪¥¥‬دة المعالج‪¥¥‬ة الرس‪¥¥‬ومية‪ ،‬وال‪¥¥‬ذي دعم النهج المس‪¥¥‬تند‬
‫إلى البوليجونات‪ ،‬انحسرت الحلول المستندة إلى البرامج (الفوكسل) إلى الخلفية أك‪¥¥‬ثر ف‪¥¥‬أكثر‪.‬‬
‫على الرغم من وجود منتجات برمجي‪¥‬ة دائًم ا (‪Outcast - 1999، Motocross Stunt‬‬
‫‪ ،Racer - 2002‬سلسلة ‪ ،)Red Alert‬التي استخدمت نهج الفوكسل‪ ،‬فإن التقنيات المستندة‬
‫إلى البوليجونات تأتي إلى الواجهة‪.‬‬

‫في السنوات األخيرة‪ ،‬أصبحت الفوكسالت منطقة مرغوبة مرة أخرى‪ .‬بفض‪¥¥‬ل تط‪¥¥‬ور وح‪¥¥‬دة‬
‫المعالجة الرسومية‪ ،‬بش‪¥‬كل رئيس‪¥‬ي تقني‪¥‬ات تعتم‪¥‬د على تقني‪¥‬ة مبني‪¥‬ة على األش‪¥‬عة (مث‪¥‬ل تتب‪¥‬ع‬
‫األشعة‪ ،‬وتتب‪¥¥‬ع المخ‪¥‬روط إلخ) تظه‪¥¥‬ر تق‪¥¥‬دًم ا‪ .‬الحل‪¥¥‬ول ال‪¥¥‬تي تس‪¥‬تخدم هياك‪¥¥‬ل ش‪¥‬جرية لتس‪¥‬ريع‬
‫التقسيم ب‪¥¥‬البرامج أيًض ا ش‪¥¥‬ائعة‪ .‬في النش‪¥¥‬رة [‪ ،]3‬يفحص أح‪¥¥‬د رواد س‪¥¥‬وق وح‪¥¥‬دات المعالج‪¥¥‬ة‬
‫الرس‪¥¥‬ومية‪ ،NVidia ،‬إمكاني‪¥¥‬ات اس‪¥¥‬تخدام تم‪¥¥‬ثيالت الفوكس‪¥¥‬ل كطريق‪¥¥‬ة عام‪¥¥‬ة للتعب‪¥¥‬ير عن‬
‫الهندسة المعقدة والغنية بالميزات على وحدات المعالجة الرسومية الحالية والمستقبلية‪ .‬تظه‪¥¥‬ر‬
‫اختباراتهم أن التمثيل الفوكسلي المستند إلى شجرة الثمانيات يتنافس م‪¥¥‬ع التم‪¥¥‬ثيالت المس‪¥¥‬تندة‬
‫إلى البوليجون‪¥¥‬ات من حيث أداء تق‪¥¥‬ديم األش‪¥¥‬عة‪ .‬يص‪¥¥‬ف س‪¥¥‬يمون وم‪¥¥‬ارك [‪ ]4‬نظاًم ا لتمثي‪¥¥‬ل‬
‫وعرض تدريجي للشبكات المعق‪¥‬دة ال‪¥‬تي تجم‪¥‬ع بين ه‪¥‬رم الت‪¥‬درج المتع‪¥‬دد الدق‪¥‬ة المس‪¥‬تند إلى‬
‫الكرات المحيطة مع نظام تقديم مبني على النقاط‪ .‬في [‪ ،]11‬تمت دراسة هيكل قاعدة بيان‪¥¥‬ات‬
‫الفوكس‪¥¥‬الت الض‪¥¥‬عيفة (‪ )GVDB‬اس‪¥¥‬تناًدا إلى توبولوجي‪¥¥‬ا قاع‪¥¥‬دة بيان‪¥¥‬ات الفوكس‪¥¥‬ل‪ .‬يق‪¥¥‬دم‬
‫‪ GVDB‬تصميًم ا لتجميع الذاكرة المفهرس للتوبولوجي‪¥¥‬ا الديناميكي‪¥¥‬ة‪ ،‬وتراف‪¥¥‬ر تسلس‪¥¥‬لًيا لتتب‪¥¥‬ع‬
‫األشعة الفعال على وحدة المعالجة الرس‪¥¥‬ومية‪ .‬يمكن له‪¥¥‬ذا األس‪¥¥‬لوب أن يحق‪¥¥‬ق تحس‪¥¥‬ينات أداء‬
‫كبيرة على طرق وحدة المعالجة المركزية‪.‬‬

‫اإلضاءة العالمية هي اتجاه حديث لجعل إضاءة المشهد أكثر واقعية‪ .‬يصبح التمثيل الفوكسلي‬
‫أكثر أهم‬
3. Voxel based visualization
Voxel based visualization is not a new area in the field of digital image synthesis. The idea behind the
name is that the model builds the 3D model from
voxels instead of describing it by today’s popular a polygon mesh. It can be dif-
ficult to define the term voxel. The literature often calls it as three-dimensional
pixel, but can also be called as atom. A typical voxel representation contains
the position, size and color information. In addition, renderers using different
technologies can store other information (e.g. normal vector), which are used
to achieve a more realistic visualization used (e.g. Ambient Occlusion). The
voxel-based representation has several advantages over polygon-based storage
model. Since the voxel set includes all necessary information of the model
for displaying, texture mapping and mip mapping are not needed. The color
stored in voxels determines exactly the “look” of the model. Another advantage of the
representation is that we can define a very detailed model structure,
built upon atomic units. If observe the current trends in the computer game
industry, we can declare that the voxel technology can be a very possible future of the computer
graphics. This conclusion comes from the fact, that the
global objective of real time computer visualization is to reach more realistic, physically correct
results on the screen. Therefore the number of applied
triangles are constantly increasing and their size is getting smaller. This is a
process which tends to an atomic level, which is the world of voxels. Nowadays, screen space
solutions (Normal Mapping, Occlusion Mapping, Parallax
Mapping etc) are dominated against complex triangle based model structures,
because using current screen space algorithms to add detail to a model are
cheaper for the GPU, than working with millions of triangles.
The main downside of the voxel technology is hidden in the large data set.
Even less detailed model structure has a relatively large set of voxels. Big
data set of models requires large amount of main and GPU memory, which is
fairly limited in case of GPU based visualization. Various, so-called streaming
technology must be developed to keep the current possible visible parts of the
virtual world in the GPU memory, however this technology needs a very complex computer and
visualization knowledge. Further additional problem of
the voxel set is the following: because the voxel based world comprises a large
number of voxels, the graphics pipeline should handle large data sets during
the various transformations. Because every CPU or GPU cycle counts, this
property has a significant impact on performance [1]. Today’s graphics hardware does not directly
support the voxel based visualization. There are some
trends emerged, mainly based on ray-based solutions, but there is no officially
supported direction/pipeline from the GPU manufacturers and graphics APIs
(OpenGL, DirectX) like in case of polygon-based solutions. using polygons it
is enough to specify a set of vertices, textures, and other properties of the object, the GPU can
visualize the data almost directly. To visualize a voxel set
with the GPU, the programmer usually should develop a custom technology
using (sometimes very complex) shaders performing some kind of simplified
ray-based technology.
Today, the NVidia company provides a ray tracing engine called Optix, which
is able to perform ray tracing on their GPUs. But since it is not officially supported by the common
graphics APIs, its application possibilities are limited.
The computer game industry will not use this technology until it is not part
of the the graphical APIs (OpenGL, DirectX) and uniformly supported on all
‫‪modern GPU.‬‬
‫‪The representation of the voxel set is independent of the displaying process.‬‬
‫‪In practice, many volume rendering algorithms have been developed. This‬‬
‫‪paper reviews the most important approaches and also presents a software‬‬
‫‪based simplified solution.‬‬

‫التصور المعتمد على الفوكسالت‬


‫التصور المعتمد على الفوكسالت ليس مجااًل جديًد ا في مجال توليد الصور الرقمية‪ .‬الفك==رة‬
‫وراء االس=م هي أن النم=وذج يب=ني النم=وذج ثالثي األبع=اد من الفوكس=الت ب=دًال من وص=فه‬
‫بواسطة شبكة البوليجونات الشائعة في الوقت الحالي‪ .‬قد يكون‬

‫من الصعب تعري==ف مص==طلح الفوكس==ل في األدب غالًب ا م==ا ُيطل==ق علي==ه العنص==ر الثالثي‬
‫األبعاد‪ ،‬لكن يمكن أيًض ا تسميته بال==ذرة‪ .‬يحت==وي التمثي==ل التقلي==دي للفوكس==ل على معلوم==ات‬
‫حول الموقع والحجم واللون‪ .‬باإلضافة إلى ذلك‪ ،‬يمكن للمحرك==ات الرس==ومية ال==تي تس==تخدم‬
‫تقنيات مختلفة تخزين معلومات أخرى (مثل الناقل الطبيعي)‪ ،‬والتي تستخدم لتحقيق تص==ور‬
‫أكثر واقعية (مثل االحتجاز المحي==ط)‪ .‬يتمت==ع التمثي==ل المعتم==د على الفوكس==الت بع==دة مزاي==ا‬
‫على نموذج التخ==زين المعتم==د على البوليجون==ات‪ .‬حيث يتض==من مجموع==ة الفوكس==الت ك==ل‬
‫المعلومات الالزمة للنموذج‬
‫‪ .‬نظًر ا ألن مجموعة الفوكس=الت تتض==من ك==ل المعلوم==ات الالزم==ة لع==رض النم==وذج‪ ،‬ف=إن‬
‫تط==بيق خرائ==ط الق==وام وتقني==ة ‪ mip mapping‬ليس مطلوًب ا‪ .‬يح==دد الل==ون المخ==زن في‬
‫الفوكسالت بدقة "مظهر" النموذج‪ .‬ميزة أخرى للتمثيل هي أننا يمكننا تحدي==د هيك==ل نم==وذج‬
‫مفصل للغاية‪ ،‬يتم بناؤه على وح=دات ذري==ة‪ .‬إذا نظرن==ا إلى االتجاه==ات الحالي==ة في ص==ناعة‬
‫ألعاب الكمبيوتر‪ ،‬فيمكننا الق==ول أن تكنولوجي==ا الفوكس==الت يمكن أن تك==ون مس==تقباًل محتماًل‬
‫للرسوميات الحاسوبية‪ .‬تأتي هذه االستنتاجات من حقيقة أن الهدف العام لتص==ور الحاس==وب‬
‫في الوقت الحقيقي هو تحقيق نتائج أكثر واقعية ودقة على الشاشة‪ .‬لذلك‪ ،‬فإن عدد المثلث==ات‬
‫المستخدمة يزداد باستمرار وحجمها يصغر‪ .‬هذه عملية تتجه نحو مستوى ذري‪ ،‬وهو ع==الم‬
‫الفوكسالت‪.‬‬
‫في الوقت الحاضر‪ ،‬تسود الحلول في مساحة الشاشة (مثل تع==يين النقش الط==بيعي‪ ،‬وتع==يين‬
‫االحتج==از‪ ،‬وتع==يين االنح==راف) ض==د هياك==ل النم==اذج المعق==دة المعتم==دة على المثلث==ات‪ ،‬ألن‬
‫استخدام خوارزميات مساحة الشاشة الحالي==ة إلض==افة التفاص==يل إلى نم==وذج يك==ون أرخص‬
‫لوحدة معالجة الرسومات من العمل مع ماليين المثلثات‪.‬‬

‫العيب الرئيس==ي لتقني==ة الفوكس==الت يكمن في مجموع==ة البيان==ات الكب==يرة‪ .‬ح==تى الهيك==ل‬
‫النموذجي ذو التفاصيل األقل لديه مجموعة نس =بًيا كب==يرة من الفوكس==الت‪ .‬تتطلب مجموع==ة‬
‫البيانات الكبيرة للنماذج كميات كبيرة من الذاكرة الرئيسية ووحدة معالجة الرسومات‪ ،‬والتي‬
‫تكون محدودة إلى حد ما في حال==ة التص==ور المعتم==د على وح==دة معالج==ة الرس==ومات‪ .‬يجب‬
‫تطوير تقنيات متنوعة‪ ،‬تسمى تقنيات التدفق‪ ،‬للحفاظ على األجزاء المرئي==ة الحالي==ة الممكن==ة‬
‫من العالم االفتراضي في ذاكرة وحدة معالجة الرسومات‪ ،‬ومع ذلك‪ ،‬فهذه التقنية تحت==اج إلى‬
‫معرفة كمبيوتر وتصور معقدة للغاية‪ .‬مشكلة إضافية لمجموع==ة الفوكس==الت هي‪ :‬ألن ع==الم‬
‫الفوكسالت يتضمن عدًد ا كبيًر ا من الفوكس=الت‪ ،‬يجب على أنب==وب الرس=ومات التعام==ل م==ع‬
‫مجموعات بيان==ات كب==يرة خالل التح==والت المختلف==ة‪ .‬نظ==ًر ا ألن ك==ل دورة لوح==دة المعالج==ة‬
‫المركزية أو وح==دة معالج==ة الرس==ومات تحتس==ب‪ ،‬ف==إن ه==ذه الخاص==ية له==ا ت==أثير كب==ير على‬
‫األداء‪ .‬ال تدعم أجهزة الرسومات الحالية مباشرة التصور المعتم==د على الفوكس==الت‪ .‬هن==اك‬
‫بعض االتجاهات التي ظهرت‪ ،‬تعتمد أساًس ا على الحلول المعتم==دة على األش==عة‪ ،‬ولكن ليس‬
‫هناك اتجاه‪/‬أنبوب مدعوم رسمًيا من قب==ل مص==نعي وح==دات معالج==ة الرس==ومات وواجه==ات‬
‫برمج===ة التطبيق===ات الرس===ومية (‪ )OpenGL، DirectX‬مث===ل الحل===ول المعتم===دة على‬
‫البوليجون===ات‪ .‬باس===تخدام البوليجون===ات‪ ،‬يكفي تحدي===د مجموع===ة من النق===اط‪ ،‬والنقش===ات‪،‬‬
‫وخصائص الكائن‪ ،‬ويمكن لوحدة معالج=ة الرس=ومات تص=ور البيان=ات بش=كل ش=به مباش=ر‪.‬‬
‫لتصور مجموعة الفوكسالت باستخدام وحدة معالجة الرس==ومات‪ ،‬يجب ع==ادًة على الم==برمج‬
‫تطوير تقنية مخصصة باستخدام محاكيات معقدة أحياًن ا‪ .‬حالًيا‪ ،‬تقدم شركة ‪ NVidia‬محرًك ا‬
‫لتتبع األشعة يسمى ‪ ،Optix‬الذي يمكنه تنفيذ تتبع األشعة على وح==دات معالج==ة الرس==ومات‬
‫الخاص==ة بهم‪ .‬ولكن نظ==ًر ا ألن==ه ليس م==دعوًما رس=مًيا من قب==ل واجه==ات برمج==ة التطبيق==ات‬
‫ لن تستخدم صناعة ألع==اب الكم==بيوتر ه==ذه‬.‫ فإن إمكانيات تطبيقه محدودة‬،‫الرسومية الشائعة‬
)OpenGL، DirectX( ‫التقنية حتى تصبح جزًءا من واجهات برمجة التطبيق==ات الرس==مية‬
.‫ومدعومة بشكل متساٍو على جميع وحدات معالجة الرسومات الحديثة‬

‫ تم تط=وير العدي=د من‬،‫ في الواق=ع‬.‫تمثي=ل مجموع=ة الفوكس=الت غ=ير ت=ابع لعملي=ة الع=رض‬
‫ يستعرض هذا البحث النهج األكثر أهمية ويقدم أيًض ا حًال مبس==ًط ا‬.‫خوارزميات تقديم الحجم‬
.‫معتمًد ا على البرمجيات‬

3.1. Cube based approach


This approach is the easiest, we might say the naive approach to display voxel
sets. During the visualization, all elements of the voxel set is represented
by a three-dimensional cube on the screen. The size of the cube is usually
predetermined. Although it is a simple technique, it is fairly popular in today
computer games (e.g. Minecraft, FEZ, Stonehearth, Voxatron etc). There are
several reasons for this: the visualization model is simple, easy to understand
and the results are cubic having retro impressions.
Although the model seems to be simple, because basically every cube is speci-
fied by a specific color, in practice, displaying larger models (millions of cubes)
cause many serious problems to the GPU due the high number of polygons.
As typical example, the shadow creations process can be mentioned. If we
use the popular shadow mapping technique, the models need to be renderer in
multiple passes. Handling point lights are even more complex, because cubemap is required to store
the 6 depth textures in case of only one light. The
another approach, shadow volume has also problem with large data sets: this
algorithm builds a coherent polygon mesh in real time from the world vertices
which are visible from the light perspective. In order to achieve a reasonable
frame rate, a number of additional optimization process (e.g. Space partitioning, Occlusion Culling,
Ordering objects by z coordinate etc) should be
introduced, which makes this technique also complex at the professional level.

‫ النهج المعتمد على المكعبات‬.3.1

‫ يتم تمثيل‬،‫ خالل عملية التصور‬.‫ يمكننا أن نقول إنه النهج الساذج لعرض مجموعات الفوكسالت‬،‫هذا النهج هو األسهل‬
‫ على الرغم من‬.‫ يتم تحديد حجم المكعب عادة مسبًقا‬.‫جميع عناصر مجموعة الفوكسالت بمكعب ثالثي األبعاد على الشاشة‬
Minecraft، FEZ، Stonehearth، ‫ إال أنها شائعة إلى حد كبير في ألعاب الكمبيوتر الحديثة (مثل‬،‫أنها تقنية بسيطة‬
‫ يعتبر نموذج التصور بسيًطا وسهل الفهم والنتائج تكون مكعبية وتثير‬:‫ هناك عدة أسباب لذلك‬.)‫ وغيرها‬Voxatron
.‫االنطباعات الرجعية‬

‫ يتسبب عرض النماذج‬،‫ بما أن كل مكعب يتم تحديده بلون محدد‬،‫ إال أنه في الواقع‬،‫على الرغم من أن النموذج يبدو بسيًط ا‬
.‫الكبيرة (ماليين المكعبات) في العديد من المشاكل الخطيرة لوحدة معالجة الرسومات بسبب العدد الكبير من البوليجونات‬
‫كمثال نموذجي‪ ،‬يمكن ذكر عملية إنشاء الظالل‪ .‬إذا استخدمنا تقنية تخطيط الظالل الشهيرة‪ ،‬يجب على النماذج أن تتم‬
‫تقديمها في عدة مراحل‪ .‬معالجة الضوء النقطي أكثر تعقيًدا‪ ،‬ألنه يتطلب تخزين خريطة المكعب لتخزين ‪ 6‬نسقات عمق في‬
‫حالة الضوء الواحد‪ .‬النهج اآلخر‪ ،‬حجم الظل‪ ،‬لديه أيًض ا مشكلة مع مجموعات البيانات الكبيرة‪ :‬يقوم هذا الخوارزمية ببناء‬
‫شبكة مضلع متماسكة في الوقت الحقيقي من النقاط العالمية التي يمكن رؤيتها من منظور الضوء‪ .‬من أجل تحقيق معدل‬
‫إطار معقول‪ ،‬يجب أن يتم إدخال عدد من عمليات األمثلة اإلضافية (مثل تقسيم الفضاء‪ ،‬إلغاء الحجب‪ ،‬ترتيب الكائنات‬
‫حسب اإلحداثيات ‪ z‬الخ)‪ ،‬مما يجعل هذه التقنية معقدة أيًض ا على المستوى المهني‬

‫‪3.2. Ray based solutions‬‬

‫‪An another popular rasterization form of a voxel-based world are the ray-based approaches.‬‬
‫‪A simplified variant (Wave surfing algorithm-2D raycasting) of this technique has already‬‬
‫‪been developed and used in early computer games (Comanche, Wolfeinstein, Delta Force,‬‬
‫‪Armored Fist, Outcast etc) and medical diagnostic procedures. The main idea behind these‬‬
‫‪approaches is that the rasterization problems and the hidden surface determination are solved‬‬
‫‪independently by pixel to pixel. The algorithm casts rays through the render target (e.g. the‬‬
‫‪screen) pixels to the virtual space, then it recursively examines their traversal, collision points‬‬
‫‪and features. The big advantage of the procedure lies in its simplicity. The algorithm can‬‬
‫”‪solve numerous visualization problem, which are able to be achieved with current “forward‬‬
‫”‪and “deferred‬‬

‫‪ .3.2‬الحلول المعتمدة على األشعة‬

‫أشكال أخرى شائعة من تقديم عالم معتمد على الفوكسالت هي النهج المعتمد على األشعة‪ .‬تم تطوير واحدة من النسخ‬
‫المبسطة (خوارزمية ركوب الموجة ‪ -‬اإللقاء الشعاعي ثنائي األبعاد) لهذه التقنية بالفعل واستخدامها في ألعاب الكمبيوتر‬
‫األولية (‪ Comanche، Wolfeinstein، Delta Force، Armored Fist، Outcast‬إلخ) واإلجراءات التشخيصية‬
‫الطبية‪ .‬الفكرة الرئيسية وراء هذه النهج هي حل مشاكل التقديم وتحديد السطح المخفي بشكل مستقل بيكسل بيكسل‪ .‬يلقي‬
‫الخوارزمية أشعة من خالل بكسالت هدف التقديم (مثل الشاشة) إلى الفضاء االفتراضي‪ ،‬ثم يفحصها بشكل متكرر بالمرور‬
‫عبرها‪ ،‬ونقاط التصادم‪ ،‬والميزات‪ .‬الميزة الكبيرة لهذه اإلجراءات تكمن في بساطتها‪ .‬يمكن للخوارزمية حل العديد من‬
‫مشاكل التصور‪ ،‬التي يمكن تحقيقها باستخدام التقديم الحالي "المباشر" و "المؤجل"‪.‬‬

‫)‪ Voxatron‬لعبة( مثال على تصور فوكسالت معتمد على المكعبات ‪Fig. 1.‬‬

‫‪4.1. The square based approach‬‬


‫‪To describe the approach of the simplified voxel renderer, let start from the‬‬
‫‪logic of the displaying process. A voxel is a three-dimensional unit, its rasterisation generally requires‬‬
‫‪a two-dimensional mathematical projection, where‬‬
‫‪the corresponding pixels should be determined in function of the voxel color‬‬
‫‪and size. However the question arises, that if the voxel is mapped to the twodimensional space‬‬
‫‪anyway, why bother the three-dimensional extent? Can the‬‬
‫?‪extent of the voxel be modeled in two dimensions only‬‬
‫‪We can apply a simple square based mapping to solve the problem. This‬‬
‫‪technique allows to visualize small voxel sets well in real time under certain‬‬
‫‪compromises. The following figure shows this simple mapping:‬‬

‫المقاربة القائمة على المكعبات‬

‫تعد هذه المقاربة األسهل‪ ،‬ويمكن أن نقول إنها المقاربة البدائية لعرض مجموعات الفوكسل‪ .‬خالل عملية التصور‪ ،‬يتم‬
‫تمثيل جميع عناصر مجموعة الفوكسل بمكعب ثالثي األبعاد على الشاشة‪ .‬عادًة ما يكون حجم المكعب محدًدا مسبًقا‪ .‬وعلى‬
‫الرغم من أنها تقنية بسيطة‪ ،‬إال أنها شائعة للغاية في ألعاب الكمبيوتر اليوم (مثل ‪Minecraft، FEZ، Stonehearth،‬‬
‫‪ ، Voxatron‬إلخ)‪ .‬هناك عدة أسباب لذلك‪ :‬نموذج التصور بسيط‪ ،‬سهل الفهم‪ ،‬والنتائج تكون مكعبة مما يترك انطباعات‬
‫رجعية‪.‬‬

‫على الرغم من أن النموذج يبدو بسيًطا‪ ،‬حيث يتم تحديد كل مكعب بلون محدد‪ ،‬إال أن عرض النماذج الكبيرة (ماليين‬
‫المكعبات) يسبب العديد من المشاكل الجادة لوحدة معالجة الرسومات (‪ )GPU‬بسبب العدد الكبير من المضلعات‪ .‬كمثال‬
‫نموذجي‪ ،‬يمكن اإلشارة إلى عملية إنشاء الظالل‪ .‬إذا استخدمنا تقنية تظليل الظالل الشعبية‪ ،‬فستحتاج النماذج إلى أن يتم‬
‫عرضها في عدة مرات‪ .‬معالجة األضواء النقاطية تكون أكثر تعقيًدا‪ ،‬ألنه يلزم استخدام مكعب خريطة لتخزين ‪ 6‬نسيجيات‬
‫عمق في حالة وجود ضوء واحد فقط‪.‬‬

‫نهج آخر‪ ،‬حجم الظل‪ ،‬يواجه أيًض ا مشاكل مع مجموعات البيانات الكبيرة‪ :‬هذا الخوارزمية تبني شبكة مضلعات متماسكة‬
‫في الوقت الحقيقي من رؤوس العالم التي تكون مرئية من منظور الضوء‪ .‬من أجل تحقيق معدل إطارات معقول‪ ،‬يجب‬
‫تقديم عدد من عمليات التحسين اإلضافية (مثل تقسيم الفضاء‪ ،‬إزالة االنسداد‪ ،‬ترتيب األجسام بحسب إحداثيات ‪ ،z‬إلخ)‪ ،‬مما‬
‫يجعل هذه التقنية أيًض ا معقدة على المستوى االحترافي‬

‫الصورة تظهر تصويًر ا مكبًر ا لتعيين ‪ 4‬فوكسالت‪ .‬فوكسلين متجاورين وفوكسلين موجودين خلفهم‪.‬‬

‫خالل عملية العرض‪ ،‬يتم تمثيل الفوكسالت على شكل "بالطات" ملونة (مربع‪/‬مستطيل) بحجم محدد مسبًق ا‪ .‬لون البالطة هو اللون‬
‫الذي يتم تحديده بواسطة الفوكسل‪ .‬الفارق في االتجاهات ‪ x‬و ‪ y‬بين الصفين هو ميزة طبيعية للتصوير ثالثي األبعاد‪ .‬في المثال‬
‫أعاله‪ ،‬يتم تموضع الصف األول في األمام في الفضاء والنموذج ليس موضوًع ا في المنطلق األصلي‪.‬‬
‫ُتظهر الشكل رقم ‪ 6‬نموذجين‪ ،‬حيث يظهر النموذج األول مرتين بقيم ‪ z‬مختلفة‪ .‬يمكن رؤية أنه عند مشاهدة شكل الحصان من مسافة‬
‫بعيدة يمكننا الحصول على نتيجة مرضية‪ ،‬ولكن إذا كانت النظرة من أقرب فإن سمات التمثيل المستطيلة تظهر‪ .‬يمكن التخلص من‬
‫مستوى الزوايا عن طريق ضبط كثافة الفوكسل وحجمها‪ .‬ومع ذلك‪ ،‬قد يزداد وقت العرض بشكل كبير‪ ،‬كما يوضح عرض النماذج‬
‫الثانية‪ .‬يتكون نموذج علبة اإلسعاف من ‪ 1،548،288‬فوكسل بوضوح الجودة البصرية أفضل بكثير‪ ،‬ولكن في حين تم قياس ‪355‬‬
‫إطاًر ا في الثانية في نموذج الحصان (‪ 49،152‬فوكسل)‪ ،‬فإن األداء انخفض إلى ‪ 63‬إطاًر ا في الثانية (بدون تحسين) في حالة‬
‫عرض علبة اإلسعاف‪ .‬لهذا السبب‪ُ ،‬ت خصص هذه الطريقة بشكل رئيسي لعرض النماذج الصغيرة في الوقت الحقيقي بعيدًا عن‬
‫الكاميرا‪.‬‬

‫”‪So, during the displaying process, voxels are represented as painted “tiles‬‬
‫‪(square/rectangle) with predetermined size. The color of the tile is the color‬‬
‫‪determined by the voxel. The difference in x and y directions between the two‬‬
‫‪rows is a natural feature of three-dimensional mapping. In the above example,‬‬
‫‪the first row is located ahead in the space and the model isn’t positioned in‬‬
‫‪the origo.‬‬

‫مجال تصور الحاسوب مهيمن عليه تمثيالت النماذج المبنية على المضلعات‪ .‬قامت شركات تصنيع األجهزة الرسومية بتطوير‬
‫وحدات معالجة الرسوميات الخاصة بها استناًد ا إلى هذا النهج‪ .‬تقنية الفوكسل كانت موجودة من البداية‪ ،‬ولكنها بدأت تظهر فقط في‬
‫السنوات األخيرة بسبب أداء الحواسيب المتزايد‪ .‬الطريقة المقدمة في هذه الورقة تحاول سد الفجوة في مجال خوارزميات عرض‬
‫الفوكسل الشائعة‪ ،‬مما يسمح بعرض سريع لمجموعات الفوكسل الصغيرة تحت تنازالت مرئية معينة‪ .‬الحل ال يمكن أن ينافس أداء‬
‫التصور المبني على المضلعات‪ ،‬ومع ذلك‪ ،‬بفضل الخصائص المفيدة لعملية التفويكسل‪ ،‬يمكن تطبيقه بشكل جيد في مجاالت معينة‪.‬‬
‫مثال جيد على ذلك هو عندما يجمع محرك الرسومات بين الحلول القائمة على الفوكسل والتصور المبني على المضلعات‪ ،‬مما يفتح‬
‫‪.‬الطريق أمام تقنية عرض مختلطة حديثة‬

You might also like