Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


A slight rendering problem...

This topic is 5969 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

OK, as you may already have guessed, I have a problem... I''m making a WorldCraft/gmax/q3radiant type map maker, and everything is going very well, except for one thing... I have a 3D Flat Shaded mode, and when you move around in this environment, you get the problem of overdraw, where polygons are drawn in the wrong order. I implemented a BSP tree to prevent this problem, and it completely eradicated it. No more horrible overdraw. Woohoo... But when there are a largish number of polygons on the screen, perhaps about 350, the BSP tree creation algorithm is incredibly slow. Creating a new object, like a box or something, causes the creation of a new tree, and this can take up to about 6 to 7 seconds. And if you want to modify an existing object, the slowdown is the same, as, again, a new tree has to be created. Now my system isn''t the best (550MHz Athlon, 64Mb RAM, Trident 8Mb-shared graphics card), but this slowdown is ridiculous. I never experienced any problem like this with WorldCraft or q3radiant. I created a trial environment, which contained 384 triangles in my program. The BSP tree creation for the 3D window took about 7 seconds, which is unacceptably slow. I then created the same environment in gmax, and there was no slowdown. Objects appeared instantaneously, rather than like with my system, where you have to wait up to 9 seconds for the object to appear. Now, all these programs, WorldCraft, gmax, q3radiant, they all have to do something to prevent the overdraw problem. There is no way around it. So I was wondering: does anyone know what kind of algorithms they use? I mean, they must have to create a new BSP tree with every change to the environment, right? There''s no way around this either. I am using Visual Basic, but the algorithm is a very efficent one (well, it could be a little more efficent), and the speed of this algorithm with even a small amount of polygons is stupid. I mean, a map in my engine could contain 5000 polygons. The slowdown would be astronomical. I was also thinking that is could be because I''m using Visual Basic, but surely the code couldn''t be that slow, could it? Am I using the wrong algorithm? Should I be using Binary Space Partitioning, or something else? Also, could it be because I am using an MDI window in Visual Basic? Any help is massively appreciated... iNsAn1tY - the place where imagination and the real world merge... Try http://uk.geocities.com/mentalmantle - DarkVertex Coming Soon!

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!