...Welcome to Quake3World...

Be sure to visit our Editing Section and Level Editing Links Archive!
  Quake3World.com Forums
  Level Editing & Modeling
  Lets have a class, on hints.

Post New Topic  Post A Reply
logon | profile | register | preferences | faq | search | game servers

next newest topic | report this topic | next oldest topic
Author Topic:   Lets have a class, on hints.
1sky_hawk1
The Afflicted

Posts: 681
Registered: Mar 2004

posted 07-19-2004 05:32 PM     Click Here to See the Profile for 1sky_hawk1    Click Here to Email 1sky_hawk1    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
I know that there are a few archived tuts on this, but I can't grasp it. Don't even know how to add a hint to a map, much less use one the benefit me any. I know what hints are used for, but I havenít got the slightest idea on how to use them. So if someone has some spare time, please guide me thru the very basics on hinting. Say I have a 2 room map connected by a long hallway. I know I donít want both rooms being drawn at the same time, so how do I achieve this. (come up with any situation you wish, thatís the 1st thing I thought of)
Hipshot
Gaze into the face of Fear

Posts: 551
Registered: Jan 2002

posted 07-19-2004 05:38 PM     Click Here to See the Profile for Hipshot Visit Hipshot's Homepage!   Click Here to Email Hipshot UIN: 31170975UIN: 31170975    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
When I maped to HL I was a killer on HINTs, but its totaly different in Q3 and much more advanced that it was in the HL engine.

I know:

Make a brush, put skip on all sides except for one, where you put hint. Since I don't know any good way to make HINT it in Q3 except for the oldschool cut-corner and door thing I won't be able to add much more.

1sky_hawk1
The Afflicted

Posts: 681
Registered: Mar 2004

posted 07-19-2004 05:47 PM     Click Here to See the Profile for 1sky_hawk1    Click Here to Email 1sky_hawk1    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
Not following you Sorry for the troubles, but I've been putting this off for awhile, it's time I learn. Care to explain what you mean by a skip?
Hipshot
Gaze into the face of Fear

Posts: 551
Registered: Jan 2002

posted 07-19-2004 06:05 PM     Click Here to See the Profile for Hipshot Visit Hipshot's Homepage!   Click Here to Email Hipshot UIN: 31170975UIN: 31170975    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
I'm not the best at explaining technical things, but I'll try, someone can correct me later.

If you don't use the SKIP texture and only HINT, all faces will cut the bsp, if you place SKIP on all sides except one, the bsp will only be cut once, saving triangles and unnescesary splits. SKIP was made possible with Q3map2, common in many games though.

Nice color combination this was, grey-blue and grey-red

[This message has been edited by Hipshot : 07-19-2004.]
1sky_hawk1
The Afflicted

Posts: 681
Registered: Mar 2004

posted 07-19-2004 06:12 PM     Click Here to See the Profile for 1sky_hawk1    Click Here to Email 1sky_hawk1    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
kinda getting it (i think), I kinda thought a hint was like a info_null. That little green box, I'm wrong i guess. So, a hint isn't something you actually look at in Radiant and go, "there is a hint, there's a hint"...it's more in the textures, and compile?

edit: I don't think I get it, ..I wish I could just draw a line around where I don't want the engine to render when I'm in a certain area, wich would be another line...

[This message has been edited by 1sky_hawk1 : 07-19-2004.]
The5thHorsemen
The Afflicted

Posts: 539
Registered: Jan 2003

posted 07-19-2004 06:36 PM     Click Here to See the Profile for The5thHorsemen Visit The5thHorsemen's Homepage!   Click Here to Email The5thHorsemen    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
hint will cause a split . skip will cancel out the other sides of a brush that uses hint.

hint is not as powerfull a tool as it might seem at first .
it can help a map that has good desigen run even better but it will not fix tragic flaws in a poorly layed out level.


[This message has been edited by The5thHorsemen : 07-19-2004.]
seremtan
smile medicine

Posts: 2492
Registered: Nov 2003

posted 07-19-2004 06:51 PM     Click Here to See the Profile for seremtan Visit seremtan's Homepage!    UIN: 292462358UIN: 292462358    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
I've got a better idea: petition ydnar to add a proper portal shader to a future q3map2 build so we can VIS manually instead of being lumbered with the less-than-ideal hint shader.

btw is 'skip' also used for areaportals, i.e. like an all-purpose portal_nodraw?


Hipshot
Gaze into the face of Fear

Posts: 551
Registered: Jan 2002

posted 07-19-2004 07:36 PM     Click Here to See the Profile for Hipshot Visit Hipshot's Homepage!   Click Here to Email Hipshot UIN: 31170975UIN: 31170975    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
seremtan, you can do this in Cod i guess? VIS manually?
skinNCNmaster
Not a Smurf

Posts: 1952
Registered: Jan 2003

posted 07-19-2004 07:51 PM     Click Here to See the Profile for skinNCNmaster Visit skinNCNmaster's Homepage!   Click Here to Email skinNCNmaster UIN: 175895439UIN: 175895439    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
FWIU

skip is a common shader, its used to tell the compiler to ignore the face of the brush its applied to.

hint is a common shader. It helps tell the compiler where to make visibility splits in the bsp. (the vis compile phase)

Yes you do see hints in the editor and go, look theres my hint like forest gump.

They are brushes, 5 faces skip, one face hint. This allows us to deal only with the face with hint applied to it. We use this face to feather our way around corners of sight-lines.

I lay mine out at 45's to my corners with the hint face just touching the inside corner and the angle tilting depending on the shape of the corridor/room whatever.

You can overlap hints also, this is where what i'd call "visibility feathering" where you hint the 45, then over lay two facing 60 degree hints, creating more face hiding depending on what feather youre in.

I believe in the case of jagged or staggered shaped corners you may overlap the hint face into the wall itsself to turn the corner properly, otherwise the gaps will break whatever effect that hint was trying to achieve.

Anywwho, hope this helps.

[No Clan Needed]

[This message has been edited by skinNCNmaster : 07-19-2004.]
The5thHorsemen
The Afflicted

Posts: 539
Registered: Jan 2003

posted 07-19-2004 07:54 PM     Click Here to See the Profile for The5thHorsemen Visit The5thHorsemen's Homepage!   Click Here to Email The5thHorsemen    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
you can "viz " as you call it manually now..
(your actualy setting the portal nodes if I'm correct)

make everything detail then use caulk brush's and hint brush's only to set up the leaf portal structure ..

you can set the block size through the worldspawn to whatever you like .

I don't see much of a differance compared to building with caulk hull .

I think some people seem are little confused by how the level is rendered . http://www.gametutorials.com/Tutorials/OpenGL/Quake3Format.htm


you should hit F1 or help in the Gtk menu tab and read a few of the manuals supplied with the editor there is allot of useful info there.

[This message has been edited by The5thHorsemen : 07-19-2004.]
uh-lee
Mercenary

Posts: 205
Registered: Dec 2001

posted 07-20-2004 03:33 AM     Click Here to See the Profile for uh-lee    Click Here to Email uh-lee    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
You need to have an idea of how the BSP and the PVS (= potential visible set) are created to be able to hint efficiently.

In the BSP phase of compiling the map is broken down into discrete volumes.
This is done by cutting the planes defined by the structural brush faces, one after another. The face that is enclosed by other faces is one BSP split.

The vis phase tests if it is possible to draw a straight line between any two of these volumes without crossing a structural brush. [0]
If it is possible then those two volumes are marked as potentially visible to each other.

In game, if the player is in any given BSP volume the engine draws all volumes that are marked as potentially visible and ignores all others.


By placing a hint face in radiant you force the compiler to split the BSP volume enclosing that face along the hint face.
The vis phase then tests visibility between each of those two volumes and any other volume.

A well placed hint cuts the volume in such a way that of the two resulting volumes one is not in line of sight of a volume of which the other is.

Read this document for further details:
http://www.planetquake.com/spog/stuff/technical.html.

Also, Radiant offers a few plugins that might help understanding the process. IIRC PrtView is one of them.

I hope that helps. Sorry for my English.


[0] There was a discussion some time ago to let detail brushes stop the potential line of sight too, so this may be outdated.

[This message has been edited by uh-lee : 07-20-2004.]
obsidian
Meridanox Duodecim

Posts: 1419
Registered: Feb 2002

posted 07-20-2004 07:35 AM     Click Here to See the Profile for obsidian Visit obsidian's Homepage!   Click Here to Email obsidian UIN: 102149590UIN: 102149590    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
Hinting works by hiding sections of your map (rooms) that the player can't directly see from his current position (line of sight).

In your example of 2 rooms connected by a long hallway, you would be getting a very limited effect with hinting. Hinting will only work in areas where you can limit the player's line of sight.

For example, if the player is standing in one room, he can look directly down the hallway into the next room. In such a situation, the player has a direct line of sight into both rooms of the map - so hinting wouldn't do much good.

Now lets look at an example where the hallway isn't straight, but has a 90-degree turn in it. The player standing in one room can look down the hallway, only to see the bend (a limited line of sight). He can't see into the next room. In this scenerio, you can add a hint brush in the hallway to create a portal. This tells the game engine not to draw the next room until the player crosses the hint brush, which "triggers" the engine to draw the next room.

The skip shader is something that ydnar added. Hints *should* act as a plane, where once the player moves past the plane the next section is drawn. Unfortunately, since we are working with brushes, we tend to texture all sides of the brush with the skip shader, so we end up with as many hinting planes as we have brush faces. So we add skip on the other faces of a hint brush were we don't need splits in the portal. Think of skip as a "nodraw" shader for hint brushes.

------------------
Q3Map2 Shader Manual

obsidian
Meridanox Duodecim

Posts: 1419
Registered: Feb 2002

posted 07-20-2004 08:19 AM     Click Here to See the Profile for obsidian Visit obsidian's Homepage!   Click Here to Email obsidian UIN: 102149590UIN: 102149590    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged

Here, the player is standing in Room A. He can see directly through the straight hallway into Room B. So there is no point adding a hint to this hallway. Looking into Room C however, he does not have a direct line of sight, so we can add a hint brush to the turn in the hallway. Room C is not drawn by the game engine (grayed out).

Note that I added "skip" to the other sides of the hint brush. The actual hint shader is only added to one side of the triangular hint brush.

Here, the player has moved into the hallway. At this location, the entire map is drawn, since he has a direct line of sight into both Room A and C.

Normally, I would add another hint brush somewhere here to hide Room B from being drawn (he does not have a direct line of sight into Room B). But for simplicity's sake, I'm not going to bother. Instead, try to see if you can figure out where where the hint brush should be placed yourself... we can discuss the answer.

Now the player has moved into Room C. Note that the hint brush works both ways - looking back into the hallway, he cannot see Room A and since the hint brush is there, Rooms A and B are not drawn.


These are the fundamentals of hinting. Of course, things aren't always so simple, but the concept is the same, you're just applying them to different situations.

1sky_hawk1
The Afflicted

Posts: 681
Registered: Mar 2004

posted 07-20-2004 10:16 AM     Click Here to See the Profile for 1sky_hawk1    Click Here to Email 1sky_hawk1    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
Ok, about to do a few things and see if I get it. Thank you all as usual for all the help. I've never new a "hint" was a brush. I thought that was some kinda texture to tell the bots to go in a certain room lol...
ribgib
Insane Quaker

Posts: 346
Registered: May 2003

posted 07-20-2004 02:24 PM     Click Here to See the Profile for ribgib    Click Here to Email ribgib    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
If you look at id's sample.maps, you'll see that they used hintbrushes incorrectly. I find this to be pretty weird, as it was John Carmack who invented visblocking.
demolition
The Afflicted

Posts: 642
Registered: Oct 2003

posted 07-20-2004 02:35 PM     Click Here to See the Profile for demolition Visit demolition's Homepage!   Click Here to Email demolition    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
quote:
Originally posted by ribgib:
If you look at id's sample.maps, you'll see that they used hintbrushes incorrectly. I find this to be pretty weird, as it was John Carmack who invented visblocking.

I thought the sample maps are samples as in they are recreations of the original maps? Am I totally wrong in this?

gangster's tisin'

------------------

digibob
coding junky

Posts: 3676
Registered: Feb 2000

posted 07-20-2004 03:22 PM     Click Here to See the Profile for digibob Visit digibob's Homepage!   Click Here to Email digibob UIN: 78106447UIN: 78106447    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
quote:
Originally posted by ribgib:
If you look at id's sample.maps, you'll see that they used hintbrushes incorrectly. I find this to be pretty weird, as it was John Carmack who invented visblocking.

Carmack did not "invent" visblocking, nor is it at all likely that he looked at the .map files very often anyway...

digibob
coding junky

Posts: 3676
Registered: Feb 2000

posted 07-20-2004 03:23 PM     Click Here to See the Profile for digibob Visit digibob's Homepage!   Click Here to Email digibob UIN: 78106447UIN: 78106447    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
quote:
Originally posted by demolition:
I thought the sample maps are samples as in they are recreations of the original maps? Am I totally wrong in this?

gangster's tisin'


Those are the actual map files created by the id level design team for the game, they are not recreations.

1sky_hawk1
The Afflicted

Posts: 681
Registered: Mar 2004

posted 07-20-2004 03:26 PM     Click Here to See the Profile for 1sky_hawk1    Click Here to Email 1sky_hawk1    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
quote:
Originally posted by ribgib:
If you look at id's sample.maps, you'll see that they used hintbrushes incorrectly. I find this to be pretty weird, as it was John Carmack who invented visblocking.

I was wondering about that, I've got it working now (for the most part) @least I understand it...but I tried for a bit on they way the sample maps are...and then I just did what yall said to do

edit: thx to everyone for the links and pics...

[This message has been edited by 1sky_hawk1 : 07-20-2004.]
ribgib
Insane Quaker

Posts: 346
Registered: May 2003

posted 07-20-2004 04:13 PM     Click Here to See the Profile for ribgib    Click Here to Email ribgib    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
quote:
Originally posted by digibob:
Carmack did not "invent" visblocking, nor is it at all likely that he looked at the .map files very often anyway...

I've read that what was so revolutionary about the Doom-engine, what made it so fast, was the fact that Carmack had figured out a way to make it draw only the parts of a level that was visible to the player. And that's what vis-blocking does, doesn't it?


1sky_hawk1
The Afflicted

Posts: 681
Registered: Mar 2004

posted 07-20-2004 05:23 PM     Click Here to See the Profile for 1sky_hawk1    Click Here to Email 1sky_hawk1    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
Obsidian, or whoever knows: I tested it in a map, and works for the most part (the pics helped alot!) But you talk about a skip, the blue part. Do I put that in, or is it there withought me placing it?

edit: btw skinNCNmaster, I'm not following you picture...but I think I got the idea of it now. ty though

[This message has been edited by 1sky_hawk1 : 07-20-2004.]
skinNCNmaster
Not a Smurf

Posts: 1952
Registered: Jan 2003

posted 07-20-2004 06:48 PM     Click Here to See the Profile for skinNCNmaster Visit skinNCNmaster's Homepage!   Click Here to Email skinNCNmaster UIN: 175895439UIN: 175895439    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
if you havent got skip you gotta do two things.

1. make a 64x64 texture for it. Put it in textures/common.
2. add this to your common.shader

code:

textures/common/skip
{
qer_nocarve
qer_trans 0.40
surfaceparm nodraw
surfaceparm nonsolid
surfaceparm structural
surfaceparm trans
}


[No Clan Needed]

[This message has been edited by skinNCNmaster : 07-20-2004.]
1sky_hawk1
The Afflicted

Posts: 681
Registered: Mar 2004

posted 07-20-2004 06:54 PM     Click Here to See the Profile for 1sky_hawk1    Click Here to Email 1sky_hawk1    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
So why did it work in the 1st place...or is that why It kinda works?

edit: nevermind, I'll just do it does it matter if it's a jpeg or tga or just whatever?

[This message has been edited by 1sky_hawk1 : 07-20-2004.]
The5thHorsemen
The Afflicted

Posts: 539
Registered: Jan 2003

posted 07-20-2004 06:56 PM     Click Here to See the Profile for The5thHorsemen Visit The5thHorsemen's Homepage!   Click Here to Email The5thHorsemen    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
uh-lee

dam I havent seen a post from you in a while,

you ever stop by the True Combat forums anymore?

Hipshot
Gaze into the face of Fear

Posts: 551
Registered: Jan 2002

posted 07-20-2004 07:05 PM     Click Here to See the Profile for Hipshot Visit Hipshot's Homepage!   Click Here to Email Hipshot UIN: 31170975UIN: 31170975    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
1sky, .tga
Saint_Trunks
Grunt

Posts: 68
Registered: Jun 2004

posted 07-20-2004 08:03 PM     Click Here to See the Profile for Saint_Trunks Visit Saint_Trunks's Homepage!   Click Here to Email Saint_Trunks    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
So hints actually help A LOT on performance eh.
1sky_hawk1
The Afflicted

Posts: 681
Registered: Mar 2004

posted 07-20-2004 08:27 PM     Click Here to See the Profile for 1sky_hawk1    Click Here to Email 1sky_hawk1    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
Just think what would be easier on a computer. The whole map being drawn the whole time, or just the part your in...
1sky_hawk1
The Afflicted

Posts: 681
Registered: Mar 2004

posted 07-20-2004 08:40 PM     Click Here to See the Profile for 1sky_hawk1    Click Here to Email 1sky_hawk1    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
hahaha, thank you all for the tips. Got the skip texture working and the hints work great! Eveything is working fine now. thx again!

------------------

Hipshot
Gaze into the face of Fear

Posts: 551
Registered: Jan 2002

posted 07-20-2004 09:41 PM     Click Here to See the Profile for Hipshot Visit Hipshot's Homepage!   Click Here to Email Hipshot UIN: 31170975UIN: 31170975    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
quote:
Originally posted by Saint_Trunks:
So hints actually help A LOT on performance eh.

Depends on the situation. Sometimes hints won't work, or won't have any notable effect. If you have a huge flat terrain, with 2 milion patches, you probably can't hint that to any performance better than 0 FPS, if you have a cube-room only, you wont gain anything with a hint across the room.

obsidian
Meridanox Duodecim

Posts: 1419
Registered: Feb 2002

posted 07-21-2004 07:34 AM     Click Here to See the Profile for obsidian Visit obsidian's Homepage!   Click Here to Email obsidian UIN: 102149590UIN: 102149590    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
quote:
Originally posted by ribgib:
I've read that what was so revolutionary about the Doom-engine, what made it so fast, was the fact that Carmack had figured out a way to make it draw only the parts of a level that was visible to the player. And that's what vis-blocking does, doesn't it?

"vis-blocking" isn't even a real term. We say "vis-blocking" to mean "put a structural brush here to create additional splits in the BSP-tree".

What Carmack implemented in the (original) DooM-engine was the BSP (Binary Space Partition). Even this, he did not invent, though he was probably the first person to implement this technique into a game.

quote:
Originally posted by 1sky_hawk1:
Obsidian, or whoever knows: I tested it in a map, and works for the most part (the pics helped alot!) But you talk about a skip, the blue part. Do I put that in, or is it there withought me placing it?

The skip texture and shader comes with Q3Map2. Copy the contents of "common_extra.shader" from the ZIP to your "common.shader". Also extract the other common textures to your "textures/common" directory (you'll see the antiportal and alphaMod textures). I explained why you need skip in my first post of this thread.

quote:
Originally posted by Saint_Trunks:
So hints actually help A LOT on performance eh.

Depends on the situation, of course. In the above example screenshots I posted, Room A and Room B will have no benefit from hints. In fact, adding useless hints will only lengthen the time it takes to compile the vis stage. Hinting between Room A and Room C, however there will be a performance difference, all the geometry in the next room will be entirely culled.


A little on how graphics are optimized for Q3:

On the first level of optimization, we have backface cull. This is the process where the surface normals of the object is calculated and if found to be pointing away from the player, then the face will be culled (removed). There are ways to turn this off, for example, specifying "cull disable/none". You'll notice that when looking at a normal solid block with "/r_showtris 1", that the back faces are not rendered. This process removes approximately 1/3 of all the possible tris that can be rendered in a map.

Though backface cull works well to hide tris that are not facing the player, it does nothing to hide geometry facing the player in the next room, even though the player can't directly see it (there's a wall between him and the stuff being rendered). For this, we have the BSP. The BSP is basically a way to classify and then subclassify each convex volume within the map and then uses it to determine which convex volumes can be rendered at any given time. For the technical details, see this:
http://www.planetquake.com/spog/stuff/technical.html

The compiler does this during the vis stage of the compiling process. Much of it is done automatically, though it's not necessarily smart about everything. For this, it's up to the developer (us mappers) to optimize the BSP-tree by instructing the vis stage on what to take into account (with structual brushes and hint) and what to ignore (converting brushes to detail) when calculating the BSP volumes.

[This message has been edited by obsidian : 07-21-2004.]
uh-lee
Mercenary

Posts: 205
Registered: Dec 2001

posted 07-21-2004 12:42 PM     Click Here to See the Profile for uh-lee    Click Here to Email uh-lee    Edit/Delete Message Copy Reply URL to Clipboard Reply w/Quote  IP Logged
quote:
Originally posted by obsidian:
"vis-blocking" isn't even a real term. We say "vis-blocking" to mean "put a structural brush here to create additional splits in the BSP-tree".

Isn't it more used like "put a solid structural brush so that the vis stage of compiling marks two leaf volumes which can't be connected by a straight line without hitting such a brush as not visible from each other"?

I really, really don't like the word "vis-blocking" though, and don't use it myself.


quote:
Originally posted by The5thHorsemen:
dam I havent seen a post from you in a while,

you ever stop by the True Combat forums anymore?


Hey there 5th ! :-)
Long time no see.

Yeah, I lost interest in TC... and games in general, probably mostly because I don't have enough time anymore.
Haven't visited the TC site for ages.

Where's the TC IRC hangout these days? I'll drop in when I have the time.


All times are PST (US)
next newest topic | report this topic | next oldest topic

Administrative Options: Stick Topic | Close Topic | Archive/Move | Edit Subject | Edit Earmark | Delete Topic

Post New Topic  Post A Reply
Hop to:

Contact Us | Quake3World.com


Ultimate Bulletin Board 5.45c