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"

[Closed] How to Force All Mesh Normals to Point Along a Vector

I'm trying to make all of a mesh's normals face along a particular direction.

I want them to point in the opposite direction of the single directional light in the game. This is so that the mesh doesn't have any lighting on it but can still cast and receive light mapped shadows.

Using an unlit / emissive material is no good in this case because I want it to receive light mapped shadows.

Product Version: Not Selected
Tags:
more ▼

asked Apr 03 '15 at 07:09 PM in Rendering

avatar image

Answers.Archive STAFF
1.9k 210 316 690

avatar image Answers.Archive STAFF Apr 03 '15 at 07:09 PM

Hello,

We think this post contains useful information which we would like to share with our public UE4 community. With your approval, we would like to make a copy of this post on the public AnswerHub which includes the discussion but strips out your username and company name.

Please let us know if you are okay with this. Thanks!

avatar image Answers.Archive STAFF Apr 03 '15 at 07:10 PM

Sure, go for it.

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

The question has been closed Apr 29 '15 at 07:50 PM by Stephen Ellis for the following reason:

The question is answered, right answer was accepted


1 answer: sort voted first

Lights aren't exposed to materials because of deferred shading. If this only matters for the sun then you know that is always above the horizon. You can just set the normals to point straight down which will always face away from the sun no matter its direction.

more ▼

answered Apr 03 '15 at 07:09 PM

avatar image

Answers.Archive STAFF
1.9k 210 316 690

avatar image Answers.Archive STAFF Apr 03 '15 at 07:09 PM

When you mean straight down do you mean directly away from the sun? Or down in world space?

avatar image Answers.Archive STAFF Apr 03 '15 at 07:09 PM

I mean down in world space. Assuming there is ground and a horizon then the sun can't get below the horizon and still light objects. That means a normal pointing straight down will be guaranteed to never be lit by the sun regardless of the time of day.

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

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question