Archived

This topic is now archived and is closed to further replies.

3D graphics engine

This topic is 4951 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I plan to write a 3D graphics engine as a summer project and was wondering whether I should go with writing a software renderer from scratch, or whether I should use Direct3D or something. I know a bit of theory about 3D graphics from Foley but I have never written an engine before. My personal feeling is that writing a software renderer would be more impressive when it comes to looking for a job (and also would be more "fun") but one could obviously get more realistic graphics by using a Direct3D and an accelerator. Any advice on which route I should take ? -Rahul

Share this post


Link to post
Share on other sites
If I were you, I wouldnt bother writing a software rasterizer. No normal game dev starts from scratch when making a game. Video cards are just too incompatable to make a rasterizer that works will all of them.

Learn DirectX or OpenGl and work on the important stuff...the stuff youll actually use in a normal game programming job.

Oh yea, and happy coding!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Writing a software 3D engine will teach you all the concepts that you will need when you move to Direct3D, and will also help on any consoles that don''t support Direct3D.

I started learning Direct3D but relised that I didn''t know what was going on behind the scenes enough and this hindered my understanding of the code. I have now been working on my software rasterizer and have a much better understanding of 3D graphics which will be a great help when I go back to a 3D API.

Share this post


Link to post
Share on other sites
Thanks for the quick replies guys.

Actually, I do own LaMothes new book, and have read through most of it (which means nothing until I actually have some code that works of course). Also, a few years ago, I screwed around with XSharp (Abrash). From there, I went to Foley but Foley does not help in writing code (way too theoretical).

Last summer, I was working on building an engine using Direct3D but got bored of making API calls all the time.

At the end of the day, my dream job would be to work for a group like the Direct3D guys or NVIDIA or something (note emphasis on "dream"), which is why I am leaning towards a software renderer--I feel that I would learn more about the kind of stuff that I want to do later on in life after school. Also, if I make the system modular enough, maybe later on, I could convert the engine to use Direct3D instead of the rasterizer that I (hopefully) build. Does this sound like a reasonable idea ?

-Rahul

Share this post


Link to post
Share on other sites
PS

If I go the software rasterizer route, I think it would make sense not to refer to Andre''s book too often otherwise the thing might just end up being his code with different variable names. Do you guys agree with that ? I suppose the more precise question would be, "how should I use Andre''s book?" As a reference for the theory and design, or as a reference for code ?

-Rahul

Share this post


Link to post
Share on other sites
Remember that writing a software engine is not just writing a rasterizer. The rasterization is only a part of it and not even the biggest. You also have to write (i.e. "reinvent") all the transformation, lighting, culling and clipping stuff that the hardware usually does for you. Personally, i love working on a software engine. I did one for Java and added support for OpenGL later. This approach limits the possibilities of the hardware path somehow (at least if you want both paths to behave as equal as possible) but it''s still a fun thing to do (at least for me).
If you have Java 1.4 installed, here''s a web-startable demo of how this looks (press ''x'' to switch renderers, may not work on all machines): demo software/hardware rendering

Share this post


Link to post
Share on other sites
I made a SW rasterizer once a long time ago. 320x240 256 colors using C. It was funny. You practice all the concepts for transformations, triangle rasterization, zbuffer, lights, color interpolation. I never managed to add textures because I had to move to other things but the engine was fine.

Sure you will learn a lot. But remember that when you are finished, you will get a graphics API, not an engine. An engine covers much much more, object manipulation, texture, models and shader management, effects and texture sorting, scene graphs, light control and more.

As someone said, the renderer is just a small portion. The engine is much more complicated. But if you want to have fun, go on. Once you learn what happens under the hood (at least at the basic level) you will be able to see the real tech level of DX or OGL. Its awesome.

The same, once you have developed your own engine, you will be able to appreciate the real power of the Doom3 or HL2 engines and it will be easier for you to understand the reason for each component.

Luck!
Guimo



Share this post


Link to post
Share on other sites