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"

Texture streaming caches wrong size for movable static mesh

Hi there,

I'm seeing a bug in UE4.17.2 which appears to be there since UE4.15, which is that UStaticMeshComponent::GetStreamingTextureInfo will use GetTextureStreamingTransformScale() for movable meshes. The result of GetStreamingTextureInfo is cached, which means that a movable will have its texture streaming resolution set to be appropriate for whatever size the mesh had when MarkComponentsRenderStateDirty was last called. For meshes that get rescaled during play, this can lead to wildly wrong texture resolutions.

This bug likely also affects landscape grass if it is using rescaled meshes, because in that case, UInstancedStaticMeshComponent::GetTextureStreamingTransformScale will return 1, thus leading to textures that are streamed under the assumption that the grass meshes are rendered at their original scale.

Steps to reproduce:

In constructor, call SetActorScale3D(FVector(0.01))

In Tick, wait 0.1 seconds and then call SetActorScale3D(FVector(1.0))

Observed behavior:

The mesh will be rendered with only 1% of its original texture resolution streamed in.

Expected behavior:

The mesh will render with its original texture resolution.

Temporary ugly Workaround:

subclass UStaticMeshComponent and override GetTextureStreamingTransformScale to always return 1

Cheers, Hajo

Product Version: UE 4.17
more ▼

asked Oct 13 '17 at 11:29 AM in Bug Reports

avatar image

96 3 9

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

0 answers: sort voted first
Be the first one to answer this question
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