Controling LOD distances for instances?

   935   4   1
User Avatar
Member
810 posts
Joined: April 2017
Offline
Hi!

My HDA is ouputing a point cloud with the s@unreal_instance attribute to fetch megascan assets. It's working nicely but the way the LOD distances were set up on those assets, they become low res too quickly. Is there a way from my HDA to control the distance of all of them? I'm using about 20 different megascan assets so I would like to avoid changing the distances of each asset, one at a time.

...Or maybe there's already a way to make changes like that to multiple assets inside of Unreal?

-Olivier
User Avatar
Member
6 posts
Joined: March 2019
Offline
Howdy!

This sounds like it's probably easiest to set up on the Unreal side.

If you've found a preset LODGroup in the static mesh editor that works for your situation, you can set that for multiple meshes at once via the Property matrix:
- Select the assets in the content browser, right click -> Asset Actions -> Bulk Edit via Property Matrix
- In the LODGroup field, type in the LODgroup you want (has to match exactly of course)
- Hit Enter, the LODs will generate, close and save the assets


Alternatively, if you want extra control in manually setting the number of LODs, screen percentages, reduction amount etc per LOD:
- Set up and fine tune the custom LODs on one asset until it is pure perfection.
- In the content browser, right-click on that asset -> Level of Detail -> Copy LOD
- Select the assets you want to have the same custom LOD setup, right-click -> Level of Detail -> Paste LOD
- All your custom settings will be applied to those assets


Hope this helps!

Attachments:
Screenshot_34.png (36.8 KB)
Screenshot_36.png (91.5 KB)

User Avatar
Member
810 posts
Joined: April 2017
Offline
Thanks for the reply.

I'm only looking to change the distances that the meshes changes LOD level. The megascans already comes with a bunch of LODs in the assets. But your post seams to be about generating new LOD meshes. Or maybe I'm misunderstanding you.

Currently, I have to get super close for the highest resolution LOD to show up. I'd like it to stay highres for a longer distance.
Edited by olivierth - June 21, 2022 10:55:59
User Avatar
Member
6 posts
Joined: March 2019
Offline
olivierth
I'm only looking to change the distances that the meshes changes LOD level.
Ah yep - fair enough!

That second method will still allow you to do that, if you don't change the LODGroup dropdown because that will trigger UE to generate it's own LODs.
- Open up one of the assets, and scroll down to LOD Settings and untick "Auto Compute LOD Distances".
- Scroll up to the LOD Picker and tick "Custom", which will allow you to see all the LODs settings at once.
- You want to decrease the Screen Size value for each LOD, so it's smaller in screen space before that LOD swaps in
- (easiest to just type Screen in the search bar to get them all up or you will be scrolling all over the place).
- Once happy, save and do the right click ->copy LOD, paste LOD etc described in the first post.

Keep in mind of course, because the LOD switching is based on screen size this probably can only work well for assets of similar size, use, and number of LODs. You'll save time by copying and pasting the LOD attributes, but you'll probably need to do it for all your small stuff, then medium stuff, bigger stuff, and there's probably considerations about say a rock vs a tree or piece of foliage etc - but it all depends on your outcome as well.


Hope this helps! Cheers

Attachments:
Screenshot_37.png (182.6 KB)

User Avatar
Member
810 posts
Joined: April 2017
Offline
Thanks for all the detailed explaination, fureler!

I just noticed yersterday that there's an lodX_screensize attribute I can use from Houdini. I might be able to control it from my HDA.

-Olivier
  • Quick Links