تبلیغات :
ماهان سرور
آکوستیک ، فوم شانه تخم مرغی ، پنل صداگیر ، یونولیت
دستگاه جوجه کشی حرفه ای
فروش آنلاین لباس کودک
خرید فالوور ایرانی
خرید فالوور اینستاگرام
خرید ممبر تلگرام

[ + افزودن آگهی متنی جدید ]




صفحه 1 از 2 12 آخرآخر
نمايش نتايج 1 به 10 از 14

نام تاپيک: اناتومی انجین بازی سازی

  1. #1
    آخر فروم باز
    تاريخ عضويت
    Dec 2008
    محل سكونت
    مازندران
    پست ها
    1,290

    پيش فرض اناتومی یک انجین بازی سازی

    سلام

    گفتیم یه کمی توی کارمون تنوع بدیم . حالا می خوام یه سری مقاله راجب اناتومی ساخت یک انجین بازی رایانه ای بهتون بدم که واسه کسایی که می خوان توی این کار باشن می تونه خیلی مفید باشه .
    درضمن چون دارم هم زمان از چند منبع ترجمه می کنم شاید این طول بکشه چون هم باید مفاهیم رو درست و ساده کنم هم باید خوب ترجمه کنم . فعلا بعد از هر 10 خط این رو اپدیت می کنم تا تموم بشه .
    ------------------------------------------------------------------------------------------------------------------

    ما راه بسیار زیادی را از زمانی که Doom بازی میکردیم تا اینجا طی کرده ایم .اما ایا پیشگامی آن بازی ها در زمان خودشان فقط فقط مربوط به بازی بودن انها میشد؟ در ان زمان ها ابزار ها یا همان انجین های بازی سازی نیز در کار بودند که توانستند به موفقیت ان سری از بازی های کمک بسیار زیادی بکنند.

    از ابتدا شروع می کنیم

    بنابراین برای شروع کردن ابتدا باید درباره تفاوت انجین ها و تکنولوژی های به کار رفته در انها صحبت کنیم . بیشتر مردم گیم انجین را با محتوای داخلی یک بازی اشتباه میگیرند.حتی آن دسته از مردم این موضوع را قیاسی در مورد موتور ماشین ها یا ساختمان یک ماشین می پندارند .شما می توانید موتور یک ماشین را برداشته و با استفاده از آن قطعاتی دیگر را بسازید و دوباره از آن استفاده کنید.پروسه یک بازی هم تقریبا شبیه همچین موردی است . یک انجین نیز می تواند تمامی ابزار ها و تکنولوژی های غیر بازی را برای ساخت یک محصول جدید در کنار هم جمع اوری کند .
    ((ویکی پدیا)
    موتور بازی مجموعه ای از ابزار توسعه دیداری علاوه بر مؤلفه‌های نرم‌افزاری با قابلیت استفاده مجدد را ارائه می دهد. این ابزارها معمولاً در یک محیط توسعه یکپارچه ارائه می شوند تا توسعه بازیها را با یک با رویکرد مبتنی بر داده ساده تر و سریع تر انجام دهند. موتورهای بازی را گاهی اوقات میان افزار بازی زیرا از نقطه نظر تجاری این اصطلاح، آنها یک سکوی نرم‌افزاری منعطف و قابل استفاده مجدد را ارائه می کنند که تمام کاربردهای موردنیاز را فراهم می آورند تا درحالیکه هزینه ها، پیچیدگی‌ها و زمان ارائه با بازار - که همگی این عوامل در صنعت رقابتی بازی‌های کامپیوتری حیاتی می باشند - کم می کند، توسعه و تولید بازی‌ها را امکان پذیر سازد.
    تمامی بخش های یک بازی از یک سری محتوا مانند (انیمیشن ها . مدل ها . صدا ها . هوش مصنوعی و فیزیک ها) تشکیل شده اند که اینها را دارایی ها یا همان Asset های بازی می نامند. در اینجا ابزاری برای ساخت یک بازی نیاز است تا بتواند تمامی این موارد را کنترل و در کنار یکدیگر قرار دهد .
    برای نمونه ابتدا به ساختار یکی از بازی های معروف دنیا یعنی بازی Quake's نگاهی می اندازیم .



    ساختار این گیم انجین را می توان در 11 بخش تقسیم بندی کرد . بله درسته 11 بخش . اکنون زمان آن رسیده که ما اولین بخش را مشاهده کنیم

    Render



    چه دلیلی وجود دارد که Render اینقدر مهم است؟ این مورد بسیار واضح میباشد . بدن آن ما هیچ چیزی نمی توانیم ببینیم .

    این قسمت , بخش ها و اجزای بصری را برای بازیکن ترسیم می کند. بنابراین ناظر یا بازیکن می تواند تصمیم بگیرد که چه چیزی در صحنه نمایش داده شود.
    عموماRender اولین چیزی است که یک سازنده انجین ان را می سازد . در اینجا اگر این وجود نداشته باشد شما از کجا می خواهید متوجه شوید که کد ها و فرمان های شما در صحنه در حال انجام شدن هستند ؟
    یک رندر می تواند تا 50 درصد از منابع Cpu را به خود اختصاص دهد. این امر بسیار مهمی است که سازندگان بازی همیشه در ان سعی می کنند تا کمترین بار پردازشی را بر Cpu تحمیل و بیشترین کیفیت را از ان داشته با شند . بدون یک رندر خوب یک بازی به احتمال بسیار زیاد شکست خواهد خورد .
    کارکردن با پیکسل ها امروزه با استفاده از کارت های گرافیکی سه بعدی امکان پذیر شده است .
    در یک تعریف عمومی وظیفه رندر جمع اوری تمامی اجزای بصری بازی برای نمایش به کاربر میباشد . بهینه سازی این موضوع بسیار بسیار حیاتی است . به دلیل انکه در اثر قرار گرفتن عملیات و محاسبات سه بعدی در چرخه پهنای باند حافظه امکان درگیر شدن تمامی حافظه وجود خواهد داشت و در این حالت امکان متوقف شدن این چرخه وجود خواهد داشت.
    Last edited by silsin; 12-05-2011 at 12:16.


  2. #2
    آخر فروم باز
    تاريخ عضويت
    Dec 2008
    محل سكونت
    مازندران
    پست ها
    1,290

    پيش فرض

    با نظر دوستان تمامی متون رو اینجا میزارم .

    پارت یک قسمت سوم . ((دوتای قبلش بالا ترجمه شدن))

    -------------------------
    Creating the 3D World

    Recently I had a conversation with someone who has been in the computer graphics biz for years, and she confided with me that the first time she saw a 3D computer image being manipulated in real time she had no idea how it was done, and how the computer was able to store a 3D image. This is likely true for the average person on the street today, even if they play PC, console, or arcade games frequently. We'll discuss some of the details of creating a 3D world from a game designers perspective below, but you should also read [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] 's three-part [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] for a structured overview of all the main processes involved in generating a 3D image.



    3D objects are stored as points in the 3D world (called vertices), with a relation to each other, so that the computer knows to draw lines or filled surfaces between these points in the world. So a box would have 8 points, one for each of the corners. There are 6 surfaces for the box, one for each of the sides it would have. This is pretty much the basis of how 3D objects are stored. When you start getting down to some of the more complicated 3D stuff, like a Quake level for example, you are talking about thousands of vertices (sometimes hundreds of thousands), and thousands of polygonal surfaces. See the above graphic for a wireframe representation. Essentially though, it relates to the box example above, only with lots and lots of small polygons to make up complicated scenes.
    How models and worlds are stored is a part of the function of the renderer, more than it is part of the application / game. The game logic doesn't need to know how objects are represented in memory, or how the renderer is going to go about displaying them. The game simply needs to know that the renderer is going to represent objects using the correct view, and displaying the correct models in their correct frames of animation.
    In a good engine, it should be possible to completely replace the renderer with a new one, and not touch a line of game code. Many cross-platform engines, such as the Unreal engine, and many homegrown console engines do just that—for example, the renderer model for the GameCube version of the game can be replaced, and off you go.
    Back to internal representation-- there's more than one way to represent points in space in computer memory beyond using a coordinate system. You can do it mathematically, using an equation to describe straight or curved lines, and derive polygons, which pretty much all 3D cards use as their final rendering primitive. A primitive is the lowest rendering unit you can use on any card, which for almost all hardware now is a three-point polygon (triangle). The newer nVidia and ATI cards do allow you render mathematically (called higher-order surfaces), but since this isn't standard across all graphics cards, you can't depend on it as a rendering strategy just yet. This is usually somewhat expensive from a processing perspective, but it's often the basis for new and experimental technologies, such as terrain rendering or making hard-edged objects have softer edges. We'll define these higher-order surfaces a little more in the patches section below.

    Last edited by silsin; 13-05-2011 at 09:22.

  3. 2 کاربر از silsin بخاطر این مطلب مفید تشکر کرده اند


  4. #3
    آخر فروم باز
    تاريخ عضويت
    Dec 2008
    محل سكونت
    مازندران
    پست ها
    1,290

    پيش فرض

    Culling Overview

    Here's the problem. I have a world described in several hundred thousand vertices / polygons. I have a first person view that's located on one side of our 3D world. In this view are some of the world's polygons, though others are not visible, because some object or objects, like a visible wall, is obscuring them. Even the best game coders can't handle 300,000 triangles in the view on a current 3D card and still maintain 60fps (a key goal). The cards simply can't handle it, so we have to do some coding to remove those polygons that aren't visible before handing them to the card. The process is called culling





    If you don't see it, it isn't there. By culling the non-visible parts of a 3D world, a game engine can reduce its workload considerably. Look at this scene and imagine that there's a room behind the one under construction, but if it's not visible from this vantage point, the other room's geometry and other 3D data can be discarded.
    There are many different approaches to culling. Before we get into that however, let's discuss why the card can't handle super-high polygon counts. I mean, doesn't the latest card handle X million polygons per second? Shouldn't it be able to handle anything? First, you have to understand that there are such things as marketing polygon rates, and then real world polygon rates. Marketing polygon rates are the rates the card can achieve theoretically.
    How many polygons can it handle if they are all on screen, the same texture, and the same size, without the application that's throwing polygons at the card doing anything except throwing polygons at the card. Those are numbers the graphics chip vendors throw at you. However, in real gaming situations the application is often doing lots of other things in the background -- doing the 3D transforms for the polygons, lighting them, moving more textures to the card memory, and so on. Not only do textures get sent to the card, but the details for each polygon too. Some of the newer cards allow you to actually store the model / world geometry details within the card memory itself, but this can be costly in terms of eating up space that textures would normally use, plus you'd better be sure you are using those model vertexes every frame, or you are just wasting space on the card. But we're digressing here. The key point is that what you read on the side of the box isn't necessarily what you would get when actually using the card, and this is especially true if you have a slow CPU, or insufficient memory.

    Last edited by silsin; 13-05-2011 at 09:24.

  5. 2 کاربر از silsin بخاطر این مطلب مفید تشکر کرده اند


  6. #4
    داره خودمونی میشه prince 0f persia's Avatar
    تاريخ عضويت
    Jan 2008
    محل سكونت
    رشت
    پست ها
    67

    پيش فرض

    من برای کمک آماده ام.

  7. این کاربر از prince 0f persia بخاطر این مطلب مفید تشکر کرده است


  8. #5
    آخر فروم باز
    تاريخ عضويت
    Dec 2008
    محل سكونت
    مازندران
    پست ها
    1,290

    پيش فرض

    Basic Culling Methods

    The simplest approach to culling is to divide the world up into sections, with each section having a list of other sections that can be seen. That way you only display what's possible to be seen from any given point. How you create the list of possible view sections is the tricky bit. Again, there are many ways to do this, using BSP trees, Portals and so on.
    I'm sure you've heard the term BSP used when talking about Doom or Quake. It stands for Binary Space Partitioning. This is a way of dividing up the world into small sections, and organizing the world polygons such that it's easy to determine what's visible and what's not -- handy for software based renderers that don't want to be doing too much overdrawing. It also has the effect of telling you where you are in the world in a very efficient fashion.
    [

    A Portal based engine (first really brought to the gaming world by the defunct project Prey from 3D Realms) is one where each area (or room) is built as its own model, with doors (or portals) in each section that can view another section. The renderer renders each section individually as separate scenes. At least that's the theory. Suffice to say this is a required part of any renderer and is more often than not of great importance. Some of these techniques fall under the heading of "occlusion culling", but all of them have the same intent: eliminate unnecessary work early.

    For an FPS (first-person shooter game) where there are often a lot of triangles in view, and the player assumes control of the view, it's imperative that the triangles that can't be seen be discarded, or culled. The same holds true for space simulations, where you can see for a long, long way -- culling out stuff beyond the visual range is very important. For games where the view is controlled -- like an RTS (real-time strategy game)-- this is usually a lot easier to implement. Often this part of the renderer is still in software, and not handed off to the card, but it's pretty much only a matter of time before the card will do it for you.
    Last edited by silsin; 13-05-2011 at 09:25.

  9. این کاربر از silsin بخاطر این مطلب مفید تشکر کرده است


  10. #6
    داره خودمونی میشه prince 0f persia's Avatar
    تاريخ عضويت
    Jan 2008
    محل سكونت
    رشت
    پست ها
    67

    پيش فرض

    من احساس می کنم بعضی مطالبش قدیمیه شاید برای دوستان جالب نباشه. بخصوص این که مطلب برای سال 2002 هست.

  11. #7
    آخر فروم باز
    تاريخ عضويت
    Dec 2008
    محل سكونت
    مازندران
    پست ها
    1,290

    پيش فرض

    Basic Graphics Pipeline Flow

    A simple example of a graphics pipeline from game to rendered polygons might flow something like this:

    • Game determines what objects are in the game, what models they have, what textures they use, what animation frame they might be on, and where they are located in the game world. The game also determines where the camera is located and the direction it's pointed.
    • Game passes this information to the renderer. In the case of models, the renderer might first look at the size of the model, and where the camera is located, and then determine if the model is onscreen at all, or to the left of the observer (camera view), behind the observer, or so far in the distance it wouldn't be visible. It might even use some form of world determination to work out if the model is visible (see next item).
    • The world visualization system determines where in the world the camera is located, and what sections / polygons of the world are visible from the camera viewpoint. This can be done many ways, from a brute force method of splitting the world up into sections and having a straight "I can see sections AB&C from section D" for each part, to the more elegant BSP (binary space partitioned) worlds. All the polygons that pass these culling tests get passed to the polygon renderer.
    • For each polygon that is passed into the renderer, the renderer transforms the polygon according to both local math (i.e. is the model animating) and world math (where is it in relation to the camera?), and then examines the polygon to determine if it is back-faced (i.e. facing away from the camera) or not. Those that are back-faced are discarded. Those that are not are lit, according to whatever lights the renderer finds in the vicinity. The renderer then looks at what texture(s) this polygon uses and ensures the API/graphics card is using that texture as its rendering base. At this point the polygons are fed off to the rendering API and then onto the card.

    Obviously this is very simplistic, but you get the idea. The following chart is excerpted from Dave Salvator's 3D pipeline story, and gives you some more specifics:
    3D Pipeline - High-Level Overview 1. Application/Scene


    • Scene/Geometry database traversal
    • Movement of objects, and aiming and movement of view camera
    • Animated movement of object models
    • Description of the contents of the 3D world
    • Object Visibility Check including possible Occlusion Culling
    • Select Level of Detail (LOD)

    2. Geometry


    • Transforms (rotation, translation, scaling)
    • Transform from Model Space to World Space (Direct3D)
    • Transform from World Space to View Space
    • View Projection
    • Trivial Accept/Reject Culling
    • Back-Face Culling (can also be done later in Screen Space)




    • Lighting
    • Perspective Divide - Transform to Clip Space
    • Clipping
    • Transform to Screen Space

    3. Triangle Setup


    • Back-face Culling (or can be done in view space before lighting)
    • Slope/Delta Calculations
    • Scan-Line Conversion

    4. Rendering / Rasterization


    • Shading
    • Texturing
    • Fog
    • Alpha Translucency Tests
    • Depth Buffering
    • Antialiasing (optional)
    • Display



    Usually you would feed all the polygons into some sort of list, and then sort this list according to texture (so you only feed the texture to the card once, rather than per polygon), and so on. It used to be that polygons would be sorted using distance from the camera, and those farthest away rendered first, but these days, with the advent of Z buffering that is less important. Except of course, for those polygons that have transparency in them. These have to be rendered after all the non translucent polygons are done, so that what's behind them can show up correctly in the scene. Of course, given that, you'd have to render these polygons back-to-front as a matter of course. But often in any given FPS scene there generally aren't too many of transparent polys. It might look like there are, but actually in comparison to those polygons that don't have alpha in them, it's a pretty low percentage.
    Once the application hands the scene off to the API, the API in turn can take advantage of hardware-accelerated transform and lighting (T&L), which is now commonplace in 3D cards. Without going into an explanation of the matrix math involved (see [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ] ), transforms allow the 3D card to render the polygons of whatever you are trying to draw at the correct angle and at the correct place in the world relative to where your camera happens to be pointing at any given moment.
    There are a lot of calculations done for each point, or vertex, including clipping operations to determine if any given polygon is actually viewable, due to it being off screen or partially on screen. Lighting operations work out how bright textures' colors need to be, depending on how light in the world falls on this vertex, and from what angle. In the past, the CPU handled these calculations, but now current-generation graphics hardware can do it for you, which means your CPU can go off and do other stuff. Obviously this is a Good Thing(tm), but since you can't depend on all 3D cards out there having T&L on board, you will have to write all these routines yourself anyway (again speaking from a game developer perspective). You'll see the "Good Thing(tm)" phrase throughout various segments of this story. These are features I think make very useful contributions to making games look better. Not surprisingly, you'll also see its opposite; you guessed it, a Bad Thing(tm) as well. I'm getting these phrases copyrighted, but for a small fee you can still use them too.
    Last edited by silsin; 13-05-2011 at 09:26.

  12. 2 کاربر از silsin بخاطر این مطلب مفید تشکر کرده اند


  13. #8
    داره خودمونی میشه prince 0f persia's Avatar
    تاريخ عضويت
    Jan 2008
    محل سكونت
    رشت
    پست ها
    67

    پيش فرض

    من اونقدرا تو قسمت فنی تخصص ندارم. ولی به نظرم قسمت 3 بخش Musings on Memory Usage یه کم قدیمی می یاد.

  14. #9
    آخر فروم باز anti-military's Avatar
    تاريخ عضويت
    Aug 2010
    پست ها
    1,415

    پيش فرض

    میخواهی قسمت به قسمت مطالب رو بزار تو تاپیک به صورت انگلیسی که اگه کسی دید قسمتی رو میتونه ترجمه کنه . کسایی هم که خودشون انگلیسی بلدن هم میتونن بخونن هم اگه خواستن ترجمه کنن
    بعدش هم که کامل شد یه جا جمع کن و بزار واسه دانلود و ...

  15. این کاربر از anti-military بخاطر این مطلب مفید تشکر کرده است


  16. #10
    آخر فروم باز
    تاريخ عضويت
    Dec 2008
    محل سكونت
    مازندران
    پست ها
    1,290

    پيش فرض

    ((ترجمه توسط دوست عزیزم Anti military))

    علاوه بر triangle ها patches حالا معمولا بیشتر مورد استفاده قرار میگیرن ! patches ( اسم دیگه higher-order surfaces ) خیلی عالی هستن چون توان توصیف geometry ( معمولا geometry شامل یه سری منحنی ) رو با یه بیان ریاضی سریع تر از لیست کردن تیکه های polygon ها و موقعیت قرارگیریشون تو محیط بازی دارن . از این روش شما میتونید polygon هاتون رو دقیقا بسازید ( و فرم بدید ) , و تصمیم بگیرید دقیقا چه مقدار از polygon هارو از patch میخواهید ببینید . میتونید برای مثال یه pipe توصیف کنید, و بعدش تعداد زیادی نمونه از این pipe رو تو محیط داشته باشید . تو بعضی از اتاق ها جایی که شما قبلا 10,000 تا از polygon ها رو نمایش دادید میتونید بگید OK این pipe فقط میتونه 100 تا polygons داشته باشه ! چون ما قبلا تعداد بسیار بسیار زیادی از polygon ها رو نمایش دادیم و هرچقدر که بیشتر بشه میتونه فریم ریتم رو کاهش بده . اما تو اتاق دیگه ای جایی که فقط 5,000 تا polygon توی دید داریم, شما میتونید بگید, حالا این pipe میتونه 500 تا polygon داشته باشه ! چون هنوز به بودجه نمایش polygon ها برای این فریم نرسیدیم ( فکر کنم منظورش اینه که هنوز جا داریم واسه اضافه کردن Polygon ها !!! ) ابزار خیلی عالی هست , اما بعدش شما مجبورید در درجه اول همه اینها رو رمزگشایی کنید و مش ها رو ایجاد کنید, و اینکار بیهوده نیست ! اینجا یه صرفه جویی واقعی از فرستادن معادلات patch's سرتاسر AGP در برابر فرستادن boatloads از ورتکس های شکل دهنده آبجکت های یکسان صورت میگیره ! SOF2 با یک تنوع در این روش جهت ساخت سیستم terrain مورد استفاده قرار میگیره ...




    در واقع ATI حالا TruForm رو داره, که میتونه یه مدل triangle-based رو بگیره و این مدلو براساس higher-order surfaces برای smooth کردنشون تبدیل کنه . و سپس دوباره تبدیلشون کنه به یک higher triangle-count model ( به صورت retesselation خطاب میشه ) بنابراین سپس مدل برای ادامه پردازش pipeline رو خارج میکنه . در واقع ATI دقیقا قبل از T&L موتورشون یه مرحله رو اضافه کردن که این پردازش رو کنترل کنه. اشکال اینجا کنترل هست که چی اسموت بگیره و چی نگیره ! معمولا برخی از لبه های سخت رو که میخواهید بزارید , مثل دماغ ممکنه نا مناسب و ناجور smooth بشه , هنوز این یه تکنولوژی هوشمندانه هست و من میتونم ببینم که در آینده بیشتر از این تکنولوژی استفاده میشه ...

    این قسمت اول بود --- ما تو آینده توضیحات مقدماتی متریال تو پارت دومو ادامه میدیم با نور پردازی و تکسچرینگ محیط, و بعدش وارد قسمت های عمیق تر بعدی میشیم ...
    Last edited by silsin; 13-05-2011 at 15:42.

  17. 2 کاربر از silsin بخاطر این مطلب مفید تشکر کرده اند


صفحه 1 از 2 12 آخرآخر

Thread Information

Users Browsing this Thread

هم اکنون 1 کاربر در حال مشاهده این تاپیک میباشد. (0 کاربر عضو شده و 1 مهمان)

User Tag List

قوانين ايجاد تاپيک در انجمن

  • شما نمی توانید تاپیک ایحاد کنید
  • شما نمی توانید پاسخی ارسال کنید
  • شما نمی توانید فایل پیوست کنید
  • شما نمی توانید پاسخ خود را ویرایش کنید
  •