• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
BrechtDebruyne

What can software rasterizers be used for today?

19 posts in this topic

I decided to code my own software renderer, because I think it would make for a great learning experience.
And although it will probably stop there for me, I'd like to know if there is still use for software rasterizers today, and what they can be used for?
Can they be used for anything besides systems that lack a GPU? And what are the most important target devices today that lack a GPU? Edited by Xcrypt
0

Share this post


Link to post
Share on other sites
It indeed is a great learning experience.
And a simple software renderer running on Symbian OS landed me my first real job :)

Though I think the use for them is really limited today, when most mobile phones (even low end ones) have a GPU.
And the ones that don't might be hard to run 3rd party code on.

Possibly in some embedded system, but then again, if you want advanced graphics, you might choose a system with a cheap GPU instead.

In some hypothetical system where your GPU is overloaded, but you have lots of CPU cycles to spare, I guess it could be useful for some multipass effect. (would probably need to be a unified memory system, preferably with texture streaming enabled to avoid copies, to be efficient though) Edited by Olof Hedman
2

Share this post


Link to post
Share on other sites
I belive they are still usefull today, i mean why would they be "depricated" just becuase gpu´s are more efficent at it?

hobbyist might want to use them for 2d games or 3d games. or to do some wierd application that do some cool 3d render when you write text. or what ever :P
i can probably think of some.

"And what are the most important target devices today that lack a GPU?"
- Thos darn LED displays that are on busses and trains. i hate it that they cant do better effects with their texts. ( There probably are some sort of rendering stuff in them, but probablt not a gpu :P )
1

Share this post


Link to post
Share on other sites
[quote name='ZBethel' timestamp='1354110917' post='5004957']
For instance, DICE utilizes software rasterization to aid in occlusion culling, because reading back data from the GPU takes a while.
[/quote]

Interesting!
That could be useful, when you need the rendered scene for some CPU processing, but don't want to add synchronization points with the GPU...
I assume it's a rather simple version of it though, maybe just render the depth buffer?
0

Share this post


Link to post
Share on other sites
They have a paper somewhere that outlines some of the details, but I believe they do very simplistic rasterization to a 320x280 depth buffer (or something like that). It's heavily vectorized. If you own a core-I7 with AVX, I believe those can do 8-wide vector operations, which would speed up something like that heavily. I've considered writing an occlusion library that utilizes AVX and SSE instructions. I don't think anyone's really used AVX much yet in production (from my very limited viewpoint).
1

Share this post


Link to post
Share on other sites
Another thing I'm wondering, I've been thinking about experimenting with some rendering techniques like rasterization with gpgpu by using something like CUDA. However, I have no CUDA experience and wondering if it would be possible to do so? Could there be certain advantages over just using Dx / GL? Edited by Xcrypt
0

Share this post


Link to post
Share on other sites
[quote name='Xcrypt' timestamp='1354113483' post='5004971']
Another thing I'm wondering, I've been thinking about experimenting with some rendering techniques like rasterization with gpgpu by using something like CUDA. However, I have no CUDA experience and wondering if it would be possible to do so? Could there be certain advantages over just using Dx / GL?
[/quote]

I've seen real-time raytracers done with GPGPU solutions, but no rasterizers as far as I can remember. There's a good reason for a lack of GPGPU rasterizers though, as DX and OGL would always outperform GPGPU solutions as they can use the actual rasterizer hardware, while a GPGPU solution would need to do rasterization completely in software.
Maybe there are some obscure use cases where a GPGPU rasterizer would be actually useful, but in general it'd be better to stick with libraries like DX and OGL.
1

Share this post


Link to post
Share on other sites
[quote name='Radikalizm' timestamp='1354114934' post='5004979']
I've seen real-time raytracers done with GPGPU solutions, but no rasterizers as far as I can remember. There's a good reason for a lack of GPGPU rasterizers though, as DX and OGL would always outperform GPGPU solutions as they can use the actual rasterizer hardware, while a GPGPU solution would need to do rasterization completely in software.
Maybe there are some obscure use cases where a GPGPU rasterizer would be actually useful, but in general it'd be better to stick with libraries like DX and OGL.
[/quote]

Well, gonna have to try the gpgpu raytracing then :D
0

Share this post


Link to post
Share on other sites
As mentioned, software rasterizers are still of some practical use to help aid the GPU, as dice does -- in general, any time you might get away with a lower-resolution stand-in with limited or no "pixel shading" -- so things like occlusion, perhaps shadow maps generation or other lighting effects could be done.

The very best software rasterizers of today are incredible pieces of technology that scale across CPU cores and across vector instruction sets, and just-in-time-compiling their own pixel shaders to SSE/AVX -- Still, once the pixel shading and texture sampling start to get cranked up, even several CPUs can barely keep pace with even entry-level GPUs it just doesn't have the compute throughput necessary to drive resolution much beyond 1024x768 or so, which is to say nothing of the meager memory and cache bandwidth a typical PC has compared to a GPU.

Still a very interesting exercise though -- I'm debating pulling out my old single-threaded, mostly-non-vectorized rasterizer (which was still decently fast) and seeing how far I can push it with 4 cores and AVX.
0

Share this post


Link to post
Share on other sites
I believe high end renderers such as RenderMan are implemented in software and go across multiple computers but I do believe they can utilize the GPU. I wouldn't think they use OpenGL or DirectX directly. I would think they would use it similar as a gpgpu. But for a real-time renderer, you will definitely need to use the GPU.
0

Share this post


Link to post
Share on other sites
Yes, that's a distinction to be made for sure, but RenderMan is fundamentally a ray-tracer, and the final renderings take minutes or hours per frame on large clusters of computers. More and more of that can move onto the GPU as technology advances, but the very wide vector machines that GPUs are aren't a great match for ray-casters, because its very, very hard to keep all the rays moving in the same direction, and in the same state. There are quick-turnaround previewing tools that can run scenes on a GPU in real-time, but they don't have anywhere near the subtle lighting that they get with the final rendering.

I think the OP is mostly talking about a real-time rasterizer
0

Share this post


Link to post
Share on other sites
[quote name='Dynamo_Maestro' timestamp='1354117715' post='5004984']
I believe Blender still renders on the CPU, or at least did, they had 'reasons' but I forgot what they were
[/quote]

Blender has a new raytracer called [url="http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.61/Cycles"]Cycles[/url] which can advantage of CUDA and OpenCL, can have custom shaders and so on. Edited by Kamikaze15
0

Share this post


Link to post
Share on other sites
[quote name='Xcrypt' timestamp='1354113483' post='5004971']
Another thing I'm wondering, I've been thinking about experimenting with some rendering techniques like rasterization with gpgpu by using something like CUDA. However, I have no CUDA experience and wondering if it would be possible to do so? Could there be certain advantages over just using Dx / GL?
[/quote]

[url="http://www.tml.tkk.fi/~samuli/publications/laine2011hpg_paper.pdf"]These guys[/url] did. Edited by ZBethel
0

Share this post


Link to post
Share on other sites
We use a very simplified software rasterizer for voxelizing triangle-meshes.

We set up an orthogonal projection of the model and rasterize it into a simple A-buffer data-structure. (A-buffers are framebuffers with per-pixel list of fragment depths)

After we did that we can just sort those lists, move through them from front and back and set ranges between fragments to either inside or outside in the voxel volume.
1

Share this post


Link to post
Share on other sites
Haha, like I said 'How does one even start to code a software renderer?' [img]http://public.gamedev.net//public/style_emoticons/default/laugh.png[/img]

Way over my head [img]http://public.gamedev.net//public/style_emoticons/default/blink.png[/img]
0

Share this post


Link to post
Share on other sites
[quote name='lonewolff' timestamp='1354788710' post='5007703']
How does one even start to code a software renderer?
[/quote]

All you need is a chunk of memory to call your framebuffer, and a way to get it onto your screen. In GDI/Win32, SetDIBBits or StretchDIBBits can get your framebuffer onto a window. Unfortunately win32 doesn't provide hooks for syncing to the vertical retrace, so you'll see tearing in the results (which is mostly not an issue).

Then you just need a to write pixels into your framebuffer which are in a compatible format -- the usual suspects apply: RGBA8888, RGB565, etc.
0

Share this post


Link to post
Share on other sites
[quote name='lonewolff' timestamp='1354826100' post='5007870']
Haha, like I said 'How does one even start to code a software renderer?' [img]http://public.gamedev.net//public/style_emoticons/default/laugh.png[/img]

Way over my head [img]http://public.gamedev.net//public/style_emoticons/default/blink.png[/img]
[/quote]

A good way to start is to try and understand how the GPU processes things. That means learning how index/vertex buffers work, how to write shaders, how world/view/projection space works and the math behind that, how the z-buffer works, how alpha blending works, how mip-mapping works, clipping, etc. Once you understand those concepts, you can start to write a rasterizer (alternatively, learning while you write one is a great way to learn it!). Tackling the entire thing all at once is completely overwhelming, but breaking it down into small parts takes care of that. For instance, you could start by writing a simple wireframe rasterizer. That was what I started with. If you're not looking write a super fast parallelized one then this is actually quite easy.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0