Jump to content

[SOLVED] Lights do not work correctly at large distances from the origin.


photo

Recommended Posts

Using latest build, (March 27) and also tested on older builds.

 

Using Double Precision 64 bit version editor

 

To replicate - create a new project/world with a plane, move the plane to 100000, 100000, 0 or any higher distance - the behaviour gets worse the larger the distance.

Create a Projector light with settings such that it can be seen on the Plane

Rotate the light and observe that the light switches on and off and has a flickering behavior.

 

Currently we are attempting to add headlights to a train Simulator and this is causing surfaces to flicker on and off and generally behave strangely when getting further away from the origin, making the project undeliverable to the customer currently.

 

This also seems to tie in with Craigs  previous bug about a pause and huge frame rate drop when a light is activated/deactivated in a world that contains lots of Terrains : I have observed that placing a light at 0,0,0 does not have this pausing affect when activated/deactivated.  However if i move the light by only 20 meters or so this behaviour returns on enable/disable.

Link to comment

LightBug.zip

Please find attached project.

Settings were:

Directx 11

Quality:High

Stereo Disabled

Monitors: Single

AA 8x

AF 16

Windowed

1920, 1080

Editor Enabled

 

To replicate;

Focus on the plane object

Rotate the Projector light up to 20 degrees in the x axis

Notice the light turns off

Keep rotating the light upwards 1 degree at a time and notice it continues to switch on and off at different angles.

Link to comment

Excellent news, Thanks frustrum for the prompt help on this one. - i am hoping it also solves the other bug with light enable/disable pausing.  When can we expect a patch?

Link to comment

Change a sign of camera variable in the following function:

source/engine/worldsource/engine/world/WorldBounds.cpp:249

void WorldBoundFrustum::set(const mat4 &projection,const Mat4 &modelview):

 

from/to:

mat4 mvp = projection * mat4(modelview * translate(-camera));

mat4 mvp = projection * mat4(modelview * translate(camera));

 

and from/to:

Mat4 itransform = translate(camera);

Mat4 itransform = translate(-camera);

Link to comment

This is a critical bug fix for us, so it could be great if you could patch Unigine ASAP. We can't afford to wait for a new SDK. If you can let us know an eta for the patch that would be great.

Link to comment

1) I would recommend to upgrade to the full source SDK so you'll be able to use hotfixes immediately, when needed.

2) Can't tell you the exact ETA - since there are a lot of new features in 2013-03-26 version, we planned to gather info on missed bugs until the next week and release hotfix build before April, 5.

Link to comment
×
×
  • Create New...