Game Development Community

Does Torque have a culling system?

by theguy · in Torque Game Engine · 11/20/2002 (9:57 am) · 23 replies

?
Page «Previous 1 2
#1
11/20/2002 (9:58 am)
and how big is the download for the Torque Engine
#2
11/20/2002 (10:45 am)
Torque has no culling except in the instance of interiors (.dif). Occlusion culling would be very nice, and I think a few teams are working on that, but i dunno if they plan on sharing :)

It's about an 8-15 meg download (i think).
#3
11/20/2002 (10:59 am)
Is Torque written from scratch? (Thought it used DirectX or something). Isn't culling like automatically handled by the Z-Buffer? Damn I thought that and clipping were the first things to consider in a 3D display.
#4
11/20/2002 (11:40 am)
Torque does have culling systems. It couldn't handle all the objects without culling something.

If you want to ask a more specific question then I'd be glad to answer.

If you are concerned about the performance of Torque then don't be. Of course this all depends on what you want to do with it.

- Melv.
#5
11/20/2002 (11:41 am)
Jeremy, you should read some books or articles on 3d graphics.

DirectX is a technology in windows to let you use 3d graphics accelerators. Using it is no different from, say, using the standard libraries for getting input from a user, or using a network library. Torque is "written from scratch" as much as any program is.

(In any case, it uses OpenGL primarily, with DirectX support more of an addition.)

The Z-Buffer lets the graphics card keep track of what pixels are in front of what other pixels.

Torque supports all kinds of culling and clipping. Via OpenGL, it automatically clips everything to fit on screen. It culls the polygons on the terrain (ie, it does continuous leevel of detail), and it culls polygons from models (discrete level of detail). If things are far enough away, it culls them, too (distance culling). In addition, if you're fully inside a building, it culls the outside world.

A Torque source checkout from CVS is about 60 megs. A compiled copy of the executable is about 2-4 megs (for instance, my compile has a bunch of extra crap in it, and it's 4 megs... a leaner version might be only 1.5 or 2 megs). To that figure, add the storage requirements for all your models, script files, sounds files, textures, levels, etc.

Of course, you can also get the Torque CD and save yourself a lot of time, if you're on a slow connection. You'll still want to update from CVS, but it's just that - an update - so you won't have as much to download.
#6
11/20/2002 (12:36 pm)
Guess you schooled me. No wait, my college did that already. I know what DirectX is. You said it uses OpenGL (did you catch when I said "DirectX or SOMETHING"?) OpenGL falls under "or something". My point was that these libraries handle clipping and culling for the programmer using the Z-Buffer technique (assuming it is turned on by the programmer). If Torque indeed did not handle culling like Entropy said, than I concluded that the developers of Torque didn't use an API like DirectX or SOMETHING, making it a program from "scratch". I was shocked when entropy said it didn't, cuz that would kill frame rates, making it a bad engine. But since it does handle culling, then ain't no thang.
#7
11/20/2002 (1:06 pm)
Graphics programmers usually don't call something 'culling' unless it's pre-rasterization, so Z-buffer doesn't usually qualify. Terrain level of detail usually isn't considered to be culling either.

DirectX and OpenGL do make use of backface culling, though.

Anyways, I'm pretty sure this question was about somewhat larger scale culling than backface or Z-buffer.

Since no one's given a proper answer yet, yes, Torque has culling. At least portal based culling and frustrum culling that I've noticed, though I haven't spent a lot of time examing those aspects of the renderer.
#8
11/20/2002 (5:04 pm)
OK, there is a lot of confusion here.

Z-buffering has nothing to do with culling. Or maybe you could say it does pixel-level culling, but that isn't very interesting.

OpenGL and Direct3d are basically equivalent. Clipping against the viewing area is not culling, and this sort of trivial clipping is handled by any graphics library.

Level of detail is not culling either, although it accomplishes much of the same sorts of things for the same reason.

What culling is:
Culling is essentially figuring out which objects, groups of polys, are or may be visible in a scene. Say you have an object made up of 10 billion polygons that is directly behind you. Clipping those 10 billion polys against the view means going through each of those 10 billion polys - bad idea. A better approach is to say "the bounding volume of the object is totally behind me, so I might as well not consider ANY of them."

Culling is generally based on bounding volumes or something similar. In the above example whether the object is 10 polys or 10 billion is irrelevant. If you rely on clipping against the viewing frustrum that number is very relevant, as you perform a check for every poly.

Unless your scene is composed of random independent polygons you can generally cull things out at a group level.

I would also say that the term "culling" a bit misleading. In a pure portal system you don't cull things out, you start with basically nothing and then add things as needed. The basic idea of culling is using things like bounding volumes and distances to quickly determine what is and is not visible at a level above that of individual polygons. Generally culling speed is based on number of logical objects, not number of polygons. Culling is not a graphics-library function (other than extremely simple culling like backface culling) because it works on a higher level than polygons. Systems that include built in scene-management functions can include culling schemes. Generally different types of games are going to have wildy different methods of culling best suited to them.
#9
11/21/2002 (8:51 am)
Oh wow, the philosophy of culling. (C: As I was taught, and as I have learned, culling just means getting rid of polys that can't be seen by the user because of obstructions. Z-Buffering has everything to do with that. I only mentioned cipping becuase it also has to do with eliminating non-essential polys. I didn't say they were the same thing, hence "clipping AND culling".
#10
11/21/2002 (9:08 am)
Sounds like whereever you learned doesn't use the most common meaning for the term 'culling'.
#11
11/21/2002 (9:48 am)
LOL. "The Most Common"?. Come on man. Ask for a description of what a cherry tastes like, and you'll get a thousand different answers. But they all know what a cherry is.
#12
11/21/2002 (9:55 am)
This is a technical term. If you go read a paper on computer graphics and see the word 'culling', you can rest assured they do _not_ mean Z-buffer.
#13
11/21/2002 (10:00 am)
OMG OMG OMG OMG OMG OMG OMG OMG. I didn't say culling means Z-Buffer. I said Z-Buffer is a tool to help in culling.
#14
11/21/2002 (10:08 am)
Then please refrain from saying things like 'My point was that these libraries handle clipping and culling for the programmer using the Z-Buffer technique'

It's not accurate, and it's going to confuse people who don't know better.
#15
11/21/2002 (11:35 am)
I'm confused as to what is inaccurate about that statement. Really, I want to make sure I'm right. That statement you quoted says that it handles culling using z-buffer...that means the z-buffer is a tool to handle culling right? I never said culling = z-buffer.
#16
11/21/2002 (11:45 am)
Not fighting with you, just clarifying. I DID have a pretty bad graphics teacher (thought Radiosity was Ray Tracing for a while). So I just wanna make sure that what I'm saying is right..so that I DONT confuse those that don't know better.
#17
11/21/2002 (12:06 pm)
The following is not for you guys but for anyone reading this but still a little unsure.

I've seen the word 'culling' being used interchangably with the word 'clipping' but I guess that's symantics.

The importance is related to it's usage within the rendering pipeline. Some of this 'culling' takes place as part of a typical fixed-pipeline and some of it preceeds it in the application which can be counted as part of the full rendering pipeline although typically on seperate hardware.

Polygons that represent an object typically undergoe some kind of application or CPU culling technique like portal culling or view-frustum culling but these are generally done in software prior to them being placed into the silicon pipeline.

The vertices that consitute these polygons undergoe linear transformations that can place the vertices into either world or view spaces. It's here that typically the most commonly understood culling takes place, backface elimination where back-facing polygons are removed (if selected to do so).

Next up, these unculled vertices are 'clipped' against the 3 dimensional view volume which typically is a unit cube for performance reasons. This process can create vertices as well as remove them.

These clipped vertices are then projected into screen-space where rasterisation takes place using a hidden polygon removal technique, usually using a Z-Buffer, not typically referred to as culling but as hidden surface removal.

In nearly all the textbooks I've read on this subject, and I've read a few, culling refers to backface elimination and not what is being referred to here which is typically called clipping. Again, symantics really, and not that important.

- Melv.
#18
11/21/2002 (1:49 pm)
Simply put, culling is a whole object rejection, wether that be a whole model, or more usually, a whole polygon.

Anything that removes only part of an object (Z-Buffer, clipping) is not culling.

Here's a good definition:

http://cedar.intel.com/cgi-bin/ids.dll/content/content.jsp?cntKey=Legacy::irtm_3DGLOSS_10536&cntType=IDS_EDITORIAL#C
#19
11/21/2002 (2:19 pm)
So what if half of an object is hidden from another object? I'm talking an object made of many polygons. You have half of it hiding behind another object, and the polygons that aren't seen get taken out of the pipeline. Is that considered culling? I shouldn't have even mentioned clipping, because too many people are referring back to it. Culling and clipping are only related because they deal with not drawing objects that can't be seen anyway.
#20
11/21/2002 (3:04 pm)
Quote:Isn't culling like automatically handled by the Z-Buffer?
No

Quote: and the polygons that aren't seen get taken out of the pipeline.

the hidden 'polygons' are not taken out of the pipeline. 'Pixels' of those polygons are not drawn (removed) only *AFTER* the z-read/cmp in older generation of h/w (hidden 'pixels' are removed slightly earlier in the new generation h/w). Nevertheless, this happen at last stage of the pipeline.

The hidden polygons still need to be transformed to screenspace in order to have the z-buffer functioning if they are not culled by application.
Page «Previous 1 2