Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Creating Map Overviews

  • 30-07-2002 3:32pm
    #1
    Registered Users, Registered Users 2 Posts: 3,945 ✭✭✭


    I was browsing through the new sdk (2.2) and i saw this little tutorial on how to do it. Theres actually a few commands in hl for it. Here it is anyway:

    Map images are normal TGA files (1024x768x24) made as screenshots from the level in HL. So, to create new map images, choose OpenGL 1024x768x32 as video mode for best results. The color green (0,255,0) is used as the transparent color.

    The engine has a special cvar "dev_overview" to create new map images. If set to "1", the engine draws the level from above, looking down, but using orthographic projection instead of the normal perspective projection. This is done to avoid perspective distortions in overview mode. The engine will write the current parameters to the console (make sure to set developer 1 also) like so:

    Zoom 1.63, Map Origin (1903, -1283, -200), Z Min 500, Z Max -1088, Rotated 0

    You can move the map around with keys FORWARD,BACKWARD, RIGHT & LEFT. Maps will be automatically rotated to fit optimally onto the screen. If they are rotated, FORWARD and RIGHT are swapped, etc. Use the keys ATTACK and ATTACK2 to change the zoom. With zmin and zmax you can choose which parts of the map should be drawn. Only polygons between these two values are shown. This can be used to cut off ceilings or other unwanted objects. Origin is your viewpoint projected into the map. The map will be rotated around this point if you move the mouse in overview mode. Zmin can be changed with UP & DOWN and zmax with JUMP & DUCK. If you think you've found the correct values for the new map, simply make a screenshot and remember all of the values, which are needed for the overview description file (to avoid console text on the screenshot set developer 0).



    The screenshot can be edited with any paint program to erase areas or make dark rooms brighter. The final map image could also be the result of several merged screenshots (each with different zmin/zmax values, but some origin and zoom) to get an optimal map representation.

    Next, you have to create an overview description file that will be parsed by the client DLL to get the map image filename and the correct view parameters. This file must be in the overviews\ directory and must have the same name as the current BSP file, but with TXT as its extension. Here is an example (overviews\de_vegas.txt):

    // overview description file for de_vegas.bsp

    global
    {
    ZOOM 1.63
    ORIGIN 1903 -1283 -1088
    ROTATED 0
    }

    layer
    {
    IMAGE "overviews/de_vegas.tga"
    HEIGHT -1088
    }

    The global section describes zoom, the origin point the map is rotated around, and a boolean to indicate if the map image is rotated or not. The layer section describes the map image filename and at which height (z-axis) the map should be shown. The overview mode uses the some coordinate space as the game world and all icons are drawn at the same position as their corresponding entities (you could even combine map and world mode. For example real players and items moving over a map blueprint). In software mode, map images should be BMP files with 512x384x8 resolution.

    Remember, the complete description file parsing, inset window, map projection and drawing code is all within the client DLL and may be changed as desired. It should just give an idea of what could be done with the new multiple views per frame and the LoadMapSprite() functions. It's not really needed for HLTV support.

    If you have any questions about HLTV support in your MOD, send e-mail to (martino@valvesoftware.com ).


Comments

  • Registered Users, Registered Users 2 Posts: 6,810 ✭✭✭DRakE


    Interesting.. seeing as Kaids wanted to know how to do it :D

    -Stuck.


  • Registered Users, Registered Users 2 Posts: 6,810 ✭✭✭DRakE


    Unstuck. It's had it's time in the sun :)


  • Registered Users, Registered Users 2 Posts: 3,945 ✭✭✭Anima


    Fine but i might have to bump it every so offen :D


Advertisement