Writing my own 3d engine

Started by
13 comments, last by superpig 19 years ago
Quote:Original post by Anonymous Poster
hi:To walk through the basics just visit the folowing link
opengl.org
open the www.google.com then type in the search " ne he openGL " and go to the first link .i think u ll find all the answers u neede for that.
im from pakistan and also working on similar kind of project
regards
nadia


This was probably more helpful than you realised - NeHe is a gamedev hosted OpenGL tutorial website (OpenGL is one of the two main APIs for programming in 3D)

It's at http://nehe.gamedev.net.

It's a pretty good starting point - talks you through bit by bit how to go from rendering a single triangle to a full blown scene, besides lots of other little graphical tips.
Advertisement
NeHe and as any other tutorial site never gets to the point in my opinion. Just another sample application completely focused on doing what the tutorial is intended to teach. In the end, sure it was nice to learn how to do that single effect, but being able to design a whole flow chart in order to design and implement a complete engine with a complex scengraph, exporter plugins and how to manage your rendering queue is something that i've never seen anything about.

All those books about writing a 3d engine is a totally waste of money in my experience, the only things those books contains is:
2/5 How you draw your triangle using their screwed up wrapping system
1/5 Some math
1/5 Lighting and texturing that triangle
1/5 Their hardcoded game that's using a crappy heightmap and moves a couple of models around with hardcoded logic as to how things should work and interact with each other.

Where's the tutorials and articles concerning what you realy need to learn?! If i see another triangle or heightmap tutorial i'm going to throw up, seriously...

Write articles on advanced scenegraphs such as the node tree in 3dsmax and how the matrices translation is inherited downwards through the scenegraph or maybe that was just a feature we added, can't remember. Talk about extracting geometry, sorting it, how to optimize texture management over more than one mesh. Let's talk about writing a complex rendering queue pipeline with full shader support, no one uses the fixed function pipeline any more.

How about some advanced tutorials people?! And how about getting to see em with the full picture instead of a god damn sample framework with specialized code just to make it run.

I'm hoping my point is getting through. The problem with programming is never learning syntax or how the code works, that's the easy part. The hard part is knowing what systems you need to design and program in order to fullfill a certain purpose... hell, just finding out about the singleton design is a mayor leap forward for anyone that never even knew it existed.

Resource pools, rendering queues with sorting, different types of scenegraphs, how to integrate a physics engine into a scenegraph, that alone requires a completely new way of thinking, smart and easy texturing techniques like splatting and tons more... Hell they're not hard, but finding out that they even exist is!

Oh and sorry asafpolt, never intended to insult you.

Just found this link
http://developer.nvidia.com/docs/IO/9078/Modern-Graphics-Engine-Design.pdf
don't know how informative that pdf is, i haven't read it but i'm going to check out what it says, can't hurt.
Id definatly recomend taking a trig class unless you allready understand the trigometric functions. Besides that, look at any calculus book and you will see most of what you need + alot of extra crap. At the school im in it goes

Algebra
Trig
PreCal -> Im here
Calc1,2,3
Differential equations
Matrix theory

The most useful was definatly trig, althought i consider it pretty simple now, you wont get far without it. Notice im also only at precal so i might not know what im talking about !!
As i said earlier, knowing the math is great, but don't overdo it. Knowing how certain trig/algebraic functions work is great when programming how objects interact and move around and such... But in the end it's a small part of the 3d engine considering all that needs to be designed and programmed. (And seriously, if you're going to write "your own math lib" let me know, so i can come over and put you out of your missery. I can't stress how important the statement - don't reinvent the wheel - is in this buisiness.)
Quote:Original post by Cybrosys
Such resource classes should use a programming design called "Singleton".


Could, not should.

There is more than one way to do pretty much everything when it comes to programming. Be wary of anyone touting 'the way to do it' - what they are showing you is a way to do it, and that way will have pros and cons just like everything else. The choices that will suit you depend almost completely on what you want to achieve - I mean, "graphics engine" is a very vague term. 2D or 3D? Indoor or outdoor environments? Software or hardware rendering? Realtime or offline? What kind of rendering capabilities - photorealism, highly stylised, artist-controllable? What hardware do you want to use, what data formats do you want to work with, which techniques do you want to try implementing? I can come up with more questions if you want [smile] The point is that the majority of successful projects start with a specification - a list of things to be achieved. At what point does your code stop being a DX/OGL init/shutdown with some triangles, and start being a graphics engine?

Oh, and on the subject of reinventing the wheel - it's extremely funny that such a comment is made in a thread about creating a 3D engine [grin] If you're looking to do this because you want to use it to create a game, then there are many freeware engines out there already that you can use (not to mention ones like Source, which you could mod). You're not going to be writing your own hardware drivers so you'll be handing off to code that somebody else wrote at some point. The only question is when.

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

This topic is closed to new replies.

Advertisement