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"

How to change basic sun position in editor (not PIE)?

After creating a blank first_person project - the sun posistion rendered in the editor viewport (not during PIE!) has an arbitrary yaw and pitch (rotation).

If I CLEAR the light_source from SkySphereBlueprint (BP_Sky_Sphere) I can change the sun pitch/yaw using the sun height and Transform.Rotation.Z. However, want to do this WITH a Directional Light Actor assignment.

So, somewhere (possibly within in BP_Sky_Sphere) there is a default yaw/pitch applied when a Directional Light Actor is is in use, however, I just can't find it anywhere.

How can I change the default sun position in the editor (not PIE) when a Directional Light Actor (light source) is assigned?

For example, I want the editor to start with the sun below the horizon, not above it.

alt text

Product Version: UE 4.6
Tags:
more ▼

asked Oct 13 '15 at 11:13 AM in Using UE4

avatar image

ash22
486 70 62 95

avatar image Enlo Oct 13 '15 at 11:24 AM

Not directly answering your question, but I don't see how it would help you if you want to use an Direction Light Actor anyway... Simply move your light actor and then refresh the material on the Sky Sphere. In your screenshot, you can see the "refresh material" checkbox. Look at the BP code of the Sky Sphere to see what it does and trigger it whenever you want.

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

2 answers: sort voted first

Refresh material! Thanks Enlo, that was it!

A bit tedious, but the process is:

(1) go to the directional light and rotate it

(2) go back to BP_SkySphere and click Refresh material.

more ▼

answered Oct 13 '15 at 11:42 AM

avatar image

ash22
486 70 62 95

avatar image jhessin Feb 13 '16 at 01:35 PM

I was watching a video from an older version of the editor and the sun moved as they turn the directional light (in real time) - was this removed in a later version? You can see the video here: https://youtu.be/yQWrdE7EqC0?t=416

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

Oh, i think I get it. Two easy mistakes to make with Sky Sphere and Direct Light Actor (DLA):

  • First, the position of the DLA is irrelevant, only the rotation is important!

  • Second, when you change the DLA's rotation, the shadows and light source ajust immediately, but the sun stays where it is, because it's just the material on the Sky Sphere. You need to check the "refresh material" checkbox on the Sky Sphere or call the Function UpdateSunDirection on it.

more ▼

answered Oct 13 '15 at 11:32 AM

avatar image

Enlo
859 23 9 40

avatar image ash22 Mar 09 '16 at 02:09 PM

Do you (or anyone) know how to get the actual DLA's world xyz position?

Even though the DirLightActor works as expected (I can rotate it through day/night cycles) calling LightSource.[GetActorLocation] only retrieves the same static vector value that was set in the LightSource details panel (i.e. Location).

As you pointed out, only the material is updated, but presumably the DirLightActor.xyz is held somewhere in order to calculate dynamic shadow updates in the scene if you rotate the DirLight.

Basically, I need the DirLightSource.xyz to pass into a material.

avatar image Enlo Mar 09 '16 at 10:23 PM

Only the rotation is used and I think the dynamic shadow is calculated based on the actual sun on the texture. The DLA is really just the provider of the rotation value

(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

Related Questions