generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Building Helpers
Home Search
 

Re: Now that Bevels are gone, I have an important question.

Previous Thread :: Next Thread 
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
05 Apr 2013 07:05 AM
I used blockmeshes to remove bevels from my vehicles to make them look nicer.

Would it be of any benfit to remove all the blockmeshes now?
Ie. would it make my game run faster?
Report Abuse
pauljkl is not online. pauljkl
Joined: 23 Oct 2008
Total Posts: 9364
05 Apr 2013 07:55 AM
Parts with a blockMesh will stop parts from casting shadows which may speed up your game but the memory usage is larger with them in.

If you want to remove them, use this:

function removeMesh(place)
for _,child in pairs(place:GetChildren()) do
if child.ClassName == "BlockMesh" then
child:Remove -- Used remove so if you're testing, you can revert
elseif #child:GetChildren() > 0 then
removeMesh(child)
end
end
end
removeMesh(Workspace)
Report Abuse
scacman1967 is not online. scacman1967
Joined: 06 Aug 2011
Total Posts: 9288
05 Apr 2013 08:00 AM
Couldn't you just try it and find out. Then come back and post what you found.

Removing meshes would decrease lag , if there was any to begin with. But I don't think it would be any large reduction of lag.
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
08 Apr 2013 03:25 PM
Scac, I have a few hundred (maybe thousand) meshes in my game. I wanted to ask if there was any point wasting my time to remove them all.
Report Abuse
pauljkl is not online. pauljkl
Joined: 23 Oct 2008
Total Posts: 9364
08 Apr 2013 03:56 PM
Mario, the script I game will run in command bar and will remove all meshes in Workspace, you could change the calling line at the bottom to other services if you want to remove Meshes from those too
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
16 Apr 2013 03:23 PM
I cannot see where to tell it to search for blockmeshes plus I can't see it being able to go through models to parts to find the meshes.
Report Abuse
pauljkl is not online. pauljkl
Joined: 23 Oct 2008
Total Posts: 9364
16 Apr 2013 08:34 PM
Ahh, ill put comments in since you don't understand recursion

function removeMesh(place) -- Function with name and a place to search in
for _,child in pairs(place:GetChildren()) do -- Check all children of the place being searched
if child.ClassName == "BlockMesh" then -- If the child is a BlockMesh
child:Remove -- Remove the BlockMesh
elseif #child:GetChildren() > 0 then -- Otherwise if the child has children itself
removeMesh(child) -- Run this function but inside the object with more than 0 children
end
end
end
removeMesh(Workspace) -- Start the branching down from Workspace by calling the function
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Building Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image