C++Guns – RoboBlog


skip and hint brushwork in praxis

Filed under: Allgemein — Thomas @ 20:11

Hi All!

I want to show you some skip and hint brushwork in praxis.

First I'll show you an overview of the map. The big green dot is where I take the sceenshots in game. And the line of sigth is blocked by one of the walls of the small room.


But If you enable r_speeds 1 and gl_wireframe 2 in game, you see in the next screenshot pretty much everything from the map is rendered. Although the small building (with the NULL texture on top) blocks line of sight. 1200 wpoly nd 5500 epolys are rendered.


To understand this, we'll load vis portal into J.A.C.K. They are stored in the .prt file but first you have to edit the file, otherwise it wont load. Open the file with a simple text editor. Keep the first two lines, then remove every line till the first line with the round brackets. (The number of lines you have to delte is the first number in the file.) It should then look like this:


Or use the tool fixprt. You can download it here https://gamebanana.com/tools/6786

In the next image you see some vis portals in blue which I loaded into J.A.C.K via Menu - Mmap - Load Portal File. There are two vis leafs marked. One in yellow and one in magenta. The start point is in the yellow leaf which goes up to the ceiling. The reason why pretty much everything
is visible from the startpoint is, because its visible from the yellow portal. It dosen't matter the position of the player.


For better understanding I also make a screenshot in J.A.C.K form the opposide of the map where you can see the yellow leaf. As you can see in the next image.


In the next immage the player position is in the magenta leaf, right in front of the wall. Now only the sourounding walls of the map itself are rendered (and the lights (func_detail) and some other stuff on the ground (func_illusionary)). The magenta vis leaf is as high as the small room with the NULL texture.


How we can achieve this? We have to decrease the hight of the yellow leaf to the hight of the small room. We simply split the leaf with the hint texture. In the next image you can see the brush I made. One side with the skip texture and the other with the skip texture. The hint side face up while will2k suggest to face it down. I don't know if there is any technical reason for this. It shoudlnt be. I like to few my maps from top. So put the hint texture on top of the brush make it easyer to see it in J.A.C.K.


After running the compiler and load in the new vis leafs file, the leafs are cutted at the height of the small room. I marked the leafs in magenta as you can see in the next image.


I started the game and take a screenshot from the start positon of the player. It works! The wpolys drops from 1200 to 533 and the epolys from 5500 to 375. (56% and 93% saved. It was worth it!)



Next I'll show you how vis portals/leafs are good to detect world brushes which are potential good for func_detail.

Here I made a lamp hanging from the ceiling. I forgot to turn it into a func_detail and as a result, the vis portals/leafs are cutted according to the rotation of the brush. This really looks not right.


After changing the light brush to func_detail, run compiler, load prt file, the vis leafs/portals look way better :) And of cource the number of vis leafs/portals decreates, which is good (usually).


Thats all for today. Many Thanks to theBoss and bluesed for their patience and endlos tips :)

Here are somegood links:

twhl goldsource tutorials https://twhl.info/wiki/page/category%3AGoldsource_Tutorials

from will2k
A Systematic Approach to Level Design https://gamebanana.com/tuts/10747
Planning To Win Sketching Your Level https://gamebanana.com/tuts/10980
Winning your optimization battle against the source engine https://gamebanana.com/tuts/11178
Optimization Testing in Source Engine https://gamebanana.com/tuts/11586

the wall (german) https://thewall.hehoe.de/
r_speeds und ihre Optimierung https://thewall.hehoe.de/artikel/r_speeds/r_speeds.html

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress