<p>Games with the concept of "fog of war" often have a visibility grid to define the state of the fog of war at each location.  Rasterization is sometimes used to modify the fog of war state for specific shapes on the grid.</p>

<p>For instance, using an ability that reveals a circle of the map with a specific radius, or perhaps something that reveals a square.</p>

<p>Not strictly graphics related, but definitely a use of rasterization in modern games, and a technique ive seen used in RTSs.</p>

<p>Other grid based data in games could use rasterization for similar situations.</p>

CC BY-SA 3.0
2016-01-07T13:49:57.700Z
2016-01-10T01:38:35.283Z
2016-01-10T01:38:35.283Z
Alan Wolfe
<p>Rasterization is a huge topic with many parts and I'm no engine programmer, but I'll do my best to give some sort of overview (this will be far from a complete list!). </p>

<p>Some very basic, lowlevel stuff include:</p>

<ul>
<li><strong>Frustrum culling:</strong> throws away everything outside the camera's frustrum (think of it as the viewing area of the camera).</li>
<li><strong>Backface culling:</strong> throw away every polygon not directing to the camera.</li>
<li><strong>Painter's algorithm:</strong> draw objects in order of their distance to the camera, start with objects far away, then go toward to the camera.</li>
</ul>

<p>More advaned stuff used in games include things like:</p>

<ul>
<li><strong>Tesselation</strong>: actually pretty much like LOD (see below), but now the latest DirectX Versions introduced tesselation, which provides automatic mesh division or reduction. This gives huge boost in graphics performance, because you can get polys if you need them and get rid of them if you don't want them any more. </li>
<li><strong>LOD</strong>: A level-of-detail system replaces the mesh of an object based on the distance between object and camera. for example, your character has three meshes: one with 10,000, one whith 5,000 and another with 1,000 polys. if you stay right in front of him, the high resolution mesh (10,000 polys) is shown, if you move away, after 100m the character is replaced by the medium mesh and after another 100m it is replaced by the low resolution mesh. Instead of replacing the mesh you can reduce it, but this would be more complex to code. </li>
<li><strong>binary space partitions</strong>: the space is divided into two volumes. this will be repeated until you reach your goal, e.g. until the space does contain only polys that should be drawn on screen</li>
<li><strong>Portals and cells</strong>: (aka Portal culling) is used in indoor scenes and/or first person shooters. The scene is divided into cells (e.g. rooms of a building) that are connected throw portals (e.g. doors). you can set portals to be open and closed.</li>
</ul>

<p>Assuming you have a basic understanding of the graphics pipeline, I tried to focus on rasterization. you may also take a look at lighting and shading or other stuff..</p>

<p>These include just a few possible technologies to include into your project. since i have not enough reputation on stackexchange, I cannot provide many links, but you'll find all that stuff in google :)</p>

CC BY-SA 3.0
2016-01-07T12:42:47.580Z
The question is about software (read: CPU) rasterization. Some of the information you gave are about rasterization in general, some techniques - in my book - have nothing to do with rasterization at all. Could you please clarify in your answer how the techniques use or benefit from software rasterization?
David Kuri
CC BY-SA 3.0
2016-01-07T12:26:55.137Z
2016-01-07T12:26:55.137Z
Micha Grandel
<p>To my knowledge, <a href="https://software.intel.com/en-us/articles/software-occlusion-culling" rel="noreferrer">Software Occlusion Culling</a> (which you already mentioned), is pretty much the only thing a software rasterizer would still be used for. <a href="http://procworld.blogspot.fr/2015/08/voxel-occlusion.html" rel="noreferrer">Procworld</a> makes use of a similar technique to display its huge voxel environments.</p>

<p>Most other culling methods like frustum culling do work on the CPU, but, to stick with the example, the test against the frustum happens on object level, probably with an axis-aligned bounding box (AABB). This intersection test is way simpler than using a full-blown software rasterizer.</p>

<p>In certain cases, software rasterization could be used for mouse picking of objects. In game engines, this is often solved using a physics engine and ray-triangle collision with a simplified mesh.</p>

<p>With the CPU being idle while waiting for the GPU in modern interactive 3D applications, one could think that it might be beneficial to use these idle cycles to render on the CPU using a software rasterizer. The problem here, besides the rendering getting horribly complex and convoluted, will often be the bandwidth. Images rendered on the CPU need to be transferred to the GPU before getting displayed, which might cancel out the benefit.</p>

CC BY-SA 3.0
2016-01-07T13:09:28.180Z
2016-01-07T13:09:28.180Z
David Kuri
<p>I am taking a Computer Graphics course this quarter.
One of our lab project is about software rasterization.</p>

<p>Now I am planing the project proposal and
thinking about how to make it useful for other people in contemporary game development.</p>

<p>After some brief search,
I learned a technique called Software Occlusion Culling.
It does software rasterization on buffers of various resolutions.
And we can query for occlusion using the hierarchical z buffers.</p>

<p><strong>My question</strong>: What are the usages of software rasterization
in <em>modern</em> game engines besides the Software Occlusion Culling?</p>

<rendering>
What are the usages of software rasterization in modern game engines?
TheBusyTypist
# What are the usages of software rasterization in modern game engines?

(Asked by: username_0 on 2016-01-07)

I am taking a Computer Graphics course this quarter.
One of our lab project is about software rasterization.

Now I am planing the project proposal and
thinking about how to make it useful for other people in contemporary game development.

After some brief search,
I learned a technique called Software Occlusion Culling.
It does software rasterization on buffers of various resolutions.
And we can query for occlusion using the hierarchical z buffers.

**My question**: What are the usages of software rasterization
in *modern* game engines besides the Software Occlusion Culling?

**Tags:** rendering


---

## 3 answers

### Answer by username_3 on 2016-01-07. Score: 4 | Accepted answer

To my knowledge, [Software Occlusion Culling](https://software.intel.com/en-us/articles/software-occlusion-culling) (which you already mentioned), is pretty much the only thing a software rasterizer would still be used for. [Procworld](http://procworld.blogspot.fr/2015/08/voxel-occlusion.html) makes use of a similar technique to display its huge voxel environments.

Most other culling methods like frustum culling do work on the CPU, but, to stick with the example, the test against the frustum happens on object level, probably with an axis-aligned bounding box (AABB). This intersection test is way simpler than using a full-blown software rasterizer.

In certain cases, software rasterization could be used for mouse picking of objects. In game engines, this is often solved using a physics engine and ray-triangle collision with a simplified mesh.

With the CPU being idle while waiting for the GPU in modern interactive 3D applications, one could think that it might be beneficial to use these idle cycles to render on the CPU using a software rasterizer. The problem here, besides the rendering getting horribly complex and convoluted, will often be the bandwidth. Images rendered on the CPU need to be transferred to the GPU before getting displayed, which might cancel out the benefit.


---

### Answer by username_1 on 2016-01-07. Score: 0

Games with the concept of "fog of war" often have a visibility grid to define the state of the fog of war at each location. Rasterization is sometimes used to modify the fog of war state for specific shapes on the grid.

For instance, using an ability that reveals a circle of the map with a specific radius, or perhaps something that reveals a square.

Not strictly graphics related, but definitely a use of rasterization in modern games, and a technique ive seen used in RTSs.

Other grid based data in games could use rasterization for similar situations.


---

### Answer by username_2 on 2016-01-07. Score: -2

Rasterization is a huge topic with many parts and I'm no engine programmer, but I'll do my best to give some sort of overview (this will be far from a complete list!).

Some very basic, lowlevel stuff include:

* **Frustrum culling:** throws away everything outside the camera's frustrum (think of it as the viewing area of the camera).
* **Backface culling:** throw away every polygon not directing to the camera.
* **Painter's algorithm:** draw objects in order of their distance to the camera, start with objects far away, then go toward to the camera.

More advaned stuff used in games include things like:

* **Tesselation**: actually pretty much like LOD (see below), but now the latest DirectX Versions introduced tesselation, which provides automatic mesh division or reduction. This gives huge boost in graphics performance, because you can get polys if you need them and get rid of them if you don't want them any more.
* **LOD**: A level-of-detail system replaces the mesh of an object based on the distance between object and camera. for example, your character has three meshes: one with 10,000, one whith 5,000 and another with 1,000 polys. if you stay right in front of him, the high resolution mesh (10,000 polys) is shown, if you move away, after 100m the character is replaced by the medium mesh and after another 100m it is replaced by the low resolution mesh. Instead of replacing the mesh you can reduce it, but this would be more complex to code.
* **binary space partitions**: the space is divided into two volumes. this will be repeated until you reach your goal, e.g. until the space does contain only polys that should be drawn on screen
* **Portals and cells**: (aka Portal culling) is used in indoor scenes and/or first person shooters. The scene is divided into cells (e.g. rooms of a building) that are connected throw portals (e.g. doors). you can set portals to be open and closed.

Assuming you have a basic understanding of the graphics pipeline, I tried to focus on rasterization. you may also take a look at lighting and shading or other stuff..

These include just a few possible technologies to include into your project. since i have not enough reputation on stackexchange, I cannot provide many links, but you'll find all that stuff in google :)

> **Comments:**
> **username_3**: The question is about software (read: CPU) rasterization. Some of the information you gave are about rasterization in general, some techniques - in my book - have nothing to do with rasterization at all. Could you please clarify in your answer how the techniques use or benefit from software rasterization?  

---

