Vertex animation LODs

Hey peeps, been a while since I posted here!

Has anyone ever given thought about making LODs for (soft) vertex animations? Specifically when I sim something in Houdini and bring it in unreal.

If I decimate the mesh before simming the animation will be different and not sync up. If I decimate the mesh after the sim the vertex numbers will change so I can’ t use the same position texture.

Has anyone done this succesfully?

Hello, from what I understand, vertex animation texture is points based.
Meaning that each points register one line of pixel in Y axis.
Example : you have 1024 points in your mesh, you will have 1024 lines.
Altering the mesh means you need a new texture.

So I guess you will need to swap the texture as you switch lod, I don’t know if its possible and I don’t know if its optimized since you will need to load severals textures. :thinking:

The only reliable way I can see is to create a new mesh and texture for each level and hard swap between. Then unload the unused one quick. That said, I don’t think you would gain much by doing so.

1 Like

Altering the mesh doesn’t mean you need a new texture. You can use the same 1k texture if you reduce your mesh to 64 vertices. You are simply removing lines you don’t need, but the data is still valid for the other lines. Yes, you still have to use the 1k texture, but you can at least reduce the vertex count, better than nothing I guess ¯_(ツ)_/¯

It can most likely be done with custom mip maps of the texture and swapping meshes but… there are probably more low hanging fruit that can be optimized instead? :slight_smile:
Maybe an additional optimization step using custom mips could be to lower the framerate to save a little bit more memory, but that depends on if you can tell Unreal Engine to disregard MipLevels on texture load to skip mips above level X - not sure about that :thinking:

1 Like

Thanks for the replies!

I got it to work by reducing the mesh in houdini and deforming it using the original sim as a guide. Then exported it as a separate mesh + position texture, which I set up using custom lod meshes and material instances in unreal.

Think it’s a pretty decent optimisation since every LOD halves the polycount and texture size, seems good for our project at least.

If anyone is interested I could make an example of how I did it sometime!

2 Likes

out of curiosity, how much of a performance gain do you see?
Are you sure that not all lods are all kept in memory at the same time? you might be saving some vertex rendering but trading those lower vertex numbers might count for an increased memory footprint

I’m not sure about that tbh!

Quite swamped at the moment but I might be able to do some exact profiling soon

Hi, I’m trying to solve the same problem, but I don’t understand how to fix. Could you send me an example file to understand, please?

Hey, I won’t be at my PC work at least another week but I can give you more details when I am.

Simply put it’s exporting a bunch of versions at different poly counts and manually setting each LOD to use the right mesh and textures

Thank you so much! I should make Lods for a flag. I started from a grid and I created a simulation with vellum nodes. Finally I exported in vertex animation. I tried to create Lods using the polyreduce node after simulation loop, but then vertex doesn’t work. At the moment I have created three grids (one for each lod) with different polygon numbers and for each one I have simulated the animation. It works, but in Unreal I can see the switch between a Lod and the other and you can notice that the simulation is not the same as the main lod. If possible I will send you my .hip.
Flag_VertexAnimation_Loop|559x499