PDA

View Full Version : Basic 3D Engine



pj
06-19-2000, 02:30 PM
Hi again,

I'm just wanting to know if anyone here knows where I'd be able to go in order to learn the basic operations of a 3D Engine? http://www.opengl.org/discussion_boards/ubb/smile.gif

I am either after a tutorial, a URL to an opensource engine or a good book where I could start to learn the basics. I am attempting to create an opensource 3D Engine within director, so the tutorial, book or o/s engine should not contain any platform specific operations, and should not rely on any hardware for the 3d routines.

At the moment the engine must include the following features. The ability to create simple polygons, such as squares and spheres, and the ability to map textures/images to the polygons. It should later be able to include shadows, fogging and shading, but as long as it can be expanded to do this then all is good http://www.opengl.org/discussion_boards/ubb/biggrin.gif

Once again, any help or assistance here is greatly appreciated!!

Cheers!

Paul

06-19-2000, 03:39 PM
Try
http://www.gamedev.net/hosted/nehe/opengl.asp

Best OpenGL tutorials I ever saw.

pj
06-19-2000, 04:20 PM
Thanks for your reply, but unfortunately OpenGl ain't exactly the simplest engine to learn. http://www.opengl.org/discussion_boards/ubb/frown.gif

I think you missed exactly what I'm trying to do too. Basically I am wanting to write my own 3D Engine, so I therefore need to know the operations behind a 3D Engine (e.g. the matrix calcs and all other operations), and converting the OpenGl Engine to a lingo/director based engine wouldn't be an easy task. http://www.opengl.org/discussion_boards/ubb/smile.gif

Thanks a bunch for your link though... I will try and work my way though the tutorials there so that I can gain a better understanding of OpenGL, but I am still wanting to find something on a more simple 3D Engine with detailed documentation on the operations and code needed to perform simple 3D operations such as texture/image mapping and the display and rotating/translating of simple polygons such as squares and spheres. http://www.opengl.org/discussion_boards/ubb/biggrin.gif

Paul.

Gorg
06-19-2000, 06:22 PM
opengl *is not* an engine. It's an API. An interface to the hardware.

A graphics engine uses the API to render its scene.

This consist of much more than opengl. You have to worry about scene management, occlusion culling, etc..

pj
06-19-2000, 06:32 PM
Sorry for the mix-up of terms. I will try and be a little more accurate when addressing this list from now on! http://www.opengl.org/discussion_boards/ubb/smile.gif

What you said Gorg is what I am wanting to do, so if you have any good URL's book titles or online tutorials that can show me how to make an engine, not work within an API then I would be extrememly grateful!

Cheers!

Paul

06-19-2000, 08:01 PM
Some engines for which the source is available on the 'net:

Crystal Space (open source)

Quake 2 and 3 (from id's web site, for mod programmers)

Just try a Google search (or Alta Vista) and you'll get lots of hits.

Caesar
06-23-2000, 04:10 PM
You say "simple engine". I can pretty much gurantee you that OpenGL is the easiest way of creating a 3D-engine.

Don't get me wrong. You should at least have some understanding on what takes place under the surface, but writing a software engine is really difficult. OpenGL does a lot of the hard stuff for you (and faster).

Gorg
06-23-2000, 04:21 PM
The book that would be the best for you to read are :

Real-time Rendering by Eric Haines and Thomas Moller

Cover efficiently most of things that are related to real-time graphics. They also give a lot of good references to get to the information in more depth.

If you are not a really experienced programmer, I would also suggest Design Patterns by Eric Gamma and Co. This books cover , obviously, design patterns.

Design patterns are simple a formal description of concept like client-server, proxy, observer, etc. Extermely usefull.

06-23-2000, 05:32 PM
A warning about design patterns, though. I've seen people pick it up, read it, and then believe they knew software design. Unless you've screwed up two or three large projects already, you probably don't know software design :-)

Design patterns is an excellent reference for naming those constructs that you keep using over and over, and as reference and common ground when discussing with other people, but it does not teach software design as such. As long as you realize that, it's a great book.

Gorg
06-23-2000, 06:35 PM
You are absolutly right. Design pattern is only a reference, just a toolbox. You rarely pick a pattern and use directly.

You must not base your architecture on a pattern, you must think about your architecture and then get the patterns that are the closest to what you need and adapt them to your program.

06-24-2000, 03:34 AM
check out graphics gems , this book goes over all of the transforms that you would need

pj
06-24-2000, 04:04 PM
Thanks everyone for all your replies. http://www.opengl.org/discussion_boards/ubb/biggrin.gif

In regards to "the_dude"'s comment on Graphic Gems, I was just wondering who the author of this book is? I did a search on Amazon and found 11 books called graphics gems. Some are out of print and others and by different authors. Is there any particular author that I should be looking for?

Thanks in advance!

Paul

Gorg
06-24-2000, 04:20 PM
Graphics Gem is series of books that covers a big range of algorithm and graphic technique. It's a huge series. Source code of the tecniques can be found on their web site.

I don't remember the adress, but you should find it easely.

Thr33d
06-24-2000, 08:07 PM
One old book i have ( which covers alot on software 3d rendering if you're tring to start at the begining ) is andre lamothe's
Black art of 3d game programming.
it is an old book but hopefully should help you out if you can find it.

ttyl
thr33d

nexusone
06-25-2000, 05:45 AM
This is a reply to the message that started and a question on my own.

Yes, the 3D engine could mean two diffrent things.
1. 3D engine in as a rendering engine.
That is taking primitives like triangle, cone and adding lighting and texture to them.
That is a relly simple example.
You may want to look at the source code for POVRay. Which is a 3D rendering Engine.. www.povray.org (http://www.povray.org) or the source for opengl?
If this is what you are looking for the opengl examples will not be to helpful in repect to writing rendering code.
You will need book's on 3D graphic and rendering engines. If you do some searching you can find ton's of simple 3D rending engines people have writen. Also a good understanding of trig.


2. if in 3D engine you mean in terms of a game or 3D world. Then opengl is the interface that renders the 3D world. The 3D game engine, keep track of the objects location movement.
If this is what you want to write then you are on the right track. Opengl is a cross platform rendering Engine.

I on the other hand, looking for a simple 3D engine. That would be a good starting point, in creating a 3D world. I would like to say learn how to create an object in my 3d world have gravity affect it... maybe be able to control the object, forget the proper word.
But say bouce property. Say drop the oject have is bouce around then come to a rest.

DFrey
06-25-2000, 08:42 AM
In English, the "bounce property" is called restitution. Is that the word you were looking for? It is a form of internal friction that gradually (or quickly) bleeds away the momentum of the bouncing object. To a first approximation it does so at a constant rate. A better approximation is having it be proportional to the magnitude of the force that it hits a surface with.
Or proportional to just the velocity of the impact.

Look into particle systems for details.



[This message has been edited by DFrey (edited 06-25-2000).]

06-25-2000, 12:02 PM
PJ:

Here's the deal. 3d graphics is above everything else a lot of 3d college-level mathematics. I'm talking about matrix multiplications, vectors, etc.

If you're not ready to handle some serious mathematics, most certainly learn OPENGL. The best thing about OPENGL is that it does a lot of the math for you.

If you want to learn the math behind OPENGL (and 3d graphics in general), get yourself a copy of Computer Graphics Principles and Practice by Foley, et al. I believe it may be out of print. Let me warn you, this is a very large book, and much of it involves rather rigorous mathematics.

Good luck.

HaHa
06-25-2000, 09:58 PM
Here's the deal. 3d graphics is above everything else a lot of 3d college-level mathematics. I'm talking about matrix multiplications, vectors, etc.

College level math?!? lol, I learned them in my Sophmore year of HIGH SCHOOL in the US!!

06-25-2000, 11:27 PM
to haha: sure we learn the very basics in high school but they only teach us how to used them, not how and why it works.

06-26-2000, 06:48 AM
I would have to agree with Gorg:
Real-time Rendering by Eric Haines and Thomas Moller

Great book! I'm tyring to accomplish a 3D engine also, and this book is a boon!
It gives you the understanding necessary to build a 3D engine, it includes matrix calculations, trig, the equations, etc...

However, this book will not answer all you problems. You will need at least a couple of books for the actual implementation. Definitely the, "OpenGL Programming Guide 1.2" and the "OpenGL SuperBible" is pretty good as well.

Hope it works out well for you.

06-26-2000, 12:42 PM
pj,

There already is a 3d engine for Director in Lingo available at http://www.dubbus.com/devnull/3D/index.htm

I don't konw how good it is. But you can look at the code and see if it helps.

Sorry for the late entry into the thread.