Hi,
I've checked both the GL and Dx9 render systems. My settings for setFarClipDistance are not being honored. However, setNearClipDistance is working fine. I have personally tested this behavior with the latest SVN, and a coworker is seeing this with one of the 1.6.X releases. Will someone confirm that this is a bug? Many thanks!
bug in Camera::setFarClipDistance
-
- Orc
- Posts: 424
- Joined: Wed Aug 01, 2007 8:13 pm
- Location: Venice, CA, USA
- x 7
-
- Greenskin
- Posts: 131
- Joined: Fri Aug 22, 2008 6:12 pm
Re: bug in Camera::setFarClipDistance
It's working fine here (trunk and 1.6.3). Are you sure the far clip distance is not being reset somewhere else in your application?
-Fish
-Fish
-
- Gold Sponsor
- Posts: 1894
- Joined: Sun Mar 08, 2009 5:25 am
- x 116
Re: bug in Camera::setFarClipDistance
I don't know if this is relevant, but I had a problem at one stage with my FOVy settings not working. I was using the camera in a number of roles, moving it around with various funtions and changing all kinds of settings per frame. When it came to the final views, the FOVy just wouldn't alter.
When I changed the various functions to use a copy of the camera instead of the original camera, it started working fine, the altered FOVy settings took effect again.
When I changed the various functions to use a copy of the camera instead of the original camera, it started working fine, the altered FOVy settings took effect again.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
-
- Orc
- Posts: 424
- Joined: Wed Aug 01, 2007 8:13 pm
- Location: Venice, CA, USA
- x 7
Re: bug in Camera::setFarClipDistance
Ogre is a great toolkit. I wish my comments to sound constructive, to help improve it. I recognize that I might sound rushed- I am. Here's the situation:
If I use stencil shadows, then I can't control the far field of view. I found an offensive line of code in the Ogre source.
OgreSceneManager.cpp
I assume the camera instance is being used to hold state variables that the renderer needs to control. However, I would vote that the camera instance's state should not be changed because client code should set it up and it is not expected for those values to be changed. I'm not using stencil shadows anymore, but if Ogre wants to offer them as a feature, I'd recommend not changing the values the client code provides.
If I use stencil shadows, then I can't control the far field of view. I found an offensive line of code in the Ogre source.
OgreSceneManager.cpp
Code: Select all
if (isShadowTechniqueStencilBased() &&
camera->getProjectionType() == PT_PERSPECTIVE &&
camera->getFarClipDistance() != 0 &&
mDestRenderSystem->getCapabilities()->hasCapability(RSC_INFINITE_FAR_PLANE) &&
mShadowUseInfiniteFarPlane)
{
// infinite far distance
camera->setFarClipDistance(0);
}