- May 20, 2016
- 20
- 41
Hi, me again! I've finally got a minimum viable product for automated screenshots of a map, which are semi-automatically generated:
screenshots from cp_sulfur_b4
So this is an example of what those automated screenshots produce. My question to you is, do you have any feedback on this? Maybe you know some TF2 commands which render the scene better, or which angles to use in the isometric images? Just let me know!
This is the current process used to generate the images (feedback highly appreciated):
when the map is loaded:
sv_cheats 1
r_drawviewmodel 0
cl_drawhud 0
noclip
mat_picmip -1
r_lod 0
When creating screenshots for the spectator cams:
fog_enable 0
fog_override 1
r_portalsopenall 1
{cycle through all the spectator cameras}
When creating the level overview image:
I estimate the center of the map (by looking at all entities in the map, excluding the 3d skybox and tournament stage). After that I use this to setpos center-x, center-y, center-z. Then I set cl_leveloverview to a scale which shows the whole map (based on the estimated bounds). I cycle through different z axis: [-2000, -1000, 0, 400, 900, 1400] (by adding these values to center-z). After taking different layers, I combine all the layers by overlaying them into a merged file, where black pixels are transparent. I encountered issues where the background became green; in that case I discard that specific image.
When creating isometric images:
fog_enable 1
fog_override 0
c_orthowidth 10000 (my screen is 1920x1080)
c_orthoheight 5625
camortho
First I position the camera on the estimated center of the map, with the z-axis being +1000. Now I make screenshots from two different angles: 45 degrees and 35, rotating the camera in 4 stages around the map. Now I saw this method from the isometric forum post, but I can't seem to figure out what angle they are using. Any help on this?
In case anyone is interested in the source code, let me know. Then I will release it on Github. You need both a Linux machine and Windows machine with TF2 on it though. The code is a bit of a mess atm. so I might need some time to clean it up.
Edit: If you know some nice maps for me to test this on, also let me know!
screenshots from cp_sulfur_b4
So this is an example of what those automated screenshots produce. My question to you is, do you have any feedback on this? Maybe you know some TF2 commands which render the scene better, or which angles to use in the isometric images? Just let me know!
This is the current process used to generate the images (feedback highly appreciated):
when the map is loaded:
sv_cheats 1
r_drawviewmodel 0
cl_drawhud 0
noclip
mat_picmip -1
r_lod 0
When creating screenshots for the spectator cams:
fog_enable 0
fog_override 1
r_portalsopenall 1
{cycle through all the spectator cameras}
When creating the level overview image:
I estimate the center of the map (by looking at all entities in the map, excluding the 3d skybox and tournament stage). After that I use this to setpos center-x, center-y, center-z. Then I set cl_leveloverview to a scale which shows the whole map (based on the estimated bounds). I cycle through different z axis: [-2000, -1000, 0, 400, 900, 1400] (by adding these values to center-z). After taking different layers, I combine all the layers by overlaying them into a merged file, where black pixels are transparent. I encountered issues where the background became green; in that case I discard that specific image.
When creating isometric images:
fog_enable 1
fog_override 0
c_orthowidth 10000 (my screen is 1920x1080)
c_orthoheight 5625
camortho
First I position the camera on the estimated center of the map, with the z-axis being +1000. Now I make screenshots from two different angles: 45 degrees and 35, rotating the camera in 4 stages around the map. Now I saw this method from the isometric forum post, but I can't seem to figure out what angle they are using. Any help on this?
In case anyone is interested in the source code, let me know. Then I will release it on Github. You need both a Linux machine and Windows machine with TF2 on it though. The code is a bit of a mess atm. so I might need some time to clean it up.
Edit: If you know some nice maps for me to test this on, also let me know!
Last edited: