Question regarding making a minimap

Hey, so for a project I’ve been working on, I probably want to implement some sort of minimap system.

I had some ideas in mind, but, one thing I left out, is that as of now the map is being constructed with terrain, not parts. The idea I originally had was to recreate the map in a ViewportFrame, but there’s no way I can stuff the terrain in it…

I just wondered if there’s any way I could automatically recreate the game map in a frame or something, or if my only option with using terrain would be to somehow create an image in Gimp or something…

I’m not really sure what’s optimal to do here, any help is greatly appreciated, thanks!

5 Likes

What you could do is constantly update what is above the player, by creating a new part and having the CFrame much higher than the player, and making that part follow the player. That part will serve as the camera.

After that, in the ViewPort, you just constantly change the CameraSubject to the Camera that is above the player.

That’s what I heard you can do, never tried it though. ( Correct me if this method doesn’t work )

2 Likes

That sounds sweet! I’ll mess around with that idea, thank you!

2 Likes

I’m not sure if I’m setting it up correctly, but nothing is appearing on the ViewportFrame… :confused:

1 Like

Yeah , I figured this wouldn’t work. This would need the map to be cloned, but in your case you need it to work for terrain too. I’ll find you a solution, I’ve seen this work before. ( Ie; in games like JailBreak )

2 Likes

You can use Roblox’s model export tool for this! You can show your terrain as a fully textured MeshPart in the ViewportFrame.

To export the terrain as an obj file, right click on Terrain and click Export selection. Next select a location. It will save an obj (model) file. You’ll need to lower the triangle count in your mesh using a tool like Blender though. You can even export the models on your map in the same mesh!

2 Likes

I just tested this myself and it looks like textures are not actually included for some weird reason. All terrain colors are colored black excluding water which is colored blue. I suppose you could texture this yourself I suppose but it’ll be some work.

Sadly I think my idea wasn’t as good as I thought it would be.

Edit: Apparently the color is not black it just looks that way in the viewer I’m using.

4 Likes

Aw man :sob:

Thanks though, I do still like the idea! I mean, I might not have many other options besides maybe creating a custom image trying to recreate how the actual map looks, then maybe scaling that.

1 Like

You could take a top down screenshot of your map I suppose. You can also use ViewportFrames with a part with a decal of the screenshot so that you can rotate it and get proper cropping.

3 Likes

Oh true! That sounds like the best bet.

1 Like

This plugin is probably the best way to make a minimap - far better than a top-down screenshot in my opinion

1 Like

You can just save up lots of memory by using this

As it outputs a single image of the whole map which you can then use in the ui.

2 Likes