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"

Camera Facing Materials On 2 Axes

Hi,

I'm using a method of rotating a material to face the camera found here https://docs.unrealengine.com/latest/INT/Resources/Showcases/Stylized/Materials/index.html

Custom Node:

 float2 output; 
 float2 Input1; 
 output = atan2 (In.y,In.x); 
 return (output);

The material definitely works as it was originally intended, rotating a shrub around the z axis only. My intention was to use this method for a bunch of leaves on a tree but as I've found out, leaves on a tree need to be rotated on more than 1 axis.

Can anyone point out to me which part of this method is responsible for locking the rotation to only 1 axes and possibly come up with a suggestion on how to factor in the x or y axis too, so I have not only a yaw but a pitch rotation too.

I thought maybe the masking of the red channel was the reason it only rotated around z, so I also added green channel to the same mask, upon doing so the engine crashes with no error.

Thanks.

Product Version: UE 4.12
Tags:
more ▼

asked Jul 09 '16 at 04:44 PM in Rendering

avatar image

Grant Margison
86 7 15 21

avatar image bdogrular Mar 09 '17 at 11:54 AM

Same boat, dont have a clue, It looks very complicated to me, what are those 3.142 value, and people do create these :)

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

1 answer: sort voted first
more ▼

answered Aug 28 '18 at 08:09 PM

avatar image

DenisDubinin
56 4 4

(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