Jump to content

Technical Programmer Type Question


Recommended Posts

Just a dumb programming question quasi-related to CM that maybe someone in the know might be able to answer.

I've just started digging in to learning OpenGL myself and I'm wondering what sort of rendering tool is being used to create the shapes on the battlefield. I'm at the point where I'm rendering simple objects through code but I can't imagine doing a game like CM that way. Any tips?

p.

Link to comment
Share on other sites

Another dumb programmer question:

To people who have coded both on the Mac OS and on Windows: What do you think of the two API sets? I code a little on the mac, and the current Mac OS APIs reek like nobody's business (as far as I can tell...) Are the windows ones as bad?

- Bill

Link to comment
Share on other sites

PeterK,

I think the vehicles ARE rendered through code... I know that sounds like MUCHO work and really advanced to me (I know NOTHING about coding).. How advanced is it? (just curious)

Billcarey,

From comments I've heard from the development team hehe it would seem that Windows' ones are even worse wink.gif...

------------------

___________

Fionn Kelly

Manager of Historical Research,

The Gamers Net - Gaming for Gamers

Link to comment
Share on other sites

What do you mean by "rendering through code"? Telling OpenGL to draw a set of Polygons?

There are a couple of possibilities to make this look more nicely. For example, you can put all those vertices in a display list using glNewList ... glEndList blocks and just call those display lists later on (you still have to have the code somewhere to generate the display list).

Another possibility (that can actually be combined with the first one) is to use vertex arrays. What you do is put all vertices you need for one object (or several objects) in an array and tell OpenGL which points it should use for drawing each polygon. You still need code to manage the drawing, but you can load object data from an external file more easily and it saves bandwidth, thus raising the drawing speed.

Hope this helps,

Dschugaschwili

Link to comment
Share on other sites

<

I think the vehicles ARE rendered through code... I know that sounds like MUCHO work and really advanced to me (I know NOTHING about coding).. How advanced is it? (just curious)

>

My understanding of this stuff is pretty limited so far, but ultimately rendering the shapes _is_ going to come down to code/display-lists - but I was just wondering if the BTS guys were using some sort of tool to do the drawings that outputted the code for them or if they had developped some sort of engine to make the task easier, or if they were just writing the rendering stuff directly in the C++ environment.

The reason I'm asking, is that I'm doing openGL things directly in C++ now and I'm constantly thinking "there has got to be a better way" - yes it is mucho work and very tedious at times.

p.

Link to comment
Share on other sites

Well, I guess you can write some generic code to do the rendering based on the following data (I think it should work, I don't know how other people do it smile.gif):

- The sizes of the two arrays below

- A vertex array where all vertices for the model are stored

- A "polygon" array with data sets containing:

+ 3 indices for the vertex array (specifying a triangle)

+ a texture number

+ some texture alignment data

You can load this data from an external file (or from anywhere else) and pass it to your generic renderer. The renderer can then pass the data almost directly to OpenGL.

Just my 2 cents,

Dschugaschwili

[This message has been edited by Dschugaschwili (edited 01-18-2000).]

Link to comment
Share on other sites

<BLOCKQUOTE>quote:</font><HR>I'm at the point where I'm rendering simple objects through code but I can't imagine doing a game like CM that way.<HR></BLOCKQUOTE>

I suspect they are using a program like 3d Studio Max to create their models. All one needs is a routine that can render the polygon output from the program then you have one subroutine that can render any object you create.

Link to comment
Share on other sites

Guest Big Time Software

Our models are indeed "rendered through code" but that code is generated by a program, not by a human. eek.gif Input a model (made by a human) and my 3D tool spits out C++ code to render it. It's pretty cool. cool.gif

However if you're still learning the basics of 3D graphics, don't get fouled up in advanced stuff like that. It's an optimization/worksaver you can concern yourself with later.

Charles

Link to comment
Share on other sites

> Input a model (made by a human) and my 3D > tool spits out C++ code to render it. It's > pretty cool.

Hi Charles,

Thanks for the answer! Just curious, is that tool something that you came up with yourself (I've been thinking of doing something similar) or is it a commercial package that you can recommend? Just something I can store away for future reference!

p.

Link to comment
Share on other sites

×
×
  • Create New...