Hello to you reader!
A long time ago i had read about bsp trees in a book called “3D games:Rendering and software technology” but i didn’t paid any attension to it because i was very new to OpenGL.
Now, 2 years later, i am reading every resource i can found on bsp trees because i found that they make your code faster, and because my PC is a little old (PMMX 233MHz with Riva 128) i want to speed things up a little.
Now comes the problem. I had read the BSP FAQ that i found in OpenGL.org(yes it is here!!!) and i changed the pseudo code making the appropriate changes. Finally i was able to render a small scene. BUT i have found that my tree is not balanced at all. Also, when i have many polygon intersections the result is not the best. Where can i find a more detailed resource about BSP trees ???
If i make it someday work the way it must work, and i disable OpenGL’s DEPTH_TEST, will the result be the same as rendering the original model with GL_DEPTH_TEST???
Is there a special algorithm for selecting the best BSP partition plane???
How can i do Hidden Surface Removal using BSP trees???
And Now THE Question :
How can i compute new texture coordinates for the splitted polygons??
The real proplem is when after a split the new polygons don’t have the same amount of points as the original polygon.
And something that has nothing to do with OpenGL but with C++ : Why i can’t include a vector<> inside a vector<> with the wanted results??? Let me explain.
I have a model class (GEModel3D) which includes a polygons vector (vector<GEPolygon3D> ). The GEPolygon3D class also includes a vector that keep the vertex id (vector<int> VertID). That way i can keep polygons with any number of vertices (theoritically). But when i render the model, the result is only the first polygon on the list.Not all of the model.If i render the polygons in GL_POINT mode then the result IS all of the models points. If anyone understood what i am taking about and had the same problem please inform me.
And don’t forget,the main problem is BSPs.
I apologise if the topic is not appropriate for that forum but i don’t know any other forum, person or thing to ask and talk about such things.
Thanks in advance.
PS. The GE in front of the classes means Game Engine (Lightning Game Engine specifically). The Thing that i will finish some day.
[This message has been edited by HellRaiZer (edited 01-15-2002).]