Creating mini maps in Roblox is somewhat difficult, sometimes involving bad practices since there is no other alternative. Ive seen people use tons of UI elements to represent each building on their map, to people who take a screenshot of the map from way above with a FOV of 5. None of these are effective options really.
Today I present to you my Mini Map creator. Using rays to calculate pixels and then sending that pixel data to a local http python server to create a raw BMP file. I want to personally thank @ScriptOn for the fundamental method that this uses. Since studio is a 32 bit program it is limited from getting full performance of the CPU. To counter this, multiple clients are used to calculate pixel data, when clients have calculated a chunk that data is sent back to the Roblox server, and then finally to the python HTTP server. An 8k render with a 4 core i5 CPU takes around 2 hours.
I have released this here: https://www.roblox.com/library/2128738972/Widgeons-MiniMap-Creator-2018
Please read the instructions in “Master” to use.
TO INSTALL PYTHON WITH REQUIRED ELEMENTS:
Since I cant post offsite links here youl have to find a way to google “Download Python”
When installing make sure you add to path!
Open CMD and type “pip install pillow”, followed by “pip install ujson”
If PIP is not recognized then your installation was wrong (PATH in installation has to be checked)
This image shows an incorrect installation, followed by a successful installation of pillow, and update of pip and then a successful ujson installation.
IF YOU GET THIS ERROR WHEN INSTALLING UJSON :
YOU CAN INSTALL BY GOOGLING: “Build Tools for Visual Studio 2017 download”
MAKE SURE YOU SELECT VISUAL C++ BUILD TOOLS WHEN INSTALLING:
CREATING MINI MAP IMAGES:
WELCOME TO THE BEST PART! Now we get to make images! Here is an example of an image created using the script:
-Auto terrain material to color
Changing Image Size:
The scripts default to 8192x8192px images.
If you want to make a 512x512 image instead you have to change the following variables:
In Master: Change PxHeight to the height of your image (512)
In Client: Change Width to the width of your image (512)
In Python Script: Change Width and Height to the width and height of your image (512,512)
CHANGING STARTING WORLD POSITION:
To capture and scale your map correctly with the script two variables have to be changed. In Client, Start is a world pos value, this is where the top left of your image will start. (These should be Negative X and Negative Z values) The Y position of the Start var, is where the rays will start firing from, this should be a little bit above the highest part in your map. If the highest part is 1200 studs high then this Y value should be >1200. Scale is how many Studs per pixel it will render. Image Width HAS to be divisible by Scale, for example, 512x512 with a scale of 6 WILL NOT WORK since 512/6 = 85.33… For example if you have a 4kx4k map with a 512x512 image the following would apply: Start would be Vector3.new(-2048,HighestPart,-2048) and the Scale would be 8 (4096/512=8) If you change the Y component of Start, youl have to change Line 68, where the second parameter of the ray is Vector3.new(0,-300,0), that -300 is the LENGTH of the ray, this should be the same as the Start Y but negative. Changing this ray length will directly impact your render time as the performance of a ray is partially based off the length of it.
If your creating LARGE LARGE images, your data string may get too long, to counter this change LinesPerAssign to a lower number to lessen data per send. Youl have to change LinesPerAssign in Master AND the Python script.
CHANGE PYTHON SERVER DESTINATION:
Change the Master PostAsync destination to your local computer on port 8080, you can find your local IP by looking at CMD -> ipconfig
MAKE SURE HTTP IS ENABLED
Follow instructions in Master to start server!
Once started your Roblox server should start sending requests to each client, if a client disconnects the server will timeout and reassign that chunk to a valid client. Clients will timeout after 30 min due to Roblox’s AFK, you can use anti-AFK programs to counter this if you render a map overnight, or alt tab really fast through the clients and reset the roblox AFK counter. The Roblox Server output will print an ETA for when the image should finish. Once all lines have completed the python script will auto open the final image in the default image viewer.
TURN OFF STREAMING ENABLED
I am by no means an expert on rendering or python, I just made this script to be functional and since I haven’t seen any other GOOD open source mini map creator I decided it was time for me to release mine. If you want to fork this and make it better, please do and post it here