cl_leveloverview

Icarus

aa
Sep 10, 2008
2,245
1,210
simple & quick question:

Is it possible to rotate the image 90 degrees during cl_leveloverview without using an external image editor afterwards?
 

Seba

DR. BIG FUCKER, PHD
aa
Jun 9, 2009
2,364
2,728
I don't think so, north is north; also you could have just made a new thread for this but whatever, no harm done
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,696
2,580
If it's a matter of the map not being oriented ideally for your resolution (external image editors are easy to come by; GIMP and Paint.net are good enough for the very basics even if they're a lot worse at everything else than people want to admit), you could try opening the map in Source Filmmaker, going into game mode, punching in the same commands, tabbing back out, and then exporting as a poster; this would allow you to specify, say, a resolution of 1080 by 1920 and then rotate the image in another program before converting to JPEG.
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
There is no way that I know of.

If you want to take higher resolution shots than your monitor will allow, you'll have to stitch multiple images together.
 

Geit

💜 I probably broke it 💜
aa
May 28, 2009
598
1,161
If you run vbspinfo on your map file with the -size command it'll output the bounds of your level like so:

eGFzcW.png


If you take the "No Skybox" Measurements and define the first vector as "WorldMin" and the 2nd vector as "WorldMax" you can get the correct scale and position to take the overview from as follows:

ScreenWidth = 1280
ScreenHeight = 1024

Scale_X = (Abs(WorldMin[0]) + Abs(WorldMax[0]))/ScreenWidth
Scale_Y = (Abs(worldMin[1]) + Abs(worldMax[1]))/ScreenHeight

If Scale_X > Scale_Y then
Scale = Scale_X​
Else
Scale = Scale_Y​

CenterPos[0] = ((Abs(worldMin[0]) + Abs(worldMax[0]))/2.0) + worldMin[0]
CenterPos[1] = ((Abs(worldMin[1]) + Abs(worldMax[1]))/2.0) + worldMin[1]
CenterPos[2] = worldMax[2] + 2000

Then open the map in game and spawn as whatever team and do "setpos_exact CenterPos[0], CenterPos[1], CenterPos[2]" and "cl_leveloverview Scale"

Note that CenterPos[2] is just a guideline value, you can set it to pretty much whatever you want, it'll just change what actually appears in the overview.

If you want to take a super high res photo, you could hypothetically subdivide the above calculations into a uniform grid without too much difficulty.

***
Or just use this quick calculator I hacked together:

[ParseHTML]
<div id="geit_CalcForm">
<label for="geit_ScreenHeight">ScreenHeight</label>
<input type="text" name="geit_ScreenHeight" id="geit_ScreenHeight" value="1024"/><br />

<label for="geit_ScreenWidth">ScreenWidth</label>
<input type="text" name="geit_ScreenWidth" id="geit_ScreenWidth" value="1280"/><br /> <br />

<label for="geit_WorldMin0">WorldMin</label>
<input type="text" name="geit_WorldMin0" id="geit_WorldMin0" />
<input type="text" name="geit_WorldMin1" id="geit_WorldMin1" />
<input type="text" name="geit_WorldMin2" id="geit_WorldMin2" /><br />

<label for="geit_WorldMax0">WorldMax</label>
<input type="text" name="geit_WorldMax0" id="geit_WorldMax0" />
<input type="text" name="geit_WorldMax1" id="geit_WorldMax1" />
<input type="text" name="geit_WorldMax2" id="geit_WorldMax2" />
</div>
<br/>
<p id="geit_SetPos"> setpos_exact <span id="geit_SetPos0">0</span> <span id="geit_SetPos1">0</span> <span id="geit_SetPos2">0</span></p>
<p id="geit_Scale"> cl_leveloverview <span id="geit_Scale0">0</span></p>
<script>
$(document).ready(function(){
$("#geit_CalcForm input").change(function(){
var scale_x = (Math.abs($('#geit_WorldMin0').val()*1) + Math.abs($('#geit_WorldMax0').val()*1))/$('#geit_ScreenWidth').val()*1;
var scale_y = (Math.abs($('#geit_WorldMin1').val()*1) + Math.abs($('#geit_WorldMax1').val()*1))/$('#geit_ScreenHeight').val()*1;

var scale = scale_x > scale_y ? scale_x : scale_y;

$('#geit_SetPos0').html( (Math.abs($('#geit_WorldMin0').val()*1) + Math.abs($('#geit_WorldMax0').val()*1))/2.0 + $('#geit_WorldMin0').val()*1 );
$('#geit_SetPos1').html( (Math.abs($('#geit_WorldMin1').val()*1) + Math.abs($('#geit_WorldMax1').val()*1))/2.0 + $('#geit_WorldMin1').val()*1 );
$('#geit_SetPos2').html( $('#geit_WorldMax2').val()*1 + 2000 );

$('#geit_Scale0').html( scale );
console.log(scale);
});
});
</script>
[/ParseHTML]
 
Last edited:

Geit

&#128156; I probably broke it &#128156;
aa
May 28, 2009
598
1,161
Shouldn't the centerPos algorithm not have the absolute function in them (Since the center of the line segment from -1 to 1 is 0, but by your calculator it would say the center is 2)

You're right - it should be just (WorldMin[0] + WorldMax[0])/2 - I'm not sure why I did it that way in the screenshot plugin, should probably change it at some point, but I'm pretty sure the values are equivilent (it's -1 + 1 = 0) .