Unable to bulk-set StreamingMesh (LevelOfDetail Property)

I have painted 20,000 trees (foliage) in my game world. However when they were painted they were NOT set-up as StreamingMesh (LevelOfDetail Property). I have tried the following methods to bulk-set streaming mesh property:

  1. Write CMD-Line script that checks all models in workspace that match my tree name, and do model.LevelOfDetail = Enum.ModelLevelOfDetail.StreamingMesh
  2. Manually selecting all tree models in workspace, setting LevelOfDetail to Disabled Then setting to StreamingMesh

Both of these options, while the models LevelOfDetail claims it is StreamingMesh, do not work. When I play the game the models are not visible outside of the streaming radius.

I have also tried copying the trees from 1 project to another (via clipboard), and they are still not visible outside of the streaming radius.

The only solution I currently have is to set the level of detail to Streaming mesh before painting the trees. I really don’t want to repaint 20,000 trees

Expected behavior

I expect that if a Model LevelOfDetail is set to StreamingMesh that the model will act as a StreamingMesh

WhyCantISeeTheseTrees.rbxl (73.2 KB)

1 Like

I found the missing trees:


There are no trees here in studio. These phantom trees also dont stream in when I get close.

3 Likes

You can’t even bulk-set ParticleEmitter colors, either.

1 Like

When I was adjusting some tree models in my game, I had this same issue. One of them had its streaming mesh in the complete wrong location, despite all of the tree meshes being packages, and so they should have had no differences between each other. They seem to aggressively cache and store some kind of magic per instance, with no way for us to correct it when it goes weird.

I’m not sure how much I can trust streaming meshes to work, let alone trusting that they’re efficient, not wasting memory via unintentional duplication, or that they’re properly instanced between indentical models. We have no diagnostic tools. I’ve ended up switching entirely to client side LOD and distance culling, which sucks because now players cannot see the general shape of the forest at a great distance, but my LODs are significantly more performant and more attractive. The tooling we have around working with streaming meshes and general level of detail is shockingly insufficient.

1 Like

Level Of Detail is a bit weird in terms of behavior for how it works, to my understanding it appears your models weren’t actually upgraded to the new Level of Detail streaming.
On the post Improvements to Model Level Of Detail (LOD), the following script is provided to batch upgrade all Level of Detail models, running it on the console with your provided rbxl file appeared to work for me:

descendants = game.Workspace:GetDescendants()

for i, descendant in pairs(descendants) do
	if descendant:IsA("Model") then
		if descendant.LevelOfDetail == Enum.ModelLevelOfDetail.StreamingMesh then
			descendant.LevelOfDetail = Enum.ModelLevelOfDetail.Disabled
			descendant.LevelOfDetail = Enum.ModelLevelOfDetail.StreamingMesh
		end
	end
end

The key difference I’m assuming between what your script was doing and what this does, was yours switched from Default to StreamingMesh, which I’m guessing didn’t register anything, but this forces it to be disabled then StreamingMesh. Like I said, weird behaviour :man_shrugging:

Hope this works on a larger scale, if need be just add a if i % 100 = 0 then wait(0.1) end if its crashing.

By the way, personal suggestion, using images for tree’s in greater distances, as although streaming meshes are good, they might not be sufficient for great amounts of trees, so doing something like an image of the tree for extreme distances would do wonders for the GPU, less data loss.

2 Likes

I was able to resolve the issue by copying the trees from the team create place into a local Roblox place, setting the LevelOfDetail property, then copying back to my team create place.

2 Likes

This should be fixed - everything working?

2 Likes

Are you saying some change was applied?
As per my last post I resolved by doing it locally, though it took nearly 20 minutes for all the streaming meshes to repopulate (Every 4-5 minutes I would click play on the studio instance and count how many streaming meshes were in the game). Going forward if I need to bulk set this property, I will try it in a team create again and report my findings.

1 Like