Quake3World.com
https://www.quake3world.com/forum/

distance culling surfaces
https://www.quake3world.com/forum/viewtopic.php?f=16&t=51441
Page 1 of 1

Author:  Captaintoottoot [ 10-10-2015 05:48 PM ]
Post subject:  distance culling surfaces

In Wolfenstein and Spearmint's foliage code, shaders can be given the instruction to have the game cull them at a distance. I'm trying to create way for the game to cull surfaces at a distance by shader, possibly fade too, but without the use of all the foliage instance code and whatnot.

Wolf uses does this in RB_SurfaceFoliage but is there a way to just plug what its doing right into RB_SurfaceTriangles? From a brief glance it looks like wolf records the origin of each instance to be used for distance cull. Instead of using the instance origin is there a way to use the surface's origin?

I'm just trying to cull a lot of needless traingles at a distance. It could be by another approach too. Like all detail brushes would cull at a set distance but leave structural brushes. Or maybe a type of instruction in q3map2 that would convert a func_group into a different type of brushes that culled at distance.

Author:  D-Meat [ 10-11-2015 01:32 AM ]
Post subject:  Re: distance culling surfaces

Captaintoottoot wrote:
I'm just trying to cull a lot of needless traingles at a distance. It could be by another approach too. Like all detail brushes would cull at a set distance but leave structural brushes. Or maybe a type of instruction in q3map2 that would convert a func_group into a different type of brushes that culled at distance.


First of all, I'd only use the structural brushes to show the VIS compiler how to do the area portals, and make all the rest in detail (in my "Lo Sota Olt" map, everything was detail and was inside rectangle boxes made of caulk that were structural).

What you can do, if you're making a mod, is add a new "func" entity type, based of the other, except this one would be static. Then, in the cgame cg_ents.c, you add a special process that picks up your new "func_drawdist" entity and then calculate the distance from the player.
With this method, you could even maybe specify the distance you want directly in the editor and pick it up later !

Author:  Captaintoottoot [ 10-13-2015 12:02 PM ]
Post subject:  Re: distance culling surfaces

Actually I did already do something like this with map models. Adjustable distances and whatnot. I was trying to find another way of doing this without having to use a bunch of models and game entities.

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/