Jump to content
  • Advertisement
Sign in to follow this  
kafbuddy

culling technique for racing game

This topic is 4214 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 am still designing a wipeout clone and at the moment i am thinking about the culling technique i should use. My level is divided into a lot of sectors. The easiest way I could go is to simply test all the sectors against the view frustum, but in large levels this would take too much time. Another technique i could use is occlusion culling. But I don't know if this technique is too time expensive for a simple racing game. Maybe you can tell me some other techniques. greets kafbuddy

Share this post


Link to post
Share on other sites
Advertisement
Maybe some PVS ? (e.g.: precompute offline which sectors are visible from each sector of your level, and when you run the game, you use that to draw only the visible sectors)

Might be an idea, although I wouldn't know how to precompute that for your specific case ;)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Group your sectors and form a hierarchy, then cull this herarchy against your frustum volume. Simple, fast and doesn't need a hardware with occlusion queries.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
well, since its a wipeout clone
bascially your sectors are all in a big curvy line, like a list ordered by their distance down the racecourse, right?

if(sector.idplayer.cursector)sector.render();

off course youll need a special check for near the end of the track where you want the sector id's to wrap around, just use % or something



If that simple approach is no good - ie large portions of the racetrack are visible in the distant background

then I'd just precompute visibility, and give each sector a visible range set of other sectors to render....
if its precomputed then its Free as far as in-race performance goes!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
EDIT above

damn lessthan symbols turn into html tags...

if(sector.id less player.cursector+16 AND sector.id greater player.cursector-1)
then sector.render();

Share this post


Link to post
Share on other sites
Quote:
Original post by royalestel
And for pete's sake slowly fade into view the terrain. Popping is SO 1990's.


Fading is not as easy as it first sounds. For example, take self intersecting geometry such as a simple bush (which may be an 'X' shape when viewed from above) - typically you'd render translucent geometry from back to front, but unless you do this per pixel (for example, using mega-expensive depth-peeling) you can never render the bush correctly and it may result in a more objectionable pop when transitioning from translucent (fading) to opaque (when we can now z-test).

For things like low-poly non-convex bushes, you could 'grow' them with a scale in the instance matrix but this also looks dubious.

The other issue, especially with multiplayer viewports such as on consoles, is having things fade in on a timer rather than by distance (because fading on distance is pretty crap - if you stop the car then potentially lots of stuff is translucent which looks very average). We need a timer for each fading mesh on each viewport. Turns out to be quite messy with lots of fading objects on a 4 player viewport configuration.

EDIT: The best solution is to design the courses so that you don't even need to fade. Obviously.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!