Hide Grass in config file? (foliage corruption?)

Hi,

We’re running into a weird problem and I need a quick solution for it. We’re using only the foliage and not the grass with the world composition and it seems streaming corrupt something as we don’t even use grass anywhere (we tested it but delete the grass type!) and there’s no grass type anywhere in the content (even in the engine content) and when we play the game it suddenly corrupt the foliage and polygons are stretched all over the map in some view angle … the problem is the foliage is not a foliage anymore but a grass? I can hide it only by doing a show instancedgrass and not instancedfoliage??That’s why we want to hide it until we find the problem.

So what I want to do is to hide the landscape grass by disabling/hiding it in the config file as the content is cooked and only have access to the ini file to do it. I’ve tried the grass.enable, showflag.InstancedFoliage, show InstanceFoliage and even the grass.densityscale. I’ve used the ConsoleVariables.ini and also the engine.ini and nothing works.

cheers

Hey Daniel,

If you want a quick and fast solution, as it sounds like your project is holding onto an old reference when you tried to test the landscape grass stuff, would be to delete your Saved, Intermediate, and Config folders. Make a copy of these folders first before doing so, but once you have deleted these, re-open your project to see if that resolved the issue.

Honestly, I would need a way to reproduce this in a new blank project to get a better idea of what is exactly occurring, but it sounds like you definitely have a corrupted reference or asset.

What you can do to help you troubleshoot your issue is to go to the Help > Console Variables option. It will create a searchable HTML file so you can narrow down helpful variables which might help you locate the source of the problem.

Let me know if you have further questions.

Cheers,

Andrew Hurley

Do you have the command line available to you in your packaged project?

Would it be too difficult for you to use the approach I mentioned (deleting those folders) and then re-package the project? If so, that is fine but I feel that would be your best bet to debugging this issue and getting it fixed permanently.

I cannot think of a single variable that would fix the issue you are experiencing. I can investigate in greater detail to see if there is variable or value that you could change to hide the corrupted instances.

Thanks,

Andrew Hurley

Are you able to modify the command line at all?

If you can add the string -ExecCmds=“show instancedgrass” to your command line, that should do the trick. I tested that on PC and it worked.

As for the corruption, I think this might be solved if you integrate the changes made to //UE4/Main/Engine/Source/Runtime/Engine/Private/HierarchicalInstancedStaticMesh.cpp in revision number 28.

  • Jack

My problem is that the content is all packaged (pak file) so no saved/intermediate/config and I want the game to start with the grass hidden. That’s why I was looking for a way to put the command in the ini file so it’s done automatically for a presentation with that build.

cheers

Repackaging is not an option. But the console command is available but it will be more practical to have it in a config file if it’s possible. With the console command show instancedGrass or showFlag.InstancedGrass 0 it works. I was looking to have it done in the config file then no need to type it manually while showing it.

cheers

That’s perfect for the command line!! Thanks!

I’ll ask a programmer to integrate the changelist

cheers