View Full Version : Visual Engine

06-23-2000, 02:02 PM
Hello guys..

i really have some experience in programming language. Coz i have a lot time dedicated time on it.
So i've tried to understand to 3d programming with a opengl( NEHE tutorials ) a couple a weeks ago. And i'm working on my engine a couple a days. and i found a certain difficult to write a code that draw a various objects like a boxes, a trees, a boxes or maybe trees made by boxes. http://www.opengl.org/discussion_boards/ubb/smile.gif)

And i really appreciate if someone try to help me. Maybe share some codes, i work usually with Delphi, but any language is accept.

PS: sorry about my english...

thanks for opportunity

06-23-2000, 05:37 PM
The reason it's hard to write code to draw a tree (efficiently, at least) is because it IS hard...

Imagine if you were to draw all of your user interface using DrawLine() and SetPixel(). You don't do that; you use some pre-cooked objects (menus, buttons, etc) and combine them with graphics done in PhotoShop to generate your UI. For 3D, you have to do the same.

Write a few classes to draw common things you will need that are not too complex. Then re-use these classes where appropriate. For complex objects, use a 3D modeler (the 3D equivalent to PhotoShop). Then write a little parser which will parse the output file format of this modeler into an object you can render in your program.

Last, you might find it interesting to generate some objects algorithmically. If you know how to draw tubes, for example, you can do reasonable trees using a fractal branch-splitting algorithm to generate the tree up-front (say, into a display list) and render it when necessary. That's not the most efficient way, though, because most fast scenery is done with texturing tricks.

06-23-2000, 07:19 PM

I've think about how can i create a complex objects. And i guess if i create a various classes that draws a box, another class that draws a triangules.
And make a list of those objects , in a rudeness way, i can draw a character for example.But i guess isnīt a better way.
So, can you share with me some source sample ? I just wanna take a look, to get an idea of whole thing.