I’m using blendshapes to do various body archetypes and am curious how some of you might “retarget” or transfer the blendshape result onto lower resolution LODs that have (obviously) a different vertex order/count. I have ways to solve this in my content creation software, but am seeking to do this in engine to maintain the ability to drive blendshapes at runtime.
Simplygon is really the goto app for handling LODS and blendshapes. Of course this is an offline approach and you still have to export your LODS and blendshapes. To do this in engine is I’m sure doable but you’re asking a lot from it and I’d imagine performance would suffer as a result. What you’re essentially asking for is a runtime wrap deformer which I know would be a huge performance hit. If you already have the exported animation that drives the blendshape data then it should just hook up to LODS with the same track data.
Now I know of 1 game studio that implemented Simplygon into their build process so when game data is exported, the Simplygon API kicks in and produces another asset automagically. But there are some big +/- to that too. My advice, don’t try to do it at runtime if you care about performance.
At runtime is definitely a non-trivial undertaking.
If you have to advise a programmer, it’ll go something like this:
Get a mapping between the LOD verts and the original verts. If they share UVs, you can use the UVs. Otherwise you’ll need to create some other way to map a given LOD vert onto some combination of original verts
Store the blend shape deltas for every frame
Apply the same weighting to the delta that you derived in step 1 to every vert. If a given lod vertex is 25% vert 1, 25% vert2 and 50 % vert 3, add the deltas in the same proportion
Thats’ the generic algorithm but it will probably need massaging – like supersampling the verts to smooth out the influence of small features in the base mesh which unduly influence the verts of the LOD mesh