Giving a try to 3D graphics programming

Started by
8 comments, last by Adyrhan 10 years, 5 months ago

So I'm getting info and books about 3D game programming. I know nothing about 3D graphics programming and I'm doing my maths right now, following the book Game Coding Complete, the chapter 14 "3D Graphics basics - 3D Math 101". But I'd like to get more feedback about the results I'm getting so I was thinking if I could test in some 3D environment what I'm calculating. Using C++ language do you think I should use plain opengl to do it (is glut the library to do opengl programs in c++?) or should I use something else?

Thanks!

Advertisement

For simply testing 3d math, maybe you should look at matlab or consider picking up a graphing calculator... There is a lot of setup involved in OpenGL, which would take time away from what you currently wish to do.

For simply testing 3d math, maybe you should look at matlab or consider picking up a graphing calculator... There is a lot of setup involved in OpenGL, which would take time away from what you currently wish to do.

I guess you are right, if OpenGL has his own story to setup I may use some graphing software, or may be mathematica. is matlab very difficult?

I have not used it, except maybe in math class on occasion. There is a definite learning curve involved with any complex software package like that, but it was still fairly straightforward from what I remember. Best way to find out is to play around with it and see if its what your after. They should have student/free versions available.

is matlab very difficult?

For me it isn't. I often use Matlab for prototyping to check if my idea would work because it's much faster to write something in Matlab.

For OIpenGL in Visual C++ MS VS 2010/2012 you may try with

http://www.gamedev.net/page/resources/_/technical/opengl/concentration-of-all-the-lessons-in-common-library-glsummary-in-mfc-r3375

The source files are the codes of ready working projects and samples integrated the lessons from http://nehe.gamedev.net/

Hi,

Using OpenGL might be a good option if you want to target hardware cross-platform.

Instead of learning everything about 3D programming, I recommend focusing on 2D and 3D file format implementations (rasterize them to screen), shaders, animation support from 3D programs such as Collada as one example, voxels, input/controller support such as mouse and keyboard or others, camera views, and procedural generated surfaces such as terrain. You might want to get started early with Oculus Rift, which has a reasonable cost developers version. Bullet Physics is a good thing to plan to implement down the road.

Don't spend too much time on one area but be balanced long term. Better to create a sphere on a simple terrain plain that bounces off another sphere, or something like that, instead of exhausting yourself on trying to get one thing great looking before moving to another aspect of 3D.

Remember to really focus on developing a creative workflow pipeline in the long term. Anything else is trivial pursuit for a beginner or intermediate developer. Workflow pipeline for your efforts is very important if you aspire to go pro in 3D.

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software. The better the workflow pipeline, then the greater the potential output for a quality game. Completing projects is the last but finest order.

by Clinton, 3Ddreamer

I use the FREE and OPENSOURCE Maratis3D engine.

I am running into a bunch of snags when it comes to the 3D art aspect as there is SO MUCH to learn and do. First you have to have the 3D assets. I did create a set of primitives for testing code for it, but when you want animated characters or advanced AI systems, then you still have to have a 3d model that can sort of physically (sort of because it isn't the real world) DO those things you program. This means having a 3d model that is animated and having a rig that interacts the way you program it.

Good thing about Maratis, it uses LUA. If you want to program for the engine it uses C++. I know I mention this a lot, but it is a good engine for beginners like me.

Even if you want to test 3d math I think this engine is perfect for that (A guy on the site has done just that, and made a 3d model that displays 3d vectors).

I mostly test in it myself for proof of concept.

They call me the Tutorial Doctor.

Coding in 3D in most cases needs to incorporate the output of a good 3D program like Blender, Maya, or 3DS Max (among others). The naming and file format conventions are fairly standard. You don't need to create a plug-in to these 3D software, but you at least need to have your coding be able to read and implement the 2D and 3D files from those programs (rasterize to screen). Hopping around the 3D learning landscape is fun and you will find useful things, but at the end of the day you need to target 2D and 3D graphics file format implementation.

For example, if I create a 3D model of a pickup truck in Maya, then inside the model folder may be files for things such as 3D coordinates in that file format, animation files, 2D texture file (s), materials, shaders, bump map file(s), and any special instances/members such as vector graphics, render materials like Path Ray. (Note: Rays such as Path Ray, materials, and animation files should be small because these really eat processing performance for breakfast, lunch, and supper!) Each model folder goes into the appropriate Class folder. Each type of file in the model folder has potential 3D coordinates associated with it.

Example :

(Class Folders, member Folders, model Folders, object Files:)

Maps

City

Village

Farm

Vehicles

Police (Class Folder)

patrol (member Folder)

01_officer.x (a model folder in the .x file format)

3Dmodel

bumpmap

2Dtexture

animations

weapons (carried with the character)

02_officer.x (a model folder in the .x file format)

3Dmodel

bumpmap

2Dtexture

animations

weapons (carried with the character)

swat

detective

Villains

robber

drugDealer.x (a model folder in the .x file format)

3Dmodel

bumpmap

2Dtexture

animations

weapons (carried with the character)

rapist

shooter

Civilians

Weapons (external weapons such as cannon, gun turret, water cannon, etc.)

Objects

trees

houses

streetlights

firehidrants

stationaryvehicles

furniture

Some things can be placed inside or outside the model folder (.X in this example) and this is determined while or at the end of the model making process within the 3D software where the model is made. Putting all the contents inside the model folder is standard and makes coding easier with better performance. The 3D software exports all of this in a model folder with all contents, traits, and configurations. Your job as a coder is to make your game engine and/or game source code read the Class folders and implement the contents which are found in each model folder, be it rasterized 3D and 2D, animations, and so on. Normally people acquire a game engine to handle the lower level implementations such as reading coordinates and implementing animations. What you are really doing is creating a game engine source code and a game source code if you code everything yourself.

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software. The better the workflow pipeline, then the greater the potential output for a quality game. Completing projects is the last but finest order.

by Clinton, 3Ddreamer

Thank you very much for your advices 3Ddreamer. I appreciate it a lot. Very insightful.

Also thank you Tutorial Doctor. I'll download the engine you mention and I'll see if I can do something with it.

This topic is closed to new replies.

Advertisement