I see that the z-fighting is very bad on your screenshots.
I see that the camera in the A and B images is almost the same so I am wondering what is causing the change: I assume that in the B images you create new 3D models and position them on the same position as the original object or use just a very small offset to position the new objects slightly above the original objects.
In this case you will need to increase the offset of the new models so that they will be slightly above the original object - this will produce different z values (distance from the camera to the 3D position) for the top and original models.
Another approach is to optimize the distribution of z values in the depth buffer (note that you still need to have slight offset between objects).
One of the most effective ways to optimize the distribution of z values is to switch to orthographic camera (from the first image I assume that you are using perspective camera). Orthographic camera is much better regarding z-fighting because there the resolution of z values is equal in the whole range from z-near to z-far. For perspective camera the resolution of z values is very good near the z-near value and much worse near the z-far value. (in the depth buffer the points at the z-near plane have z depth value 0; the positions at the z-far plane have z depth value 1).
The standard approach to solve the z-fighting issue is to minimize the difference between z-near and z-far values.
By default Ab3d.DXEngine already tries to optimize this by automatically calculating the z-near and z-far values based on the bounding box of the whole scene. So z-far value is get as the distance from the camera to the farthest point on the scene's bounding box. The z-near value is the distance to the nearest point of the bounding box (in the look direction). If there are some objects behind the camera and you are using perspective camera, then z-near is not set to 0 (this would not work). In this case the z-near is calculated as 1 / 1000 of z-far value.
If you would like to manually control the z-near and z-far values, you need to set the DXScene's OptimizeNearAndFarCameraPlanes property to false. This can be done with the following code:
Code:
MainDXViewportView.DXSceneInitialized += delegate(object sender, EventArgs args)
{
if (MainDXViewportView.DXScene == null) // When DXEngine falls back to WPF 3D rendering, the DXScene is null
return;
MainDXViewportView.DXScene.OptimizeNearAndFarCameraPlanes = false;
};
Then you can set the NearPlaneDistance and FarPlaneDistance on the camera and DXEngine will use those values.
As a final note I would like to mention that Ab3d.DXEngine is using 32 bit depth buffer so it can have the maximal resolution.
I hope that this will help you solve the problems. If not, then please explain in more details how you render yous scene (what changes you do from image A to image B).