• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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

Status
Not open for further replies.
Level 24
Joined
Jun 26, 2020
Messages
1,852
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?
 
Level 24
Joined
Jun 26, 2020
Messages
1,852
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
 
Level 24
Joined
Jun 26, 2020
Messages
1,852
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:
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.
 
Level 24
Joined
Jun 26, 2020
Messages
1,852
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.
Top