Migrating Heads and Accessories to be MeshParts

its unlikely SpecialMeshes will get deprecated until we can script MeshId and TextureId at runtime

yes but if you need to make a union with it, its not happening.

2 Likes

Is there any chance that package ‘heads’ will be converted from hat accessories to actual head meshes? E.g. the crimson claw package’s head is currently a hat accessory. Will it be converted to a head mesh?
If this were the case, already existing packages could make use of the upcoming “facial animations” feature.

2 Likes

To add onto this, Special Meshes can also go a lot smaller than regular parts. I use this all the time for scopes and weapons, as I often need the scale to be super small (and prefer making them in Roblox, but without SpecialMeshes I’d have to use blender)

4 Likes

Not sure if this has been mentioned, but you can not tint the colors of a mesh part’s texture, the way you can a mesh’s texture.
In my game for instance, players are given the option to tint their hair, hat, wing, etc… colors.

I would love to get on board with the new change, but this is going to hold me back.
Is there any plans to have something to tint a mesh part texture, like they have for meshes?

5 Likes

I also use inverted SpecialMesh spheres to create these little circular “atmospheres”. This is another feature that MeshParts lack and don’t support (yet), which is keeping me using SpecialMeshes for the time being.

1 Like

This is going to be very useful! Can’t wait for it to be added.

I agree on that change.
All other body parts are mesh parts, so why not the head and Accessory too?
The way it is right now is just more work and objects to go thru.

You can achieve this same exact effect with MeshParts by uploading an inverted sphere as a mesh. The only difference is that with MeshParts you will be bound to 2048x2048x2048 as the maximum size, or a diameter of 2048 studs.

1 Like

Wouldnt this break scripts inside of hats? like Rbadam’s Smokestack

1 Like

This should be pretty cool, maybe they should re-release some of the heads :slight_smile:

2 Likes

I think it would be nice if there was a ‘demo’ accessory, and maybe even a bundle with the head (not for sale) but just for developers to test when changing their code over.

I for one would like to have my code already checking for the mesh part, and though I could ‘guess’ as to how it can do that, I would love something to test it against.

2 Likes

Heads are receiving a new update! That is good! GG Roblox!

2 Likes

Yeah it’s really valuable for massive games to be able to store meshId’s using string.pack, and be able to efficiently create graphics-only meshes that are performant regardless of scale. My game ends up referencing hundreds of “example” meshparts that are orphaned and only used for cloning. My game freezes when setting a player’s scale to 100000 if the character uses MeshParts, but is highly performant when using SpecialMesh.Scale. My game’s butterfly character also doesn’t work with MeshParts because the minimum size is 0.05, which is larger than every one of the insect’s limbs (they don’t even need physics and are purely graphical.) There are features like scriptable physics and RenderFidelity that would need to be addressed though.

It’s also not-useful how decals are projected onto the side of MeshParts, when with SpecialMeshes, I can add complex overlays that actually use the mesh’s uv layout; I apply this extensively for character customization. SpecialMesh.VertexColor is also essential for enabling a diverse set of character skin colors to be used with a texture.

10 Likes

The only other hats with scripts that aren’t exclusive to admins are the sound hats, and they do not reference the SpecialMesh in the hat, so this update wouldn’t break those scripts. This would affect the Rbadam’s Smokestack specifically due to the fact that it references the SpecialMesh in the hat. However, this could easily be fixed with some simple if thens, so the hat can work with the new update and with the original SpecialMesh in a part.

--Script by Mah_Bucket

local now = os.date("*t")

local newmesh = "rbxassetid://2399307491" -- updated mesh for better texturing

local hw --= true
local tg --= true
local xm --= true
local bd --= true
local pt --= true
local vt --= true
local af --= true

if now.month == 10 and now.day > 21 then --Candy Day
	hw = true
elseif now.month == 11 and now.day > 19 then --Eating Too Much Day
	tg = true
elseif now.month == 12 and now.day > 17 and now.day < 28 then --Free Stuff Day
	xm = true
elseif now.month == 8 and now.day == 27 then --Roblox's Birthday!
	bd = true
elseif now.month == 3 and now.day > 11 and now.day < 20 then --Hunt Short Irishmen Day
	pt = true
elseif now.month == 2 and now.day > 8 and now.day < 17 then --Chocolate and Tears Day
	vt = true
elseif now.month == 4 and now.day == 1 then --April Fool's!
	af = true
end

local emitter = script.Parent:WaitForChild("ParticleEmitter") -- default smoke emitter
local burst = script.Parent:WaitForChild("Burst") -- bursting emitter
if script.Parent.ClassName=="Part" then
	mesh = script.Parent:WaitForChild("Mesh") -- the hat
else
	mesh = script.Parent -- the hat
end

-- holiday cheer
function snowBlower()
	local snow1 = script.Parent:WaitForChild("Snowflake1")
	local snow2 = script.Parent:WaitForChild("Snowflake2")
	while true do
		wait(math.random() * 5)
		snow1.Enabled = false
		snow2.Enabled = true
		wait(math.random() * 5)
		snow1.Enabled = true
		snow2.Enabled = false
		
		-- occasionally blow a ton of snow
		if math.random() > 0.97 then
			snow1.Enabled = false
			wait(4)
			snow1:Emit(22)
			wait(math.random())
			snow2:Emit(22)
			wait(2)
		end
	end
end

-- falliday cheer
function leafBlower()
	local leaf1 = script.Parent:WaitForChild("Leaf1")
	local leaf2 = script.Parent:WaitForChild("Leaf2")
	while true do
		wait(math.random() * 5)
		leaf1.Enabled = false
		leaf2.Enabled = true
		wait(math.random() * 5)
		leaf1.Enabled = true
		leaf2.Enabled = false
		
		-- occasionally blow a ton of leaves
		if math.random() > 0.97 then
			leaf1.Enabled = false
			wait(4)
			leaf1:Emit(22)
			wait(math.random())
			leaf2:Emit(22)
			wait(2)
		end
	end
end

-- irish pride
function cloverBlower()
	local leaf1 = script.Parent:WaitForChild("Clover1")
	local leaf2 = script.Parent:WaitForChild("Clover2")
	while true do
		wait(math.random() * 5)
		leaf1.Enabled = false
		leaf2.Enabled = true
		wait(math.random() * 5)
		leaf1.Enabled = true
		leaf2.Enabled = false
		
		-- occasionally blow a ton of clovers
		if math.random() > 0.97 then
			leaf1.Enabled = false
			wait(4)
			leaf1:Emit(22)
			wait(math.random())
			leaf2:Emit(22)
			wait(2)
		end
	end
end

-- check holidays
if hw then
	emitter.Enabled = false
	emitter = script.Parent:WaitForChild("Hallow") -- use this orange smoke
	if mesh:IsA("SpecialMesh") then mesh.TextureId = "rbxassetid://307022809" else mesh.TextureID = "rbxassetid://307022809" end -- halloween hat texture
elseif tg then
	if mesh:IsA("SpecialMesh") then mesh.TextureId = "rbxassetid://318670022" else mesh.TextureID = "rbxassetid://318670022" end -- thanksgiving hat texture
	spawn(leafBlower)
elseif xm then
	emitter.Enabled = false
	emitter = script.Parent:WaitForChild("Snowflake3") -- use this snow
	spawn(snowBlower)
elseif bd then
	emitter.Enabled = false
	emitter = script.Parent:WaitForChild("Confetti") -- confetti is the hip way to pollute
	if mesh:IsA("SpecialMesh") then mesh.MeshId = newmesh end
	if mesh:IsA("SpecialMesh") then mesh.TextureId = "rbxassetid://2399316028" else mesh.TextureID = "rbxassetid://2399316028" end -- birthday hat texture
	local age = Instance.new("Part") -- part showing Roblox's age
		age.CanCollide = false
		age.Transparency = 1
		age.TopSurface = 0
		age.BottomSurface = 0
		age.Size = Vector3.new(.6,.5,.1)
		age.CFrame = script.Parent.CFrame - Vector3.new(0,.175,.43)
		age.CustomPhysicalProperties = PhysicalProperties.new(0,.3,.5)
	local gui = Instance.new("SurfaceGui")
		gui.CanvasSize = Vector2.new(60,50)
		gui.LightInfluence = 1
	local text = Instance.new("TextLabel")
		text.BackgroundTransparency = 1
		text.Size = UDim2.new(1,0,1,0)
		text.TextScaled = true
		text.TextColor3 = Color3.fromRGB(210,45,32)
		text.Text = now.year - 2006 -- Roblox's age. What an old guy!
	local weld = Instance.new("WeldConstraint")
		weld.Part0 = script.Parent
		weld.Part1 = age
	age.Parent = script.Parent
	gui.Parent = age
	text.Parent = gui
	weld.Parent = script.Parent
elseif pt then
	if mesh:IsA("SpecialMesh") then mesh.MeshId = newmesh end
	if mesh:IsA("SpecialMesh") then mesh.TextureId = "rbxassetid://2399447918" else mesh.TextureID = "rbxassetid://2399447918" end -- pattie's hat texture
	spawn(cloverBlower)
elseif vt then
	emitter.Enabled = false
	emitter = script.Parent:WaitForChild("Heart") -- use this lovely smoke
	if mesh:IsA("SpecialMesh") then mesh.MeshId = newmesh end
	if mesh:IsA("SpecialMesh") then mesh.TextureId = "rbxassetid://2399448372" else mesh.TextureID = "rbxassetid://2399448372" end -- valentine hat texture
elseif af then
	emitter.Enabled = false
	emitter = script.Parent:WaitForChild("Hats") -- use this not smoke
	script.Parent.Smokescreen.Enabled = true
	script.Parent.Transparency = 1
end

-- turn emitter off and on periodically for more variation
while true do
	wait(0.6)
	emitter.Enabled = false
	wait(1.8)
	emitter.Enabled = true
	
	-- occasionally we like to burst some smoke for a different effect
	local rando = math.random()
	if rando > 0.97 then
		emitter.Enabled = false
		wait(4)
		burst.Enabled = true
		wait(2)
		burst.Enabled = false
		emitter.Enabled = true
	elseif rando > 0.969 then --very rare effect just to give people something to be excited about
		emitter.Enabled = false
		wait(4)
		for i,v in pairs(script.Parent:GetChildren()) do
			if v:IsA("ParticleEmitter") then
				v:Emit(math.random(6,10))
				wait(.5)
			end
		end
		wait(2)
		emitter.Enabled = true
	end
end

The only thing that must be added to fix the hat is another part in the hat to blow the smoke properly. Using a MeshPart for the hat makes the smoke come out of the entire hat rather than just the middle as it does currently. Also, MeshId cannot be edited with the script if the hat is a MeshPart, so some of the textures would look broken since they are on the wrong mesh. This just makes it stupidly complicated, as there would now have to be 2 MeshParts, one with the new mesh’s MeshId, and one with the standard one. One of them is visible depending on the event, for example, the birthday event uses the new mesh, and no event uses the standard mesh. This is the best solution I could think of.

4 Likes

This is a big update, I’m tired of particles surrounding the whole player head box rather than the circle. Thanks for this update.

3 Likes

I want to clarify few things though.

  1. There’s hats with scripts. This one for example uses SpecialMesh in it’s script to alter it’s own mesh.
    You might want to check some scripted hats, redo their scripts as well.
    Example: Rbadam's Smokestack Top Hat - Roblox

  2. There’s some hats with VertexColor. That means MeshParts require Color3 property.
    Example: Brainfreeze - Roblox

Wouldn’t it break those hats?

2 Likes

I believe attachment could fix the issue!
Just put particle inside of it. There might be no offset variety like for part though.

2 Likes

I’m excited for this change, this also means exploiters will in future, be unable to delete the meshes in their accessories which means plenty of exploits which do things like make blocks won’t work anymore.

1 Like

I did a fix to address this future change.
Was fun!

https://www.roblox.com/library/5646283851/Rbadams-Smokestack-Top-Hat-MeshPart-compatible