Jump to content

[SOLVED] Camera Shake when far from origin


photo

Recommended Posts

Posted

We are experiencing jitter or camera shake when cameras are exported a long way from the origin (4km). A test video with the jitter present is attached. When the same camera path was exported at the origin the path was smooth.

 

This problem did not occur on a job we did 18 months ago using an earlier engine version.

 

Brodie

Jitter Test.wmv

Posted

We are experiencing jitter or camera shake when cameras are exported a long way from the origin (4km). A test video with the jitter present is attached. When the same camera path was exported at the origin the path was smooth.

 

This problem did not occur on a job we did 18 months ago using an earlier engine version.

 

Brodie

 

Please create a small reproduction sample and we try to fix this issue before next update.

Posted

Please create a small reproduction sample and we try to fix this issue before next update.

 

I have attached the camera path text that you can see the jittering in. You may need to have something close to the camera to see it shaking.

 

If this is not enough info I may be able to put it in tropics demo? and put some geometry in close to the camera.

 

Thanks

Camera Paths.zip

Posted

I came across some very interesting information in a game post mortem. It seems that adding a very large floating point number to a very small floating point number will loose accuracy in the very small number.

Would it be possible in the max mesh/smesh plugin to internally convert all coordinates to doubles before doing any calculations then set the precision down right at the end.

 

I am not so sure how to deal with the max script portions (camera export) other than reorganising the matrix calculations so that transformation matrices are multiplied rather than added. The example I have is

[scale][Rotation][Translation]x[Translation][Rotation]x[Projection]

becomes

[scale][Rotation]x[Translation][Translation]x[Rotation]x[Projection]

for a model view projection.

 

I am not sure how much sense that makes.

Posted

I have attached the camera path text that you can see the jittering in. You may need to have something close to the camera to see it shaking.

 

If this is not enough info I may be able to put it in tropics demo? and put some geometry in close to the camera.

 

Thanks

 

Try this updated camera path script.

Posted

Try this updated camera path script.

 

Hi Alex, unfortunately the updated camera path script you mentioned is not visible to other users. Short comment on original problem cause would also be very helpful. Thanks

Posted

There was SDK build with inexact orthonormalize() function.

This script should handle this bug correctly.

camera.h.txt

  • 2 weeks later...
Posted

Hi Alex

 

Thanks for that. It seems to have reduced the problem but not removed it.

 

Is there any way to increase the floating point accuracy.

 

Steve

Posted

Hi Alex

 

Thanks for that. It seems to have reduced the problem but not removed it.

 

Is there any way to increase the floating point accuracy.

 

Steve

 

I will try to add support of double types in Unigine Script on days.

Posted

I will try to add support of double types in Unigine Script on days.

 

The jittering problem seems to be more general. There is a very good section 3.2.6 "The Jitter Bug: Dealing with Floating-Point Precision" (danni.coi referenced it) in the "Making it Large, Beautiful, Fast and Consistent: Lessons Learned Developing Just Cause 2" by Emil Persson in GPUPro. Even with with a not too lage game world coordinate system ranging from -16.384 -> 16.384 [m] they encountered numerous vertex/animation jittering problems and z-precision lost

 

post-82-063204600 1283855464_thumb.jpg

 

I think Alex already has included some precision-fixes in vertex shaders, but camera-relative per-instance matrix calculations (also known as camera-centric floating origin approach e.g. http://www.floatingorigin.com) are currently not implemented.

  • 3 weeks later...
Posted

We are also getting jitter in objects animated on a spline. This objects motion is a train that starts and stops.

 

The video shows the jitter when the train is stationary.

 

Will these issues be fixed with double types? as I need to know for a current project otherwise will have to keep moving my geometry to the origin as i fly around.

jitters.wmv

  • 5 weeks later...
Posted

I will try to add support of double types in Unigine Script on days.

 

Hi Alexander,

 

it would be great if Property class would also support double parameter values (e.g. for attaching double-precision world coordinate values to objects) via something like

 

void    Property::setParameterDouble(int num,double value) 

double  Property::getParameterDouble(int num)
double  Property::getParameterDoubleMin(int num)
double  Property::getParameterDoubleMax(int num)

Posted

Hi Alexander,

 

it would be great if Property class would also support double parameter values (e.g. for attaching double-precision world coordinate values to objects) via something like

 

void    Property::setParameterDouble(int num,double value) 

double  Property::getParameterDouble(int num)
double  Property::getParameterDoubleMin(int num)
double  Property::getParameterDoubleMax(int num)

 

Double properties and double types in xml parser is ready.

×
×
  • Create New...