Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Where in the C++ code are morph targets computed?

Hi all,

I am currently dissecting the unreal source code to try to understand the morph target system but so far I have learned very little.

I notice that the material system requires a bUsedWithMorphTargets flag to be set but I cannot identify where this flag is actually used and I also can't figure out where exactly the morph target animation is computed.

What I am wondering is:

  • Are the blendshapes computed on the CPU or GPU?

  • Where can I find the code where the combination of blendshapes is computed?

Can anyone help answer these questions, Best regards, Tim

Product Version: UE 4.9
more ▼

asked Jan 19 '16 at 05:53 PM in C++ Programming

avatar image

21 1 2 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

There are CPU and GPU versions of the blend shape renderer (depending on your target). The GPU entry point is in: UnrealEngine\Engine\Source\Runtime\Engine\Private\SkeletalRenderGPUSkin.cpp, in the 'Update' function. The morph target data calculation gets ultimate handled in UnrealEngine\Engine\Source\Runtime\Engine\Private\GPUSkinVertexFactory.cpp where you'll find 'Material->IsUsedWithMorphTargets()' referenced.

The animated vertex data for the blend shape is calculated in UnrealEngine\Engine\Source\Runtime\Engine\Private\Components\SkinnedMeshComponent.cpp. 'UpdateActiveVertexAnims' is the entry point there.

more ▼

answered Jan 19 '16 at 11:53 PM

avatar image

1.5k 49 47 216

avatar image DevTad Jan 20 '16 at 11:40 AM

thanks, thats what I needed

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question