How to move painted foliage to another level?

Hello. We are using world composition in our project. But it seems to have too much foliage instances. So we are thinking to move the foliage to separate levels for eventual streaming. The problem is - we don’t know how to achieve that, by default it goes painted on some surface, and if that missing, there will no foliage at all. Any suggestions?

Hi!
I have the same problem in my project…
Waiting Epic to answer…

In the foliage tool, click the third icon down “The selection tool” then under actions click “Select All”.

252087-92e2062e19f41392793cd7663dba16ed.png

Now in the levels display

252088-6fbcfd52886f89d6e1649d36d859ea0d.png

Right click on the level you want to move the foliage to and select “Move all selected foliage to level”.

252089-untitled-1.png

You will then have to save all the foliage types again and your done.

7 Likes

Does anyone know why it is re-saving the foliage types? When I try to move foliage to a different level in 4.25.3, it goes through every type of foliage, asks for a location for the foliage asset and then reports an error that the foliage asset already exists and the foliage is not moved to the selected level.

2 Likes

Any idea how to do this between 2 different projects that don’t share the same level? I’ve tried migrating a level between projects, but am unable to import successfully. The only thing that’s missing at this point is the painted foliage.

Any help would be greatly appreciated.

1 Like

I know I’m two years late to this but

Follow the instructions by ViviDDesign, but in this way:

  1. Create a blank new level within the project that has the foliage you want to transfer. Name it “FoliageOnly” or something.
  2. Drag that level into the Levels Display
  3. Select all your foliage as described in Foliage mode
  4. Right click and select Move Selected Foliage to Level
  5. Save all
  6. Right click the new level > Asset Actions > Migrate
  7. Deselect all dependencies you won’t need, click OK
  8. Select the Content folder of the project you want to migrate your foliage layout to, and execute the task.
  9. In your other project, open the FoliageOnly level
  10. Drag the level you want to transfer your foliage to into the Levels window, same as in step 2
  11. In Foliage mode, select all your foliage again
  12. Right click the target level in the Levels window and select Move Selected Foliage to Level
  13. Save all
  14. Open your target level, enjoy~
2 Likes

Thank you so much for this! Super helpful

sorry where is the Level Display??? I’m using unreal engine 5.2 so things look really different but I can’t seem to find anyone else having the same problems on here.

3 Likes

The “Level” window doesn’t work with world partition unfortunately.

The good news is that there are these two folders inside the content folder:
image

They contain every file used by “OneFilePerActor”, so you can just copy the InstancedFoliageActors across the folders.

If you want to copy just the correct files you can get the name with this option on the right click:

It should return something like this:
C:/YourProject/Content/__ExternalActors__/Maps/MapName/MapName/5/F6/XYCNN57880XXECQHQSF9ST.uasset

I’m glad I found this workaround because I spent many hours painting the foliage and I didn’t want to waste them :sweat_smile:

1 Like

@Ares9323 Once you have the path of the InstancedFoliageActors, what are you then doing with it? The .uasset file has references to the original level it was created in so it doesn’t seem to be as simple as being able to copy and paste the asset from one folder to the other.

To be honest, I’ve just copied it to the other folder and it worked!
I also thought that it wouldn’t have worked, I tried that as a last resort and fortunately it worked!

@Ares9323 Thanks for the reply. Doesn’t seem to work for me unfortunately. In your example

C:/YourProject/Content/ExternalActors/Maps/MapName/MapName/5/F6/XYCNN57880XXECQHQSF9ST.uasset

If you wanted that to then be contained in a different map, where are you pasting it exactly and are you including the preceding folders (the “5/F6” of the path) or just the .uasset?

Also are there other steps required (like those outlined by @ninthtale above) in order for this to work or is it just this step?

You’re right, I should have mentioned that! I copied the exact folder hierarchy, for example from OldMapName/MapName/5/F6/XYCNN57880XXECQHQSF9ST.uasset to NewMapName/MapName/5/F6/XYCNN57880XXECQHQSF9ST.uasset.
In my case the F6 folder was already present because I was transferring foliage from an old version of the map to a more recent version (this might also explain why it worked for me).

I just wish the one file per actor hierarchy was more human readable, it’s so hard to understand what you edited in source control!

Hi there. Thank you for some insight.

My problem isn’t actually moving the foliage from one level to another. That is quite simple as described above. However after moving the foliage assets to a different level I can’t assign these foliage assets to a new landscape which means they do not follow the surface of the landscape as they did before and just float in the air.

This renders the tool pretty much useless as you won’t be able to optimize the foliage afterwards unless you have no height changes coming for the landscape.

I have come to a conclusion that after all these years this is still not possible as ChatGPT couldn’t help me either. According to ChatGPT your easiest choice is to remove the foliage from the old landscape and paint it again on a new one.

Technically it should not be a problem as the paint tool assigns the foliage to a correct landscape on the get go during the painting process but why is it so hard to assign them afterwards to a new one?

In one other thread I saw a tip mentioning that after moving the foliage to a different level and removing the old landscape you should be able to place them over to a new landscape by lifting them above the ground and pressing ”end” button as this places any object on a surface of an object but I guess this only works for meshes as I was unable to replicate this.

Also this solution wouldn’t fix the assignment for the landscape so I wouldn’t bother using it anyways.

Can anyone tell me how to assign foliage assets to a new landscape after moving them from one level to another so they would be placed on to the surface of the landscape as they should?

Digging in to the problem:

With foliage we have ”Instanced Foliage Actors” shown in hierarchy which have ”Foliage Instanced Static Mesh Components” inside of them.

It seems i would need to somehow merge the ”Instanced Foliage Actor” objects or move the individual foliage assets from one instanced foliage actor to another.

Changing the level for them DOES change the component they are assigned to (apparently doing so in semi random manner as there could be multiple Actors on one level during the transfer) but it does not fix landscape assignment…

So I would need to merge the components itself? However I have no way of finding what component a specific individual foliage asset is part of as choosing a foliage asset does not give any information in the details panel. They should be identical as the mesh components are just representation of the types…

Also it seems to change available foliage types according to which Instanced Foliage Actor was lastly loaded to the memory. I don’t have control over this. I found this out when I was loading a different level I had less types in there then in the other one. After doing to copy paste all the types from other actor were replicated to my ”main” foliage actor.

CONCLUSION: I have now realized (while writing this post) that by moving the foliages from one level to another they merged with the actor and created a new type identical to the original asset. This is why they don’t cull like the originals in my actor. This still won’t explain why the tree z position is not updated when I change the terrain.

BUT NOW! When I press the ”end button” after selecting one foliage asset with foliage tool it finally snaps to the surface of the landscape. What is peculiar is that after this feat the connection between the foliage asset and landscape is restored! Now when I sculpt the the labdscape the foliage asset is moved with the surface.

Even if I move the foliage asset now it seems to snap to the correct landscape. This said the use of the ”end” button seems to ”glue” the foliage asset onto the landscape it was placed on thus fixing the relation between the foliage asset and landscape.

I still need to figure out how to move the foliage assets from one mesh component to the other as I don’t want to have duplicate foliage types of the same asset for obvious reasons.

I also need to figure out how to optimize the foliage between different levels. Should I keep them inside one Foliage Actor which is persistent and then just turn them on and off with level straming? As I’m already culling them this wouldn’t bring me any benefit as they are still loaded in the memory at the beginning of the level because the whole foliage actor is persistent.

Tested on UE_5.4.4 09/11/2024

I dont know how ue5 works on this, but in ue4 all you had to do was copy and paste instances between different projects to have the editor handle it all.

Granted, generally I didn’t do this the id10t way.

I had the meshes alteady in the same folder location, with the same materials, and the foliage brushes avaliable to be selected within the foliage painting tool. But still.

Overall the system was amazigly fast at it too, considering you’d be able to copy/paste in around 10b instances in less than 3 minutes.

So IDK if you all are just doing things wrong or if the engine got a new “feature” to deal with, but really, level to level on the same project it just sounds like the whole thing is sheer user error.