MatPreview not matching camera view [SOLVED]
-
On 14/07/2015 at 10:07, xxxxxxxx wrote:
Hello,
why do you include "DTYPE_REAL" in your call of GetParameter()? I cannot see how this makes any sense.
Best wishes,
Sebastian -
On 14/07/2015 at 10:53, xxxxxxxx wrote:
I copy pasted it from somewhere when I was searching, but this doesn't change any result after removing "DTYPE_REAL"
-
On 15/07/2015 at 08:27, xxxxxxxx wrote:
Hello,
as commented in the header file, both CAMERAOBJECT_FOV and CAMERAOBJECT_FOV_VERTICAL are "virtual" parameters that are not stored in the camera's base container (and thus should not be used this way).
In the case of CAMERAOBJECT_FOV_VERTICAL it indeed accesses the active object. It seems this parameter is only used in certain internal cases. So you have to calculate this value on your own using the current film aspect and CAMERAOBJECT_APERTURE.
Best wishes,
Sebastian -
On 15/07/2015 at 09:31, xxxxxxxx wrote:
so I consider this a "bad behavior" which is not anticipated.
thanks Sebastian for clarification, I will handle it. -
On 19/07/2015 at 00:24, xxxxxxxx wrote:
here is what I did, works fine, but I need to confirm that it is safe "I'm using BaseVideoPost node's document"
BaseContainer bcRender = node->GetDocument()->GetActiveRenderData()->GetData(); float w; float h; w = bcRender.GetFloat(RDATA_XRES); h = bcRender.GetFloat(RDATA_YRES); float fov_h = 2.f * atanf((ap) / (2.f * focus)); float fov_v = 2.f * atanf((ap / (w / h)) / (2.f * focus)); float fov = (fov_v < fov_h)? fov_v : fov_h;
-
On 20/07/2015 at 01:39, xxxxxxxx wrote:
Hello,
RenderDocument() has a parameter for the used render settings. These render settings can be accessed with Render::GetRenderData(), so if you want to get the resolution you should use:
BaseContainer rdata = vps->render->GetRenderData();
best wishes,
Sebastian -
On 20/07/2015 at 02:31, xxxxxxxx wrote:
true, but...
the SDK got a bug at this point, let me explain where the problem occurs:
1- let's consider I used the old approach "CAMERAOBJECT_FOV_VERTICAL and CAMERAOBJECT_FOV" as you mentioned, these are virtual,
so they fail in MatPreview "as they use the current Document camera, NOT the MatPreview Document camera"2- I already tested vps->render->GetRenderData(), works fine in MatPreview and picture viewer
but it fails in viewport "guess what? camera horizontal and vertical FOV are represented by the virtual descriptions!!!
which doesn't match Document dimensions" for example: Document image = 1280 x 720, viewport image = 1100 x 500,
camera got FOV calculated from the 1280 x 720 image "not the correct width, height values" -
On 20/07/2015 at 11:04, xxxxxxxx wrote:
Hello,
you could check the renderflags if RENDERFLAGS_EXTERNAL is set and react accordingly.
Best wishes,
Sebastian -
On 20/07/2015 at 11:06, xxxxxxxx wrote:
this looks great!!. so RENDERFLAGS_EXTERNAL means non viewport render?
-
On 20/07/2015 at 14:15, xxxxxxxx wrote:
Originally posted by xxxxxxxx
this looks great!!. so RENDERFLAGS_EXTERNAL means non viewport render?
Yes!
-
On 23/07/2015 at 19:29, xxxxxxxx wrote:
thanks Sebastian and Robert
you can consider this solved.