View Issue Details

IDProjectCategoryView StatusLast Update
0024287Open CASCADEOCCT:Visualizationpublic2014-11-11 12:52
ReporterduvAssigned Toduv 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformAOSL 
Product Version6.7.0 
Target Version6.8.0Fixed in Version6.8.0 
Summary0024287: Improving camera behavior
DescriptionWhile porting TKV3d to camera model some trade-offs were made to achieve backward compatibility. Mainly it affects camera coordinate system in orthographic mode. For example znear and zfar values are counted from center camera point (instead of eye point normally). Also zfit from old code was not ported properly for perspective mode. Internal camera z-fitting system was implemented instead.

It would be better for camera API usability to achieve consistent approach for both perspective and orthographic camera modes.
TagsNo tags attached.
Test case number

Relationships

duplicate of 0024413 closedabv Open CASCADE Visualization - get rid of projection shift from orthographic camera definition 

Activities

apl

2014-02-12 12:44

developer   ~0027855

There are several points that should be taken into account when revising Z-Near, Z-Far management.

Z-Near and Z-Far are the public parameters of the camera, which should not be changed by the camera internally, if the user is not expecting any modifications. This would make the user interface clear, and will unify approach of setting all of the camera public parameters.

Z-size is the property of view which was created for convenience of use. However, currently this term is not very clear and its definition, probably, would be changed.
In current terms, the Z-size has different effect on Z-Near, Z-Far and Distance parameters of camera for the following reasons:
- For orthographic view, the camera projection should not clip the viewed model (if clipping is not forced). The camera should not "go inside" of the displayed model.
- For perspective view, the camera could "go inside" of the displayed model during zooming, due to the fact that zooming within the view should be done with keeping camera FOVy angle of perspective. For references: there are two natural ways to zoom the camera - by changing FOVy or by changing Distance of camera.

Due to these aspects of use, the Distance of camera can be modified by view in orthographic mode to avoid clipping of model by view orientation / view projection mapping. For perspective view, the Distance is a component part of zooming, and it should not be changed during z-fit operation.

One point should be also noted: the Distance of camera in orthographic mode has passive role (as the view should not clip the model), however the result of sphere environment mapping depends on the z coordinate of the rendered vertex in camera view space. The higher the Distance of camera (correspondingly higher the z coordinate of rendered vertices in camera view space) - the better the effect of sphere environment mapping. Thus, it might be useful to have, in viewer, "OrthoDepth" parameter for orthographic mode to enlarge the Distance and improve the effect of sphere environment mapping. For perspective mode, there is no sense to introduce the parameter.

duv

2014-04-17 17:24

developer   ~0028945

Dear bugmaster,

Goals of this issue already acheived in 0024413: Visualization - get rid of projection shift from orthographic camera definition.
Please close the issue.

bugmaster

2014-04-18 10:12

administrator   ~0028954

Fix for this issue was integrated with fix for issue 0024413

Issue History

Date Modified Username Field Change
2013-10-24 12:05 duv New Issue
2013-10-24 12:05 duv Assigned To => duv
2014-02-10 11:49 apl Relationship added related to 0024413
2014-02-12 12:44 apl Note Added: 0027855
2014-04-04 18:16 abv Target Version 6.7.1 => 6.8.0
2014-04-17 15:39 duv Assigned To duv => bugmaster
2014-04-17 15:39 duv Status new => feedback
2014-04-17 17:24 duv Note Added: 0028945
2014-04-17 17:24 duv Status feedback => reviewed
2014-04-17 17:48 duv Status reviewed => feedback
2014-04-18 10:11 bugmaster Status feedback => tested
2014-04-18 10:12 bugmaster Note Added: 0028954
2014-04-18 10:12 bugmaster Status tested => verified
2014-04-18 10:12 bugmaster Resolution open => fixed
2014-04-18 10:12 bugmaster Assigned To bugmaster => duv
2014-04-18 14:45 kgv Relationship replaced duplicate of 0024413
2014-11-11 12:47 aiv Fixed in Version => 6.8.0
2014-11-11 12:52 aiv Status verified => closed