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"

Light Function, multiple textures switch on/off

Hi there,

I'm quite a rookie in the Materials creation. Anyway I'm trying to have a light with shadow shapes in it. I can achieve that with Light Functions. What I'd like to do, is to have up to let's say 4 different shapes. Those may be all active and overlapping, or only 2 might be "active" or even none. Now, how can I (using a material instance I guess) tell the material show this one texture but don't show that other ones. Do I have to multiply the tex with 0 or 1 to switch on and off?

On a side note, would it be more performing to have hidden, shadow casting geometry in front of the light or using the above Light Function?

Thank you.

Product Version: UE 4.16
more ▼

asked May 31 '17 at 01:43 PM in Everything Else

avatar image

41 2 2

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

1 answer: sort voted first

you can use LinearInterpolate in material. Using it with 0 will show 1st texture, 1 - 2nd.

Few Lerps with few alpha parameters allows you to interpolate between them.

Or you can use simple Add node.

more ▼

answered May 31 '17 at 02:08 PM

avatar image

4.3k 80 17 104

avatar image Milkazar Jun 01 '17 at 07:02 AM

thanks mate. I'll try it out today. That's what I'm planning to do. Lerp a texture with alpha parameter. Then add it to the next (lerped) texture. If I get it right this way I can set the alpha param to 0 or 1 for each texture and achieve showing or not.

(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