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. 

PerInstanceRandom and Instanced Static Mesh bug.

In 4.17, unlike 4.16.3, "PerInstanceRandom" node in material doesn't change value with instances of Instanced static mesh component, if they are NOT added in construction script or directly to component. Reproduction steps:

  1. New project or any other.

  2. Create new material with PerInstanceRandom connected to "Emissive Color". Will have to set it to use with Instances as automatic doesn't seem to work.

  3. Create new actor and connect "Add Instance Static Mesh Component" to "Event BeginPlay".

  4. Set mesh to anything and material to the one created in "2.".

  5. After component, connect multiple "Add Instance" nodes with random locations or use for loop.

  6. Observe as all instances have the same color.

If you do this in Construction script or directly click + to add instances to mesh component, PerInstanceRandom works. If you than use Update Instance Transform on the same instances PerInstanceRandom doesn't work.

Product Version: UE 4.17
Tags:
more ▼

asked Aug 11 '17 at 06:20 AM in Bug Reports

avatar image

Naifu
6 1 2 6

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

1 answer: sort voted first

Hello Naifu,

Thank you for reporting this issue. I've reproduce the issue and entered a bug report for the issue. You can use the following link to track the issue's progress: UE-48340.

Have a nice day!

more ▼

answered Aug 12 '17 at 08:58 PM

avatar image HeartMachine Sep 16 '17 at 01:35 AM

hey we're blocked on this. any guidance when 4.17.2 will be released?

avatar image Michel.Dupuis STAFF Sep 18 '17 at 04:59 PM

4.17.2 should be release really soon.

avatar image Naifu Nov 04 '17 at 12:40 PM

After 4.17.2 and 4.18 fixes I have noticed another strange behavior with PerInstanceRandom.

HISMC - Hierarchical Instanced Static Mesh Component

ISMC - Instanced Static Mesh Component

If you rotate HISMC, it will reset/change PerInstanceRandom value to all Instances, unless you disable collisions for HISMC. ISMC doesn't have this behavior. If you update instance transform of an instance its PerInstanceRandom value is reset/changed for HISMC and ISMC.

I have tested this with 4.17.2 and 4.18 release versions.

avatar image Matthew J Nov 06 '17 at 05:12 PM

Hello Naifu,

Thank you for following up and reporting this issue. I've entered a new bug for this particular issue which can be found and tracked here: UE-52049

Have a good one!

avatar image Naifu Jan 19 '18 at 11:16 AM

I have tested the fixes in 4.19 preview 1 and rotating HISMC seems to be fixed. However, with HISMC there is still a problem if you have more instances spawned (at least 6) and you try to get certain instances transforms, add random values to them and update it. What happens is that sometimes two or more instances swap their per instance randomized colors. It is really random and higher sample size or the longer I am modifying transforms makes it worse.

avatar image Naifu Jan 24 '18 at 10:02 AM

Also adding or removing an instance resets PerInstanceRandom of all instances in HISMC.

avatar image Michel.Dupuis STAFF Jan 26 '18 at 08:22 PM

Hi You were right for the Add causing issue with the RandomStream, unfortunately i couldn't repro for the Remove and the code would not allow this either.

As for your other issue, keep in mind that adding/removing instance will alter the orders of the instances in your array, so it might feel like it's not doing what you expect.

avatar image Naifu Jan 26 '18 at 11:05 PM

You are right, removing a random instance changes orders in both ISMC and HISMC. (Instances change color.) Additionally, if I am removing only the last instance in ISMC, order doesn't change contrary to HISMC where it does.

However, adding an instance changes color/order only in HISMC. Also, I have noticed that sometimes when updating Transform in HISMC, instances also swap colors/orders. *Now in 4.19 Preview 2

avatar image SanderBam May 14 '19 at 05:47 PM

I'm running against the same issue, maby removing a instance should just leave the array empty on that location and fill it up when something is added again to not mess with ordering? or somehow copy and past the per instance values to the new seed location.

(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