Tag Archives: opengl

Diving into 3d Programming

Recently I’ve been looking into the area of 3d programming. Here are some few notes from this area of computing.

This area of 3d programming, would serve anyone in the:

  • 3d games programming area — (the directx, and opengl got plenty of code and samples of, for example, preforming character manipulations – character walk, or talk).
  • or in the 3d designing area – such as architects (yet, this area is more likely would use less options available to this 3d environment than a 3d games.
  • Anybody in the 3d animated movies area (unlike the 3d studio tools, for example – these abilities enable one to create a scene for example of a character doing random things – without any special effort).
    Thinking of 3d animated movies, where plenty of tools are being offered. Most of the scenes are usually being defined by the director (for example the ‘lord of the rings’ armies fight – as so on).
    I can think of a whole world, one can create, much like the 13th floor movie. Where the characters  have a life of their own.. And the platform enables them all these daily “random” activities.

When speaking on 3d programming, on windows. There roughly two basic architectures. When using dev environment such as delphi — you can write to both engines seamlessly — while both archtectures enable you to manipulate 3d environment down to detailed variables and features that you would like to achive:

DirectX and Delphi:
To program for that environment I all these, in different times:

  • Delphi FMX — Embarcadero intreduced this crossplatform graphics environment, that got plenty of goodies and abilities.
  • ksDev dxScene — (which later, became the FMX archetecture

OpenGL and Delphi:

  • glScene — an opensource OpenGL environment for use with delphi.

I’ve focused on these two, but I’m sure that looking for other alternatives one can find plenty more. One that I can recall seeing is the: vrmlScene.

—-

Here are some notes, of my first digg into the 3d environment:

I’ve dived into this ocean of shaders (which are virtually effects being done on the 3d model data) and edge detecting techniques, and all these abilities of the graphics manipulations.

After I switched from the dxScene (DirectX) to glScene (opensource opengl libraries), seems that all the searches I’ve made were much more focused. It seems that opengl is much more common than the directx ones. Although all the abilities of the two platforms are somewhat similar.

Anyhow preforming the manipulation programmer wise, got awesome abilities. Though the designated final goal must be well defined.

Here is a sample url of a question about the edges issue,. Which advise a way to preforme the edges.. Another example is this, of displaying wireframe, yet I do not know whether that answer the question as well.

Implementing the shader can be done done, as you see in the examples above, using an opengl c like syntax. OpenGL (as all software) comes in versions flavors,. And using the language in certain syntaxes is valid only for the proper opengl version.

The shader API define parameters to be sent to the rendered application. And it is very dynamic being defined in that way. For example a shader can send only color variable, or can send multiple parameters according the way it was defined by the rendering application.

Another extension of all this process can be done via direct gpu programming using for example the CG (not to be mistaken with CygWin, which is the CPP compiler for windows).

The CG is a CPP compiler for shaders.