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"

Can you use the radius/scale of an instanced static mesh instance in the material editor?

I've been having issues trying to use the radius or scale of an instanced static mesh instance in a material. Both object radius and object scale get the size of the whole instanced static mesh component, is there a way to get the scale or radius of the individual instance? I've included an image of the material if that helps, it's approximating the temperature of the star based on the radius of the instance, or rather it is meant to.


Product Version: UE 4.19
ue4starmat.png (325.9 kB)
more ▼

asked Jun 13 '18 at 12:34 PM in Rendering

avatar image

11 1 1 3

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

No. You can on the other hand extract the information about world position of an instance, but only for pixel shader not vertex shader (so for base color, not world displacement). Additional you can try to do something out of WorldAlignedTexture.

more ▼

answered Jun 13 '18 at 06:22 PM

avatar image

230 2 12 12

(comments are locked)
10|2000 characters needed characters left

As mentioned, per instance information is only available in vertex shader calls. For example for World Position Offset. Deathrey mentions in this thread that you can pass information from vertex shader to pixel shader by using custom UVs. I think this should also work with Object Scale.

more ▼

answered Jun 14 '18 at 10:31 AM

avatar image

1 2

(comments are locked)
10|2000 characters needed characters left
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