photo

Doubles, when to use them?

Recommended Posts

Posted (edited)

Usually, we work around the world origin, so we never run into troubles re. precision.

Now, with the new Terrain, I moved the camera to the Terrain Center which is approx. 10000 units from Origin.

Our camera calc. seems to run out of precision, as it is jittering when calculation the position and lookat.

Can this be the case? From when - distance to origin - is it best to start using doubles?

Thx.

W.

ps. I solved the issue, by moving the terrain layer to origin, as well the content.

Still, please answer the q ;)

Edited by werner.poetzelberger

Share this post


Link to post

You need to use double precision when your world and camera need to be 10km or more from the world origin.

Share this post


Link to post

thx! Good to know!

 

Share this post


Link to post

We were using single in 12*12km terrain and we didnt experienced any issues. Now we are on double just to be sure, but my guess is, that for some cases even single should be OK.

Share this post


Link to post

12x12 km, you probably put the origin in the center of your world?

I have a 28x22km Terrain and was in the geometric center (camera), the origin I had in the lower left corner (as I thought I cannot move the terrain uhm, hehe).

So as silent mentioned, from 10 km OFF the Origin.

But it was only visible in the camera calculation (as the image was shaking). E.G. Character animation and positioning was fine too.

best.

Share this post


Link to post
Posted (edited)
3 hours ago, werner.poetzelberger said:

12x12 km, you probably put the origin in the center of your world?

I have a 28x22km Terrain and was in the geometric center (camera), the origin I had in the lower left corner (as I thought I cannot move the terrain uhm, hehe).

So as silent mentioned, from 10 km OFF the Origin.

But it was only visible in the camera calculation (as the image was shaking). E.G. Character animation and positioning was fine too.

best.

No, terrain had corner at 0,0,0 :)

Edited by demostenes

Share this post


Link to post

Interesting. So we should try to figure out some day, what caused the jittering.

We have some own code for the camera. 

Just a luck, that we stay in place ;).

cheers

Share this post


Link to post