Unable to publish due to high union count

So I’ve been attempting to use @Maximum_ADHD’s VMF Importer plugin, and honestly it works fantastically, I’ve had no issues with the plugin itself. The issue is I am attempting to publish the place and my studio freezes and won’t respond whatsoever.

I’ve tried to upload to different places, I’ve tried to save locally then publish. Nothing seems to work. I’m not sure if this is a matter of it takes a while to publish, but I’ve waited for over 5 minutes with nothing happening.

The map itself is roughly 3011 unions, which I realize is large and is most likely why it takes so incredibly long/freezes. I’m just curious if there is a workaround for large union counts and publish them.

1 Like

You can import the place into Blender and turn the unions into meshes which should fix the problem.

2 Likes

Pretty sure you can just import all your unions into Blender and export them as a mesh (like @Nocentia said)

1 Like

Wouldn’t this ruin the colors and materials though? I would have to recolor and material everything.

Yes but having to recolor is much better than not being able to publish your game.

1 Like

At some point I want to try and optimize for distinct unions so it doesn’t have to upload as many, but it’s easier said than done. I do optimize for cubes at the very least.

It may also help to merge some unions together if you know that they’ll be using one material and won’t have any complex textures applied to them.

7 Likes

I have found that this has only began to occur recently, maps that I used to be able to import and publish to Roblox without issue now cause studio to freeze and occasionally crash when attempting to publish them, when it does very rarely work most of the unions have corrupted and disappeared.

If there was a way to select all unions using a script that would be great but selecting them manually seems like a nightmare in most cases.

My workaround for this issue currently is a script I wrote, basically it goes through all the parts and categorizes them into folders(or models) depending on their BrickColor and Material, then from there I can go through and export each of the groups into seperate OBJS and import them then as mesh parts with location, and color and material them based off of that. This allows for me to get the same result with mesh parts.

I would recommend you delete or move the entities model out of the world model with this script though, as it can be wonky. You can run this in the command bar if you want to, but it can be a bad idea if you accidentally mess something up and ruin all the unions.

image

local Map = game.Workspace.world
local Groups = {}

local UseFolders = true -- If this is true it will use folders rather then models, and vice versa if false.

-- =======================================================
function createGroup()
	if UseFolders then return Instance.new("Folder", workspace) end
	return Instance.new("Model", workspace)
end

for _, v in pairs(Map:GetDescendants()) do
	if v:IsA("BasePart") then
		local BrickColor = tostring(v.BrickColor)
		local Material = string.gsub(tostring(v.Material), "Enum.Material.", "")
		
		if Groups[BrickColor] then
			
			if Groups[BrickColor]:FindFirstChild(Material) then
				v.Parent = Groups[BrickColor]:FindFirstChild(Material)
			else
				local GM = createGroup() -- Group Material
				GM.Parent = Groups[BrickColor]
				GM.Name = Material
			end
			
			
		else
			local G = createGroup() -- Group
			G.Name = BrickColor
			Groups[BrickColor] = G
			
			if Groups[BrickColor]:FindFirstChild(Material) then
				v.Parent = Groups[BrickColor]:FindFirstChild(Material)
			else
				local GM = createGroup() -- Group Material
				GM.Parent = Groups[BrickColor]
				GM.Name = Material
				v.Parent = Groups[BrickColor]:FindFirstChild(Material)
			end
			
		end
		
		
	end
end

It seems to work fairly well, also @Maximum_ADHD, this is unrelated but what is the best way to import Quake 3 maps, everytime I convert them(BSP to MAP) into VMF nothing gets imported, I assume this is from the weird entities but if you have any ideas I would really appreciate it.

1 Like

;D[poll type=regular results=always public=true chartType=bar groups=Events_Staff]

Developer

  • Developer
    [/poll]

I messaged him recently and he told me the following:

"It’s a Roblox problem. Roblox forces each individual union to be uploaded as an asset when publishing, and it does so in bulk immediately cramming everything through when you publish the place.

What you’ll want to do is try and upload it in chunks of 50-100 or so. Move all of the unions out of the world model into a separate rbxm. Then repeat the following process until all of the unions are published:

  • Insert the model into the ServerStorage.
  • Pull about 50-100 unions from the model into the workspace.
  • Save the model in the ServerStorage.
  • Delete it and publish the place."