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"

How to get the direction vector of light in blueprint

Hi guys, i wana use blueprint script to make a material like cartoon effect, i think i can use "vertexNormalWS" to dot a light direction vector to condition which color for the part of mesh. but the question is i don't known how to get the light direction vector in the blueprint, so anybody can give me some hints? Thanks!

Product Version: UE 4.19
more ▼

asked Apr 04 '18 at 06:09 AM in Blueprint Scripting

avatar image

1 2 1

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

2 answers: sort voted first

so make two vector 3 variables, one where the light starts then one where it ends. Use find lookat rotation from those two vector3s, then get forward vector.

more ▼

answered Apr 04 '18 at 07:55 AM

avatar image

1k 62 45 94

avatar image matrixworld Apr 04 '18 at 09:14 AM

Thank a lot for your reply, based your answer i have another question, how to get the end position of lighting?is it means calculate it by manually? or have any other nodes or methods can get it? Thanks!

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

if you are still looking for the answer, using Forward vector of the light might do the trick

more ▼

answered Jun 13 '18 at 05:58 PM

avatar image

78 4 5

(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