# Introduction

## &#x20;The concept behind Vape3D

&#x20;Vape3D is a 3D graphics engine utilizing the techniques for **3D polygon rendering**, in contrast to far superior techniques such as **raytracing**, and **raycasting**, which are way better performant.

{% hint style="warning" %}
In 3D polygon rendering, the area that is in view of the camera is calculated, and then rays are created from every part of every surface in view of the camera and traced back to the camera.
{% endhint %}

In fact, this is not an engine to build and run the next-gen MMO simulation or your dreamt open-world RPG on, but a learning framework to provide with general knowledge of building game and graphics engine systems and components by giving up on the too complex concepts and going with hand-picked and designed solutions that are easy to grasp from first look.

&#x20;This can serve as a ground for major improvements and can be turned into a professional product after one understands the general concept of how everything is connected and works.

{% hint style="info" %}
Before getting to know more about the engine and how it works it is a good idea to have a quick reminder of what is the graphics or rendering pipeline and how does it work. Just briefly...\
Feel free to skip to the next page if that is not something you need to revise or you're in rush.
{% endhint %}

## Intro to the rendering pipeline

{% hint style="warning" %}
The rendering pipeline or graphics pipeline is not a complicated term with a purpose of confusing you. In fact it is much simpler to understand than it sounds.
{% endhint %}

Generally speaking, the **graphics pipeline** is just a conceptual model, a very important such that describes what steps a graphics system needs to perform to render a graphical scene in ether 2D or 3D. That is what we have to know on a high level when thinking about the pipeline but it is built of several stages or so called pipeline steps. ***Described below.***

## &#x20;High-level structure of the pipeline

### Application

The application step is executed by the software on the CPU, thus - highly parallelizable! Example tasks could be collision detection, animation, morphing, etc.

### Geometry

The geometry step, which is responsible for the majority of the operations with polygons and their vertices. OpenGL splits it into 5 parallel pipeline steps: Model & Camera transformation, Lightning, Projection, Clipping, Window-viewport transformation.

### Rasterization

This is a rendering algorithm for generating 2D images from 3D scenes. It transforms geometric primitives such as lines and polygons into raster image representations, i.e. pixels.

{% hint style="info" %}
Now that is enough for moving on to the explanation of what Vape3D can be used for.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vape-docs.gitbook.io/vape3d-docs/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
