Jump to content
  • Advertisement

Archived

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

Vich

Enhanced frustum culling!

This topic is 5573 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

Hi, I''ve just written a frustum culling class, to use in my project. The next step is to enhance it so I can use large open spaces with BSP maps: To do this, I''ll cull all objects that are far too away. To know which objects to cull and which not, I will make a map analyser to write down all objects of a map with their ID (which is their place in the vertex array). Every object ID will have their size calculated (surface size). This size will be compared to the camera distance. If a large object is far away, the comparison will be within certain values, so that it is acceptable to render it. If the object is far away and relatively small, it won''t be rendered. For example: If a house is about 500 meters away, the general wall structure will be rendered, because those objects are big, but the doors and windows are relatively smaal and not viewable at a large distance so they will be culled. What do you think of this technique. Any suggestions?
"My basic needs in life are food, love and a C++ compiler" [Project AlterNova] [Novanet]

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Yeah, that''s a very good technique. It is ussualy referd to as LOD.

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
Yeah, that''s a very good technique. It is ussualy referd to as LOD.


I think a LOD is more something that actually changes the quality of a whole object, like a person. So that object stays rendered, only with less detail. I''ll just cull the smaller parts of the objects, because they are handled as sperate objects (like they were drawn with GtkRadiant).

"My basic needs in life are food, love and a C++ compiler"
[Project AlterNova] [Novanet]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Any technique that reduces quality where it''s not needed is generaly referred to as LOD. It''s not just a mesh technique.

You could experiment with using different mipped textures, with farther ones having the detail in the texture. For instance, a door frame might be 3d when it''s close up, but far away the wall might just be a flat plane with the door frame in its texture. I''ve been thinking about trying something like that.

Share this post


Link to post
Share on other sites
I think you could call that level of detail, it''s just that there''s only 2 states per object, and the composite objects will definatly have LOD as they change in appearance depending on distance.

I wonder why you would want to do it this way though, won''t this just give more popping as objects move in and out of range? Unless you wait untill an object is 1pixel in size before culling it, but that would be quite inefficient I think. I''d say just go with standard LOD, it''s been used sucessfully by many people before, so you know it works as expected

The technique of culling by size that way is called screen-size dependent culling I believe. For calculating the size, why not just use the objects bounding box, if you one stored for collision and stuff?

Share this post


Link to post
Share on other sites
quote:
Original post by Vich
I think a LOD is more something that actually changes the quality of a whole object, like a person. So that object stays rendered, only with less detail. I''ll just cull the smaller parts of the objects, because they are handled as sperate objects (like they were drawn with GtkRadiant).


Culling small parts of an object would be contribution culling. For example if you had a lot of grass or small bushes in a terrain engine when you get far enough away from them they will be very small on screen, even less than a pixel. In that case you can just not draw them. It can cause artifacts though.

Share this post


Link to post
Share on other sites

Vich: You stated in your original post you will be using BSP maps; my question to you is: why are you not using occlusion culling combined with your frustum culling? I doubt greatly you would achieve nearly as nice results with your "two state" LOD method, over occlusion culling. Anyways, I would implement both, depending on the size of the scenes you are rendering. Unless, the scenes within your bsp maps are rather large, I wouldn't even bother with LOD, as simply culling away vertex buffers specifically optimized for the relative video cards will almost always give better performances.

[edited by - masterg on June 18, 2003 11:17:09 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
Any technique that reduces quality where it''s not needed is generaly referred to as LOD. It''s not just a mesh technique.

You could experiment with using different mipped textures, with farther ones having the detail in the texture. For instance, a door frame might be 3d when it''s close up, but far away the wall might just be a flat plane with the door frame in its texture. I''ve been thinking about trying something like that.


I already implemented mipmapping, so I''ve got that covered Good suggestion by the way.

Share this post


Link to post
Share on other sites
@Taharez:
I don''t want to pop stuff in. The reason I didn''t tell about the transparency fade-in/out is because I didn''t want to go to detailed into the subject.

Share this post


Link to post
Share on other sites
quote:
Original post by masterg

... as simply culling away vertex buffers specifically optimized for the relative video cards will almost always give better performances.



How can I cull those vertex buffers? Is it done with a glext.h function?

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!