Normals have nothing to do with culling. Culling is determined by winding order. Provided you have GL_CULL_FACE enabled, and draw all of your polygons in counter-clockwise order, the appropriate things will get culled. But you should definitely provide normals for your trees in either case; it should give you a nice visual improvement.

I wouldn't worry about the performance hit either of sending normals along with vertices. I've *never* seen a performance hit, even with terrain with something like 15k triangles. So long as you're not drawing in immediate mode ( e.g., display lists, vbos ) it's not a big deal. And you'll get lighting.

I've always thought it would be a huge improvement if, when you played glgolf, you were part of the larger course... i.e. in the flyby it would show the other holes laid out in a "golf course" manner. I've always thought it was a bit weird that you're playing this hole in the middle of this huge green world, and I thought it was because you didn't have enough trees, but I think it's the fact that there's no "location." Also, have you thought about adding different varieties of trees? Different shades of grass? Also, your water seems to lack "depth." It would be neat if it shaded deeper blue based on the depth of the terrain...

Don't get me wrong - I think glGolf is awesome, a terrific game. Just some ideas.

Normals have nothing to do with culling. Culling is determined by winding order. Provided you have GL_CULL_FACE enabled, and draw all of your polygons in counter-clockwise order, the appropriate things will get culled. But you should definitely provide normals for your trees in either case; it should give you a nice visual improvement.

- Alex Diener

I guess I never really had the time back when I was learning about 3D program to try to add normals to the trees, but now from experience I know that will be very easy and will do it soon.

WHAT??? Am I really confused on what culling is? I thought you specified what direction a triangle is facing, and then after the translation if it is facing away it gets skipped and isn't drawn. What is this winding thing you are talking about, and is my way right because it works in my motorcycle game and in the terrain for GL Golf.

TomorrowPlusX Wrote:I wouldn't worry about the performance hit either of sending normals along with vertices. I've *never* seen a performance hit, even with terrain with something like 15k triangles. So long as you're not drawing in immediate mode ( e.g., display lists, vbos ) it's not a big deal. And you'll get lighting.

I was saying a performance BOOST, because the video card can skip over half the polygons on the trees, which should reduce the fill per frame alot

Thanks for the suggestions about GL Golf, but it is a side project that is my primary income, I am working on my other games now and only spend a few hours a week on GL Golf.

Jake Wrote:WHAT??? Am I really confused on what culling is? I thought you specified what direction a triangle is facing, and then after the translation if it is facing away it gets skipped and isn't drawn. What is this winding thing you are talking about, and is my way right because it works in my motorcycle game and in the terrain for GL Golf.

Um, the winding order is how you specify which object face is the "front" (per face)

Jake Wrote:WHAT??? Am I really confused on what culling is? I thought you specified what direction a triangle is facing, and then after the translation if it is facing away it gets skipped and isn't drawn. What is this winding thing you are talking about

Culling is removing polygons from the rendering pipeline that don't need to be rendered, to save time.

Like BinarySpike said, vertex winding (again, see red book) is used by the renderer to determine which face is which, which is commonly used for *back-face* culling in OpenGL. IOW, OpenGL won't waste time trying to render faces that would not normally be seen.

You can (and should) also do *object* culling, where you determine whether or not an entire group of polygons (an object) is even within the viewing frustum. That has nothing to do with whether or not a face is showing, but whether a polygon is even within view. OpenGL does not do that for you, you have to calculate that yourself. Basic frustum culling is not very difficult to do, so look into it if you've never heard of it. Object culling can offer *huge* speed benefits if you never knew you were suppose do it.

Normals are normalized vectors (IOW, scaled to be between 0 and 1 in magnitude and centered at the origin) that tell the renderer how to calculate which direction is "outward" from a vertex or polygon. It's used for determining things like light shading on an object for specular highlights and stuff.

AnotherJake Wrote:You can (and should) also do *object* culling, where you determine whether or not an entire group of polygons (an object) is even within the viewing frustum. That has nothing to do with whether or not a face is showing, but whether a polygon is even within view. OpenGL does not do that for you, you have to calculate that yourself. Basic frustum culling is not very difficult to do, so look into it if you've never heard of it. Object culling can offer *huge* speed benefits if you never knew you were suppose do it.

Normals are normalized vectors (IOW, scaled to be between 0 and 1 in magnitude and centered at the origin) that tell the renderer how to calculate which direction is "outward" from a vertex or polygon. It's used for determining things like light shading on an object for specular highlights and stuff.

I do my own object culling, it renders only a 90 degree slice of the trees. I need to learn open gl sometime instead of just reading a few NeHe tutorials and coding

How come when I use just normals for my terrain surface only the ones pointing towards the camera are rendered, is this a coincidence? I used a few cull commands in Open GL.

blobbo Wrote:So how about a build of that new motorcycle game? That one looks terrific.

Shivers is working on a rider model, right now there is a stick figure made of cylinders . I hate showing an unpolished product, but what the hell, after I get a few more buildings and a few mile of road I will, ask me again in two weeks, I have to have something to show for my graduation project then.

Jake Wrote:I do my own object culling, it renders only a 90 degree slice of the trees.

That's gotta be way better than nothing. Frustum culling would narrow that down, but judging by the screenshot you have, maybe not much. I'm sure somebody around here has a good link or two. I wish I could remember where I learned it from originally.

Jake Wrote:How come when I use just normals for my terrain surface only the ones pointing towards the camera are rendered, is this a coincidence?

Most certainly not coincidence, but I don't understand your question enough to divine a response, although it seems like I've seen that before somewhere...