x

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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Shaders - bUsedWithClothing & SkeletalMesh VS SpeedTree = NoGo

(Using v4.5.1) Hi, I'm posting this bug because I spent a whole day trying to solve it and found out a couple things that could save hours to a shader intensive project along with a solution.

Sounds a bit like THIS and THIS

Basically, SpeedTree nodes plugged in the world position offset with the shader's bUsedWithSkeletalMesh and bUsedWithClothing BOTH set to true will create a shader compile error that is VERY hard to trouble shoot if you don't look at the output log. (Did it with a new empty shader and I can replicate this)

The problem was triggered when one of our artist used my Master Masked shader for the first time on a skeletal mesh using cloth for the fur. (Why Masked? I used a noise dither pass to fake translucency with temporal AA).


This caused all Master Masked material instances to be recompiled on editor startup (it automaticaly checked bUsedWithSkeletalMesh and bUsedWithClothing) and all speedtree leaves and billboards were replaced by empty shaders with its instances saying:

MaterialEditorStats:Error: Error [SM5] warning X3206: implicit truncation of vector type MaterialEditorStats:Error: Error [SM5] error X3536: Duplicated input semantics can't change type, size, or layout ('ATTRIBUTE9').

Along with something like this in the output log: Warning: Failed to compile Material /Engine/Transient.PreviewMaterial_0 for platform PCD3D_SM5, Default Material will be used in game.

And a bunch of these copy paste lines with the map containing the speedTree assets: Material /Game/Art/Materials/Masters/M_Master.M_Master needed to have new flag set bUsedWithSkeletalMesh !

Material /Game/Art/Materials/Masters/M_MasterMontagne.M_MasterMontagne needed to have new flag set bUsedWithSkeletalMesh !

Material /Game/Art/Materials/Masters/M_MasterMasked.M_MasterMasked needed to have new flag set bUsedWithSkeletalMesh !

/Art/Materials/Masters/M_MasterMasked.M_MasterMasked needed to have new flag set bUsedWithClothing !

Material /Game/Art/Meshes/Static/Vegetation/SpeedTree/Maple_03/Maple_small_Fronds_Mat.Maple_small_Fronds_Mat needed to have new flag set bUsedWithInstancedStaticMeshes !

LogShaderCompilers:Warning: Failed to compile Material /Game/Art/Materials/Masters/M_MasterMasked.M_MasterMasked for platform PCD3D_SM5, Default Material will be used in game.


If materials were not re-saved (by not looking at the output log for a couple days! oops), all Masked shaders had to be recompiled at every editor startup / restart ( which in our case amounted to 14000 to 36000 shader instructions to compile = 45min of waiting time for every artists working in the editor! And the editor crashes 10-20 / day / artist)

Took a long while to figure out it was those shader booleans that cause shader recompile on editor startup.

I wrote this to tell people to both avoid using SpeedTree with Skeletal+Cloth and avoid editor startup recompiling by checking their output log. The first is an implicit bug that I don't think is useful to solve (why use cloth with speed tree on a skeletal???) but would help to have a specific exception handling when using this shader configuration for future users using gigantic master shaders.

Note it was using r.ShaderDevelopmentMode when I found the exact source. Info found at: https://docs.unrealengine.com/latest/INT/Programming/Rendering/ShaderDevelopment/index.html

(I copy pasted a lot to help google searches)

link text alt text

[5]: /storage/temp/22846-clothnspeedtreeincompatible.jpg

Product Version: Not Selected
Tags:
more ▼

asked Dec 03 '14 at 04:44 PM in Bug Reports

avatar image

lepape2
26 2 4 6

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

1 answer: sort voted first

Hi lepape2,

Thank you for reporting this. I was able to reproduce this by just setting a single speedtree node to use skeletal mesh and clothing without the need for a complex setup. For reference I've submitted a ticket for this with UE-6806.

Thank you!

Tim

more ▼

answered Dec 17 '14 at 06:39 PM

avatar image

Tim Hobson ♦♦ STAFF
48.8k 887 101 878

avatar image Tim Hobson ♦♦ STAFF Apr 21 '15 at 06:27 PM

Apologies for the delay. The engineers have reported back that this is done by design.

avatar image lepape2 Apr 22 '15 at 04:26 AM

Thank you. Its what I thought as well :) It makes sense that the complex vertex manipulations behind clothing, speedtree and skin is way too much to handle and very unlikely to be a voluntary combination anyways.

(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