# How can I get the correct camera bounds respect the area covered by the region?

Status
Not open for further replies.

#### HerlySQR

Level 24
Hello, in the map I'm working I wanna divide it in "sectors" so I opted to take screenshots of every sector the map and then used them as minimap and change the camera bounds to the region that covers that sector, but the minimap doesn't match with what the camera is seeing, I tried to adapt the region similar as how is defined the initial camera bounds respect to the initial playable game area, but it failed, how should be the correct math?

#### HerlySQR

Level 24
I could do try and error, but it would be too much work for something that maybe is known.

#### HerlySQR

Level 24
I also have the problem that the map is not a square even if the minimap is a square, so the proportion would be wrong.

#### HerlySQR

Level 24
It seems that there is no much information about this, so I will share my test results:

For some reason the height of the game map is 11/12 times the height it should have, so if you took an screenshot to the map to make a minimap you should multiply the height of the screenshot by 12/11.

The size of the region of the camera bounds is smaller than the region, the maths are:
Down: +256
Up: -256
Left: +512
Right: -384

#### HerlySQR

Level 24
I found that my calculations only work if the map is an square, but if is not an square I'm struggling more.

#### HerlySQR

Level 24
Ok, maybe now I think I got it (I hope), if you have a region that will be the camera bounds:
• The width and height should be a multiple of 4096 (Edit: maybe not).
• If the width is bigger than the height, you should multiply the height of the capture of the minimap by 12/11, else you should multiply the width by 11/12.
• When you set the camera bounds using the coords of that region you should reduce the size top and bottom by 256 and left and right by 512.

Last edited:

#### HerlySQR

Level 24
Maybe @InsaneMonster knows how to do it, because I saw he did it in Warcraft Re-Reforged.

#### InsaneMonster

Hosted Project: W3RR
Level 31
Maybe @InsaneMonster knows how to do it, because I saw he did it in Warcraft Re-Reforged.

I do. Make a copy of your map, open it. Then change camera bounds (ONLY CAMERA BOUNDS) in scenario options as you see fit. Then go in View->Camera Bounds (they appear as blue line). Then create a region that matches them. Open then the region, check the boundaries values and write them down or make a screenshot. Then export the minimap. Finally, close the copied map and open the original one. Create a region with the same boundaries. Then use the appropriate trigger actions to set minimap and camera bounds in-game. Check out the actions I use in Re-Reforged, always at the end of cinematics where the change is supposed to take place.

#### HerlySQR

Level 24
I do. Make a copy of your map, open it. Then change camera bounds (ONLY CAMERA BOUNDS) in scenario options as you see fit. Then go in View->Camera Bounds (they appear as blue line). Then create a region that matches them. Open then the region, check the boundaries values and write them down or make a screenshot. Then export the minimap. Finally, close the copied map and open the original one. Create a region with the same boundaries. Then use the appropriate trigger actions to set minimap and camera bounds in-game. Check out the actions I use in Re-Reforged, always at the end of cinematics where the change is supposed to take place.
Yes, it has more sense, but I was liking taking an screenshot of the map (not the minimap) in the editor, because the resulting minimap looks more detailed, and the minimap don't considers some imported stuff.

Status
Not open for further replies.

Replies
4
Views
566
S
[General] Camera bounds
Replies
15
Views
2K
sentrywiz
S
Replies
8
Views
2K
Replies
6
Views
3K
Replies
1
Views
5K