06-21-2017, 06:55 PM
Simon, that is a good recommendation.
As you proposed, I have added MinNearPlaneDistance and MaxFarPlaneDistance properties to DXScene. This will allow you to have more control over the calculated near and far plane distance.
Currently the scene's bounds is calculating with simply calculating the union of the children axis oriented bounding boxes. This does not give perfect results but is very fast to calculate and gives quite good results. For now I would not change that.
This also gives good near and far values when the whole scene is shown. But the problems can happen when one part of the scene is behind the camera - in this case zNear is 1/1000 of zFar. But this might be too small in some cases. And in those cases you can set the MinNearPlaneDistance.
I am planning to release a beta version of new Ab3d.DXEngine (and Ab3d.PowerToys with tons of new features) tomorrow.
As you proposed, I have added MinNearPlaneDistance and MaxFarPlaneDistance properties to DXScene. This will allow you to have more control over the calculated near and far plane distance.
Currently the scene's bounds is calculating with simply calculating the union of the children axis oriented bounding boxes. This does not give perfect results but is very fast to calculate and gives quite good results. For now I would not change that.
This also gives good near and far values when the whole scene is shown. But the problems can happen when one part of the scene is behind the camera - in this case zNear is 1/1000 of zFar. But this might be too small in some cases. And in those cases you can set the MinNearPlaneDistance.
I am planning to release a beta version of new Ab3d.DXEngine (and Ab3d.PowerToys with tons of new features) tomorrow.
Andrej Benedik

