Talk:Dimensions

From Valve Developer Community
Jump to: navigation, search

Speed of Sound

Does the game seriously follow the laws of the speed of sound? --AndrewNeo 16:00, 10 Nov 2005 (PST)

Yeah, the Speed of sound travels 13,044 units/second or 741mph (there is not a definite speed of sound, but it is commonly measured to be 760mph above sea level) Here are some more interesting dimensions of HL2 Half-life 2 Dimensions --Mykeh 21:43, 1 Dec 2005 (PST)

Actually, that's the page that AndrewNeo was asking about. He wanted to know whether it was correct. I'm curious too. —Maven (talk) 12:30, 2 Dec 2005 (PST)

It sounds totally wrong...nowhere in the SDK have I seen any implementation of a sound travel system...It'd be safe to assume that this isn't in it.—ts2do (Talk | @) 18:14, 2 Dec 2005 (PST)

It's in, in DOD Source at least. It was removed at one point during the CSS beta though, because people thought it was a bug! --TomEdwards 04:17, 27 Jul 2006 (PDT)
Something I really liked in Halo was how the speed of sound applied there - it was great landing a rocket on a distant target, then hearing a muffled bang a second or so later. It did proper doppler, too - which was nice. —Cargo Cult (info, talk) 05:54, 27 Jul 2006 (PDT)

Model Height

Or I'm looking over it, or I'm just mistaking, but I read somewhere that a player model in Valve Hammer Editor was 64 units tall... But if you're going to measure it, it's 78 units, which is far more believable, since:
64 units = 64 inches = (2,54 x 64 =) 162,56 centimeters... Which is very small for a person.
But:
78 units = 78 inches = (2,54 x 78 =) 198,12 centimeters, which is far more believable for a CT or T model...
--CrabbyData 08:18, 23 Apr 2006 (PDT)

Well it says here 73 units—ts2do 10:07, 23 Apr 2006 (PDT)
The models themselves are 72 units high (which translates to 72 inches, or 6 feet), and require 1 unit of clearance to be able to move under something. If I remember correctly, the models from Half-Life 1 are 64 units tall, thus giving them the squashed midget look we find so familiar. --Bwmathis 12:45, 23 Apr 2006 (PDT)
Model height is 78 units
I just made a screenie of it... Look on the right side >>> (Click to enlarge!) --CrabbyData 13:01, 23 Apr 2006 (PDT)
That's incredibly strange. When I create a new map and drop in an info_player_start (or info_player_terrorist, etc), it shows them as 72 units tall. I'll see about uploading some images. I think I know what the issue is. The model itself is made to be 78 units tall, but because of it's animations it never exceeds a physical dimension of 72 units tall. I've tested this in Hammer, and all human models can move beneath anything that is has 73 units of clearance. --Bwmathis 13:08, 23 Apr 2006 (PDT)
Model height is 72 units
Maybe this sounds odd... But you've cutted his head in half :P You're missing the top of his head... But, yes, indeed, I've also tested for the max. height, and I also came to the conclusion of a maximum-passable-standing-space of 73 units :-) --CrabbyData 14:05, 23 Apr 2006 (PDT)
Actually, the difference is that you drew a select-box around the graphical representation of the info_player_counterterrorist, while I merely selected mine, which uses it's own bounding box. --Bwmathis 16:13, 23 Apr 2006 (PDT)
Ok, I agree with you ^^ I selected my model, and indeed it was 72 units... :-) But nevertheless, the maximum standing-walk-through height is 73 units. (Let's move on to the next comments, down here, because those are from a much greater value :P ) --CrabbyData 00:32, 24 Apr 2006 (PDT)
HL2 player's Horizontal Eye-Level is 64 units above floor-level when standing/walking (or 30 units when crouching). So a standing player cannot see a horizontal surface if it is 64 units above his floor-level. Beeswax 15:20, 1 Oct 2007 (PDT)
As to what CrabbyData said, in CS 1.6 I've noticed that spectating also shows heads cut in half through the Geometry in Vents and the like. --JeffMOD 14:49, 3 Aug 2008 (PDT)

About the akilling.org links

Should we remove the broken link to akilling.org, since he took it all down? --Bwmathis 13:20, 23 Apr 2006 (PDT)

Than you've got a really, really big job, since many articals still contain links to akilling.org... I would suggest to change the link to a page at HL2World, since that is also a huge website with tuts and other useful stuff :-) The link at HL2World for HL2 Dimensions is here --CrabbyData 13:38, 23 Apr 2006 (PDT)
I initiated a discussion about akilling links here: Category talk:Level Design with no result, because no one seemed to care... and I think that together we can change (or remove) these links without too much trouble. I'm in, as long as it's a solution that's not going to be changed in a month or so. --Vaarscha 14:37, 23 Apr 2006 (PDT)
Ok, everyone who agrees with us on this will do the following: You'll edit the page where you've found a (dead) akilling.org-link. You'll replace the link to another website, like HL2World or others... Please help this wiki-community by doing a little favor ^_^ I'll start with the link on this page (Dimensions) -> I've edited the bottom line: Changed the link and the name of the headline above it... (I btw also added titels to this page... just to make it a little easier to navigate ^^ --CrabbyData 00:32, 24 Apr 2006 (PDT)

I think this link should be removed because it's useless!—ts2do 07:00, 24 Apr 2006 (PDT)

Which link? You mean the one to HL2 World, which I came up with... Ok, it isn't much extra information, but it's small and handy... So usefull to anyone who wants to see it. The more, the better :P --CrabbyData 07:36, 24 Apr 2006 (PDT)
The HL2 World one just takes the information from akilling.org, so there honestly is no reason to keep it. It wasn't the original reference for the information on this page, so linking to it just grants them undue credit. --Bwmathis 22:46, 29 Apr 2006 (PDT)
Whatever... --CrabbyData 11:24, 30 Apr 2006 (PDT)

Update AKG now permanently sdknuts.net

Sorry for any trouble. --wisemx 04:11, 13 Nov 2007 (PST)

Scaling the game down

Can these variables be changed, in any way? I'm in the planning phase of making a mod which will involve characters who are smaller than normal human-size (including the player characters), and I don't want to just scale the maps up because then the physics would, well, behave like the characters are human-sized but in scaled-up maps. (Example: in a normal-sized world, objects fall at a rate of 32.15 ft/s²; if I simply scaled a map up let's say 5 times, they would appear to fall at a rate of 6.43 ft/s² by the new scale.) —Yar Kramer 19:42, 7 Jan 2007 (PST)

You can modify the gravity. Of course you'll need to scale down the HL2 universe to be able to make maps that don't fit in the Hammer grid at normal scale—ts2do 04:01, 8 Jan 2007 (PST)
Actually, it's going to be a total conversion that doesn't even take place in the HL2 universe. Anyway, that was just an example, and gravity would only affect falling. Apart from anything else, you'd only be able to jump 1/5 as high, not to mention throwing stuff wouldn't behave right either. In short, it would be a map scaled up 5 times where you weigh five times as much. I suppose I should outright say, can one simply scale the player-character's size down?Yar Kramer 10:04, 8 Jan 2007 (PST)
I think you just have to scale up the map, like Rat-style maps for CSS. Pretty easy to do, although finding textures that don't get distorted when stretched or don't tile a lot is difficult. --Kurokun 23:44, 30 Jun 2007 (PDT)
The only way I can think of to change the size of the player's 'physbox' is by creating a 'driveable vehicle' which basically replaces the player's avatar model ingame. I haven't tried it, but in theory, in the qc file if you set a $collisionmodel that is smaller than the default player (72x32x32), and adjust the eye-level etc... It seems you can also tinker to some extent with the player's gravity/mass, steering controls, etc ... It's definitely a hack, but you might just be able to get it to do what you want it to. Beeswax 14:53, 14 Oct 2007 (PDT)

Jumping with Gravity Gun + Physprop: Obsolete?

I'm of course referring to the trick that's used in most of the HL2 speedruns where you find a physprop, jump over it, then fire the Grav gun down at it while you're over it to get massive air.

'Jumping Using the Gravity Gun

Firing a single shot straight down at a prop_physics model (props_debris/metal_panel01a.mdl) = 350 units

Jumping, pulling, then firing, then pulling, and firing again = 400+ units'

Wasn't this patched a while ago through a Steam update? --Kurokun 23:42, 30 Jun 2007 (PDT)

Map Scale vs Character Model Scale

If 1 game unit = 1", then why (according to the dev texture template) is a standard door 108" (9ft) tall when ordinary doors are rarely more than 78" (6.1/2ft) tall? and ceilings; 128" (10.1/2ft) high? should be more like 96" (8ft). It's not just architecture, I've found oversized props too: eg a domestic hob would be about 24x24", but HL2 hobs are 32x32". The curious thing is that these features are consistently 'oversized'. They seem to use a scale of 16 game units = 12" = 1 ft or 1 game unit = 3/4" or 4 units = 3 inches. This scale really works for HL2 architecture, for example a real standard width corridor is 48" (4ft) wide but in HL2 it's 64 units ... it all falls into place, except when we look back at character models.

The biped (human or transhuman) physbox is 72 units tall. 72" (6ft) would be about right, but at the 4:3 scale of the architecture, that character would be 56" (4.1/2ft) tall. A veritable munchkin. Infact, in the game, if you look from a distance at an NPC stood in a doorway, you'll see that yes: they are the size of hobbits! So why isn't this more obvious most of the time? I suspect it's because the player's eyelevel is disproportionately low - at only 64 units above ground (for a 72 unit tall human, that's about shoulder level). As a result, you're always looking up at NPCs standing close by. I suspect that the background may even be scaled up specifically to prevent NPCs appearing to tower above you; to compensate for a distorted view angle ...

This begs the question: why go to so much trouble? why not simply make the 6ft character's physbox and model 96 units tall, with an eyelevel at around 5.3/4ft (92 game units)? Well there seems to be some mysterious problem with changing the size of the player's physbox and viewpoint. In HL1 (using the Quake2 Engine), the player physbox was 64x32x32 units, and eyelevel was 64 units from the ground. In HL2, the physbox was upgraded to 72 units tall, but the eyelevel still seems to be stuck at 64. Could it be that 64 game units is a magic number for the viewpoint geometry in the rendering engine? Perhaps, but then why would a crouched biped's eyelevel be exactly 30 units rather than the more geometrically obvious 32 units above ground? and when it comes to setting the eyelevel for vehicle drivers, I am not aware of any 'height' limitations.

At this point I run out of explanations. The issue does seem kind of fundamental to making levels which look and feel right to the player. IMO it would be very helpful to all mappers if someone could clarify exactly what is going on. Beeswax 02:46, 13 Nov 2007 (PST)

At least when it comes to elements of layout, I find the geometry upscaling to be necessary means of aiding physical navigation. When you do a proportional world-to-game translation at original scale (1:1), the end result is too cramped to serve as a successful game environment (much so in MP). And considering the base-2 nature of texturing, accepting the conventions will also help you mange the scene better, as you naturally round down the surface space to match texture features. --Tourorist
Yes, for mapping it seems practical to use the 4 units : 3 inch scale; for compatibility with base-2 textures and all the HL2 maps that already use this scale! Also failing to accommodate the 'oversize' 32x32 footprint of the physbox has a much more annoying impact on gameplay than the 'undersize' eyelevel. Perhaps the article should note that character models use a 1:1 scale but architecture uses 4:3 ? Beeswax
A fully proportional environment is possible provided a higher level of context-sensitivity is attainable within a particular game framework. The issue is however as much about design decisions as it is about technology that carries them. With HL2 specifically, the two main areas of improvement could be player camera (e.g. dynamic (but subtle) FOV/focus calibration) and player collision (bumping into world/chars with sense and style).
TLDR. Many conventions, like the afforementioned base-2 binding, have been carried over from technology limitations of the past. In the end, these decisions come down to what best stimulates our perception of game world. --Tourorist 05:42, 13 Nov 2007 (PST) Before the spore.
I agree that spatial-perception at close range can be difficult in HL2 (eg melee combat and jumping/climbing puzzles). I had assumed this was just a limitation of the monocular-screen, etc. but if the player viewpoint is more than 30% lower than it should be (like having eyes in your sternum instead of your head) and the FOV used for viewmodels is significantly different from the world FOV, these geometric distortions/displacements could be making proximity perception much more difficult. By photographic standards these are massive distortions and very likely to make spatial relationships seem ambiguous or uncertain, especially the closer they are ... Hmmm. Anyone interested in helping mod an HL2 'optical correction vehicle' to test this theory :) Beeswax 09:06, 13 Nov 2007 (PST)
Here's something to ponder about: why are doors in real life taller than most people? So you feel more confortable. It's a bit of realism added to the game. And base 2 numbers are the easiest numbers for computers to use. --Pdan4 14:52, 21 May 2011 (PDT)

Map Scale Correction

I have corrected the game-unit to imperial/metric section of the article, and added a handy cheatsheet for mappers. Any comments welcome. Beeswax 12:00, 24 Nov 2007 (PST)

Hmm are those listed values correct? 1 units = 0.75 foot = 0.01905 meter? But acoording to a calculator site 0.75 feet = 0.2286 meter. Also I tought 1 units = 1 inch and 1 inch = 0.0254 meter. So thats 2 different values, and none matching the value listed on the dimensions page :/ -Bluestrike 10:30, 10 Jan 2008 (PST)
You're gonna kick yourself Bluestrike ;) Please re-read it: 1 unit = 0.75" (inches) = approx 2cm, which is the same as 16 units = 1 foot. The 1 unit : 1 inch (or 12 unit = 1 foot) scale applies only to Human Character models (for reasons only known to Valve :/), not to Map geometry. For evidence see the Dev/ textures for doors, etc, in Hammer. The Hammer grid-snap increments also lend themselves to thinking of dimensions in terms of feet rather than inches, as they are simple multiples (or fractions) of 16 units. --Beeswax 12:19, 31 Jan 2008 (PST)

Player Collision Hull / Physbox

The crouching player physbox is 36 x 32 x 32 units. However, in order to squeeze through an aperture, the physbox requires 1 extra unit of gap to avoid some friction issue. Therefore the smallest possible passageway is 37 x 33 units. This is very inconvenient for mappers because the gridsnap works only on powers of 2. ie 1, 2, 4, 8, 16, 32, 64, etc. So instead of using gridsnap 32 brushwork to build tight architecture, we have to rough-it-out in 32, then collapse the gridsnap resolution all the way down to 1 in order to 'tweak' the narrow passageways, etc. Working in gridsnap 1 is a pain - the screen is more cluttered and objects can get annoyingly misaligned.

The simplest solution would seem to be change the player's physbox to 35 x 31 x 31 units (crouching) and 71 x 31 x 31 units (standing)? Beeswax

Wax for president! :) --Tourorist 13:06, 24 Nov 2007 (PST)
That'd work, I suppose, but the question is how would you do that? —Yar Kramer 20:48, 24 Nov 2007 (PST)
You could try digging in your uncompiled mod folder for src/game/shared/gamerules.cpp and look for:
static CViewVectors g_DefaultViewVectors(
	Vector( 0, 0, 64 ),		//VEC_VIEW 		(m_vView)
								
	Vector(-16, -16, 0 ),		//VEC_HULL_MIN 		(m_vHullMin)
	Vector( 16,  16,  72 ),		//VEC_HULL_MAX 		(m_vHullMax)
													
	Vector(-16, -16, 0 ),		//VEC_DUCK_HULL_MIN 	(m_vDuckHullMin)
	Vector( 16,  16,  36 ),		//VEC_DUCK_HULL_MAX	(m_vDuckHullMax)
	Vector( 0, 0, 28 ),		//VEC_DUCK_VIEW		(m_vDuckView)
													
	Vector(-10, -10, -10 ),		//VEC_OBS_HULL_MIN	(m_vObsHullMin)
	Vector( 10,  10,  10 ),		//VEC_OBS_HULL_MAX	(m_vObsHullMax)
													
	Vector( 0, 0, 14 )		//VEC_DEAD_VIEWHEIGHT 	(m_vDeadViewHeight)
);
  • VEC_VIEW is the Standing Player's Viewpoint (ie 64 units above origin), and VEC_HULL_MIN and VEC_HULL_MAX are diagonally opposite corners of the Standing Player's Hull.
  • I guess that VEC_OBS_HULL_MIN...MAX defines the Spectator mode Hull (20x20x20 units) ?
  • I suspect that the Player Hull must have a square footprint (like all the NPC Hulls), ie it can be as tall as you like, but width & depth must be the same.
BTW I haven't tried this yet, so please let me know if it works! --Beeswax 10:09, 10 Mar 2008 (PDT)
I think I know why Valve made the player a bit bigger-- so if we have detail work, with size-sensitive textures, say, 32 wide, the player can't slip through to where he's not ought to be. --Pdan4 14:55, May 21 2011 (PDT)
I realize I ought to know these things, but, uh, how do you compile the source code? (Oh, and also, this might be a better way of handling my other question above ...) —Yar Kramer 15:43, 9 Apr 2008 (PDT)
See Installing and Debugging the Source Code (it took me ages to find that page!) --Beeswax 15:57, 9 Apr 2008 (PDT)
Actually My First Mod seems more helpful. --Beeswax 16:06, 9 Apr 2008 (PDT)
Awesome, thanks. And we really ought to make it easier to find, say by putting it on one of the level creation pages ... —Yar Kramer 09:16, 10 Apr 2008 (PDT)
Well it's right there in category:modding but I failed to recognise it when I looked there! ... dunno what to do about that! maybe just put is right at the top of the page in enormous flashing letters or something ;-P --Beeswax 13:19, 10 Apr 2008 (PDT)

Step Over & DoD:S

The step over dimensions listed for HL2 and CS:S in the article may be accurate, but I haven't played those games so I wouldn't know. I do have experience with making custom maps for DoD:S, and having player motion stop when they try to run across objects as low as 6 units if the terrain on either side of the obstruction is relatively flat. Which just kills me because players can navigate stairs with a 8 unit riser with no problem. There's an easy work around, of course, not that I want to put in clips to get folks over these things, but if I have to then that's what I'll do.

Anyone else run into this?

Flashlight

How far away does the flashlight in Half-Life 2 cast? (i.e. the max distance before the flashlight beam is no longer visible) Also, it'd be a good idea to find the Episodic max-flashlight-time —Yar Kramer 22:38, 16 February 2009 (UTC)

Changes units from inches to meters.

I wish to use a scale of 1 unit equals 1 meter. Which of the c++ files should I be looking to alter for the dimensions and speeds of player/npcs/items. So far I have this list I think needs to have changes made.

..\src\game\shared\gamerules.cpp

..\src\game\server\ai_hull.cpp

..\src\game\shared\gamemovement.cpp

..\src\game\shared\gamemovement.h

are there any more files i should be looking into?

Water/Puddle Depth

Would be interested to know what the maximum depth of water can be before the player starts swimming - or rather, the player animation becomes swimming instead of walking.

Also, would anyone know if it is editable? For instance in my mod I have a swamp map where the water is at waist height, unfortunately the models assume the swimming animation (ragdoll pose in this case) where I'd rather have them walking as normal. --NoodlesTux 23:54, 17 November 2009 (UTC)

Not sure about editing it, but I suppose you could use a fake water brush as the visible water, then make a shorter brush with an invisible water texture on top, for the sound and such. --(Pd) 18:18, 27 April 2013 (PDT)

DoD:S Player Prone Collision

Took me a while to figure this out,


The collision height for a prone player in DoD:s is roughly 26 unit

The collision width in prone is probably the same as usual :\ --Optimal 15:04, 4 September 2011 (PDT)

Why not a metric based grid?

Do anybody know, why the source engine not use a metric based grid? --Happygimp0 15:26, 23 May 2013 (PDT)

Surs uses inches because Valve live in the USA. The US is characterized by imperial units of measurement. No metric.