strange behavior when i put two RectangleVisual3D nearly

Mar 5, 2014 at 2:14 AM
Hi,when i am using your toolkit.A strange thing occurred. i put two RectangleVisual3D of different color (one of them is RED ,the other is BLUE) closely, one RectangleVisual3d looked like dissolve into another RectangleVisual3d just like the picture below:Image
Image
the code:
 <t:RectangleVisual3D Length="100" Width="100" Origin="0,0,1" Fill="#FFF50404" >
            </t:RectangleVisual3D>
            <t:RectangleVisual3D Length="100" Width="100" Origin="0,0,1.0001" Fill="#FF0611FB">
            </t:RectangleVisual3D>
Mar 5, 2014 at 2:17 AM
another picture:
Image
Mar 5, 2014 at 10:53 AM
Did you set NearPlaneDistance in Camera? Had the same problem when NearPlaneDistance was 0.
Mar 6, 2014 at 2:40 AM
Thank you for your help,but it can't solve the problem.The code:
 this.Position = camera.Position;
            this.LookDirection = camera.LookDirection;
            this.UpDirection = camera.UpDirection;
            //this.NearPlaneDistance = camera.NearPlaneDistance;
            this.NearPlaneDistance = 0;
            this.FarPlaneDistance = camera.FarPlaneDistance;
Mar 6, 2014 at 5:05 AM
Set value different from 0. Chosen value is depends on situation - if scene is large value can be 10 or more, if it is a small scene then value can be 0.1. I set 15 to NearPlaneDistance and it resolved problem on 1500x1500 units scene. Parts of the scene closer to camera than value in NearPlaneDistance property won't be displayed. As far as i know this problem is connected with floating point rounding when renderer is trying to determine which object is closer to camera.
<PerspectiveCamera Position="0, 600, 525" LookDirection="0, -600, -525" UpDirection="0,1,0" NearPlaneDistance="15"/>