Skybox flickering black triangles sometimes

Software: Away3D 4.x

bxc, Newbie
Posted: 19 March 2014 02:14 PM   Total Posts: 19

When set camera3D.lens.near=200 camera3D.lens.far=1000000,
roll/pitch/yaw the camera3D,sometimes you will see the black triangles.
They seemed to be on the corner of the cubemap.

   

Avatar
Fabrice Closier, Administrator
Posted: 19 March 2014 02:47 PM   Total Posts: 1260   [ # 1 ]

not just on skybox. If you would export to android for instance, such a depth between near and far, would probably add artefacts on geometry, very rough pixelly look and black areas, especially at edges near of other objects. Best practice for most cases isn’t to set far as “farfarfaraway by default”, but to use your scene bounds to define them and depending of your project adapt this value runtime.

   

John Brookes, Moderator
Posted: 19 March 2014 02:58 PM   Total Posts: 732   [ # 2 ]

Its a known bug, rounding I guess.
https://github.com/away3d/away3d-core-fp11/issues/685

Although as fab says set far as small as you can.

   

bxc, Newbie
Posted: 20 March 2014 06:29 AM   Total Posts: 19   [ # 3 ]

The link given by John solves the problem.
I use millimeter as unit.So 1000000 millimeter as far seems normal,isn’t it?
Because most things are 1000 bigger than using meter as unit,so will I meet the problem Fabrice told?I will be here when the problem occurs.
Thanks!

   

Avatar
Fabrice Closier, Administrator
Posted: 20 March 2014 10:16 AM   Total Posts: 1260   [ # 4 ]

Units are what you make of it… working in mm, meters, inches or sausages is the same.

If you define that ‘your 1000000” is in fact myNumber. 3467, 1000 or whatever smaller number. All you do, define or import simply has to be rescaled in the right ratio realworldscale to myNumber. What matters is that you do not use huge values possibly leading to roundings errors.

Even if working with ratio “scares” you or means lots of redo on what you did so far, if you simply divide by two, scales, positions etc… you would end up with a 50k far value, which is twice as small as what you have now, probably fixing the problem right away.

   

bxc, Newbie
Posted: 21 March 2014 01:10 PM   Total Posts: 19   [ # 5 ]

Ok,i know what you mean.Just always using one unique unit will be ok.

But,now the real problem comes. I finally use meter as unit,that means 1000 as far,default 20 as near,Then Some big object like a “big ball” whick i make it as 200 radius ,will be out of shape as the camera moves at some distance like 950 far away from it.The ball seems not round at all.And if camera continues to move,the ball is out of the frustum and disappear.I think it is when near disappearing,the problem occurs.At last all the big things will disappear as something still big but not like themselves.
If I use 1000 as far,but 0.000001 as near,the ball will be a very little round ball as the camera moves very far away.
So camera lens’far and near does not mean as absolute distance.How should I
set them?
And I don’t know why the 200-big thing so weird.Why don’t they just quickly disappear as what the shape they were?

   

bxc, Newbie
Posted: 23 March 2014 01:37 PM   Total Posts: 19   [ # 6 ]

After some study.I know the reason.The precision is the key.
When set 20 as near,1000 as far,the big ball will be clipped at 1000 location.
Clipping is based on triangle.So the shape may not be round.
When set 0.000001 as near,1000 as far,the clip operation will overflow or get some deviation.
And the len’s near and far is based on the viewport’s height=2.
And the len’s near should not be smaller than the focal length.
Just think the viewport as google class,so I think centimeter as unit maybe very proper.smile

   

redcoffe, Newbie
Posted: 01 December 2014 10:34 AM   Total Posts: 3   [ # 7 ]

When set 0.000001 as near,1000 as far,the clip operation will overflow or get some deviation.

 

 


_____________________
fifa 15 coins

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X