Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Software rendering tutorials/examples


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
20 replies to this topic

#1 vinnyvicious   Members   -  Reputation: 435

Like
3Likes
Like

Posted 07 February 2014 - 02:36 PM

I've been looking around for a few software rendering projects: simple engines, tutorials or even some examples. I managed to found this highly portable, but outdated, engine called Yeti3D: http://sourceforge.net/projects/yeti3dpro/

 

I'm looking for modern approaches or alternatives, or even tutorials on this topic. Any tips? :)



Sponsor:

#2 vinnyvicious   Members   -  Reputation: 435

Like
0Likes
Like

Posted 09 March 2014 - 06:31 PM

Not even a book? :(



#3 spinningcube   Members   -  Reputation: 90

Like
3Likes
Like

Posted 10 March 2014 - 11:08 AM

Not even a book? sad.png

 

Your best bet is sifting through the source of some old school demo. Might not be the best structured code but gives ideas about clipping etc. The best of class parallel rendering systems that rival or give hardware renderers a good fight is the half-space, grid or tile-based (threaded), a la Nick Capens pixel drawers (don't know what to call them really as they don't do scan line rasterisation, really a bastard version of ray casting). I think his system was bought up by some VCs and later commercialised?

 

 

PS - (speculative) His web history has been wiped clean not to give too many hints about the tech behind. I guess due to the patenting or other issues.

 

PS2 - I might be right after all :-)  http://transgaming.com/swiftshader


Edited by jbadams, 15 April 2014 - 02:09 AM.
Restored post contents from history.


#4 Glass_Knife   Moderators   -  Reputation: 6698

Like
5Likes
Like

Posted 10 March 2014 - 11:35 AM

The cheap version - http://www.scratchapixel.com/

This website has lots of information about writing your own software renderer.  Not all the lessons are available, but the ones that are can really help.

 

The expensive version - http://www.pbrt.org/

http://www.amazon.com/Physically-Based-Rendering-Second-Edition/dp/0123750792

 

The book walks you through the source code for the rendering engine explaining how everything works.  By downloading the code and working through it with the book you should be able to write your own rendering engine (provided you understand all the math).


I think, therefore I am. I think? - "George Carlin"
My Website: Indie Game Programming

My Twitter: https://twitter.com/indieprogram

My Book: http://amzn.com/1305076532


#5 mark ds   Members   -  Reputation: 1654

Like
1Likes
Like

Posted 10 March 2014 - 08:22 PM

I've been looking around for a few software rendering projects:

Why? Do you think it'll render faster?



#6 vinnyvicious   Members   -  Reputation: 435

Like
4Likes
Like

Posted 10 March 2014 - 08:49 PM

 

I've been looking around for a few software rendering projects:

Why? Do you think it'll render faster?

 

 

Obviously, no. It's a curiosity thing. I'm a big fan of Quake 1's software renderer and wanted to implement something of my own.



#7 Krypt0n   Crossbones+   -  Reputation: 3201

Like
3Likes
Like

Posted 11 March 2014 - 10:51 AM

then your first source of information should be the Quake1 source code.

beside the assembler version, there is also a c version that you could experiment with.might be the best way to learn it :)



#8 JohnnyCode   Members   -  Reputation: 529

Like
7Likes
Like

Posted 12 March 2014 - 09:57 AM

this is a great article that explains triangle rasterization and interpolation over its surface . It also explains texture filtering that got us free from blocky textures.

 

http://fgiesen.wordpress.com/2013/02/08/triangle-rasterization-in-practice/



#9 vinnyvicious   Members   -  Reputation: 435

Like
0Likes
Like

Posted 12 March 2014 - 06:32 PM

Amazing link, thanks @JohnnyCode



#10 rouncer   Members   -  Reputation: 286

Like
-3Likes
Like

Posted 13 March 2014 - 11:47 AM

ok.  you can make your whole game greyscale,   then have a material id,  and then its just colour operations on r g and b, and i bet you all the latest crazo games do it.



#11 Geri   Members   -  Reputation: 233

Like
0Likes
Like

Posted 13 March 2014 - 03:54 PM

i dont suggest to study these outdated technologies like the q2. those optimization tricks will not work any more, and keep in mind that we have superscalar cpu-s now. also remember that you will need an agressively multithreaded code to achieve fast speed with nice quality. just write your renderer, and if you find a part that is too slow, then meditate/study/doodle that practicular problem.

 

http://geri.comeze.com/darktower/

 

my last (software rendered) free game, done for a game competition. it uses ray tracing, runs playable in 320x160.


Edited by Geri, 13 March 2014 - 03:58 PM.

Create your 3D RPG: Maker3D

 


#12 spinningcube   Members   -  Reputation: 90

Like
2Likes
Like

Posted 14 March 2014 - 06:10 AM

Fabian Giesen also touches upon the same technique that I mentioned in my first post, that is rendering with half spaces. It's the approach best suited for a software renderer and is used in top of the class software driver implementations. To approach software rendering today with a scan line rasteriser is fun as a hobby project but will lead nowhere as the real speed comes with multi-threading and therefore from a binning or tiled based approach.


Edited by jbadams, 13 April 2014 - 01:31 AM.
Restored post contents from history.


#13 esoufiane   Members   -  Reputation: 619

Like
1Likes
Like

Posted 14 March 2014 - 08:33 AM

Here is a useful article about software rasterization with an implementation of the half space algorithm.

 

http://devmaster.net/posts/6145/advanced-rasterization



#14 JohnnyCode   Members   -  Reputation: 529

Like
-2Likes
Like

Posted 14 March 2014 - 10:58 PM

software rasterizer combined with gpu availability check is the best engine I can think of. And also, you can make software rasterizing into gpu SIMD, though bypassing general gl/dx vendor tweeks will mostly lead to lesser performance, it is possible to (out)perform it- or more correctly, have better operatibility available. Imagine you could alter triangle rasterization ruiles, so that you will process also pixels with its center out of edge but partialy touching edge, then you could do ++ best antialiasing on any surface or, particular draw call. It is for sure very worthy to implement rasterizing on software, wheather for learning, or for possible usage in the future.



#15 Geri   Members   -  Reputation: 233

Like
0Likes
Like

Posted 15 March 2014 - 06:24 AM

JohnnyCode: i disaggree. maybe in *theory*, you can get the biggest performance, but using gpgpu would so much limit the number of compatible systems and would make so many extra work and compatibility issue, it would basically double the required work, and would make the whole thing almost unsellable, becouse there is a limited number of users with proper computers to run it. maybe such minor works like antialiasing, and other various filters effectively can done with gpu in this case, but that would not significantly boost the rendering ,,pipeline'', and should be maked with the possibility to disable it and use the software fallback.


Create your 3D RPG: Maker3D

 


#16 spinningcube   Members   -  Reputation: 90

Like
0Likes
Like

Posted 15 March 2014 - 12:59 PM

Here is a useful article about software rasterization with an implementation of the half space algorithm.

 

http://devmaster.net/posts/6145/advanced-rasterization

 

Yup that is Nicolas Capens himself writing it :-)


Edited by jbadams, 15 April 2014 - 02:09 AM.
Restored post contents from history.


#17 vinnyvicious   Members   -  Reputation: 435

Like
0Likes
Like

Posted 13 April 2014 - 12:41 PM

Bumping up to see more interest links or projects with software renderers!



#18 thissideup   Members   -  Reputation: 627

Like
1Likes
Like

Posted 14 April 2014 - 04:30 AM

There is a tutorial series by David Rousset:
http://blogs.msdn.com/b/davrous/archive/2013/06/13/tutorial-series-learning-how-to-write-a-3d-soft-engine-from-scratch-in-c-typescript-or-javascript.aspx

When it comes to ray-tracing (and since PBRT was already mentioned) I would suggest you have a look at Ray Tracing from the Ground Up by Kevin Suffern as, in my opinion, more beginner-friendly.



#19 vinnyvicious   Members   -  Reputation: 435

Like
0Likes
Like

Posted 14 April 2014 - 10:06 AM

Those series are very well written and the examples are very clear. Thanks for the link! I just wish they had C++ examples included. 



#20 vinnyvicious   Members   -  Reputation: 435

Like
0Likes
Like

Posted 19 August 2014 - 09:44 PM

This seems to be good: http://joshbeam.com/articles/simple_line_drawing/






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS