Using Hints - Advanced

Using Hints - Advanced

Submitted by: SenceSence on 11 Jan 2019 06:28
Last updated by: SenceSence on 12 Jan 2019 04:53


Using Hints - Advanced

In this tutorial, we will take a look at the so-called hints and what they're used for, what they do and so on. Each tutorial lecture is labeled with a subheader so in case you look for a specific thing you know right away where to find it.

What is a hint?

"Hints" and "Skip" are used as a texture on a world brush which then will tell the engine in which angle/position from the player a w-poly (World Poly) can be skipped if not seen to lower your r-speeds (Render-speeds). This would result in better performance since your machine will render less at once.

First, we need to build ourselves a map where we can assign our hint to, to reduce its r-speeds. In this case, I created a simple room.

I did split its ground into four separate parts, the reason for this was to increase its r-speeds a bit.

Ingame it looks like this, on the top left you can see that it has currently 12 w-polys.
We can take a closer look, how those w-polys are put together. If we open the console now and insert the following command "gl_wireframe 2"
we can see the wireframe of each w-poly.

If we watch the map now out of the "World" we can see the 12 Polys.

As soon as we enter the world the w-polys rise to 16.

And the reason for this is that it also renders the faces which we don't see and those are the ones behind the player.

As long as we were outside of the map those didn't get rendered because I did use a null texture on the outer faces of those world brushes.
So in order to get rid of faces that remain hidden from the player while he is inside the "world" and without using null textures, the hint texture is used.

This is where we will use the hint method. First, we start creating a brush using 1 hint texture on the side and for the other faces skip textures. The hint texture tells the engine if we don't see the w-polys in our viewport and they're behind the hint brush they can be discarded. This works similar to a null texture except that we have to tell now the engine where that NULL texture is, while the engine doesn't find it on its own.

Example of using hints.

We start creating a brush the way mentioned prior.

Now we add the brush to our room.

remember we don't have to apply the brush to left and right, one site is enough to be effective on both sites.
I did mark the hint texture in-game

As we stand in the center of the hint brush nothing happens because the engine things we're on both sites of the hint texture.

But when we move far to the right of the hint, we can see now that the w-polys on the left are discarded.

same with the opposite if we move to the left.

The numbers of w-polys differ because the surfaces are split up unique.

Section 2 - Pyramid Hints

So let's try something out here. If we now place the hints in the map like this it would give the possibility of 4 rendered sections.
Ingame we would have no different effect.

Nothing changes if we stay in the center. But if we move to a corner or wall for example.

Very nice! but what do we do now about the center where the hint has no effect.


We're going to add more hints of course.

We want that if we are at the center some of the faces we don't see get discarded too.

If we add those the engine can now discard even the faces we don't see. Even if we are at the center.

We just lowered our r_speeds yet again. We also can add hints for the top and bottom faces now, it looks like this.

results in a corner now.

we even see changes now if we crouch.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License