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"

Current state of UE-56344? (Point light reflection rotation)

Hi

It states in the bug report that it cannot be reproduced, but on the left says that it can be reproduced in 4.19.0 and 4.20.0

I have been able to reproduce this bug myself and searching to see if it already existed was how I found it. With the high number of votes I'm guessing a lot of people are also experiencing this.

Has the status for this been labeled wrong?

UE-56344

Product Version: UE 4.19
Tags:
more ▼

asked Sep 06 '18 at 01:05 PM in Bug Reports

avatar image

Thumbserelly
11 2 4

avatar image Thumbserelly Sep 07 '18 at 08:40 AM

Looks like there is a fix for half the problem but the baked light reflections are still the wrong way around.

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

1 answer: sort voted first

Ok I manged to find out that this was fixed when Epic added code for Rect lights

https://github.com/EpicGames/UnrealEngine/commit/8522799c64393b2ae1f2a23182670de857b9912e#diff-79f2853f5fc843939a1e9e73ced510ea

The fix to make the reflections of the baked lights with a source length > that 0 have the correct rotations are in SceneVisibility.cpp PostVisibilityFrameSetup

Replace this

 const float ZScale = FMath::Max(LightParameters.LightSourceRadius, LightParameters.LightSourceLength);
                     DrawSphere(&LightPDI, Origin, FRotationMatrix::MakeFromZ(LightParameters.NormalizedLightDirection).Rotator(), FVector(LightParameters.LightSourceRadius, LightParameters.LightSourceRadius, ZScale), 36, 24, ColoredMeshInstance, SDPG_World);

with this

                     FMatrix LightToWorld = Proxy->GetLightToWorld();
                     LightToWorld.RemoveScaling();
 
                     //Grabbed from the update when Epic added RECTLights
                     if (LightParameters.LightSourceLength > 0.0f)
                     {
                         DrawSphere(&LightPDI, Origin + 0.5f * LightParameters.LightSourceLength * LightToWorld.GetUnitAxis(EAxis::Z), FRotator::ZeroRotator, LightParameters.LightSourceRadius * FVector::OneVector, 36, 24, ColoredMeshInstance, SDPG_World);
                         DrawSphere(&LightPDI, Origin - 0.5f * LightParameters.LightSourceLength * LightToWorld.GetUnitAxis(EAxis::Z), FRotator::ZeroRotator, LightParameters.LightSourceRadius * FVector::OneVector, 36, 24, ColoredMeshInstance, SDPG_World);
                         DrawCylinder(&LightPDI, Origin, LightToWorld.GetUnitAxis(EAxis::X), LightToWorld.GetUnitAxis(EAxis::Y), LightToWorld.GetUnitAxis(EAxis::Z), LightParameters.LightSourceRadius, 0.5f * LightParameters.LightSourceLength, 36, ColoredMeshInstance, SDPG_World);
                     }
                     else
                     {
                         DrawSphere(&LightPDI, Origin, FRotator::ZeroRotator, LightParameters.LightSourceRadius * FVector::OneVector, 36, 24, ColoredMeshInstance, SDPG_World);
                     }


more ▼

answered Sep 07 '18 at 03:48 PM

avatar image

Thumbserelly
11 2 4

(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