News:

 

Topic: Clipping issues in orthographic views!!!  (Read 16470 times)

0 Members and 1 Guest are viewing this topic.

  • No avatar
  • Posts: 2101
  • Polygon
October 07, 2017, 11:43:58 pm
I'm accustomed to Camera Focus Point (with Selection)/Camera Focus Point (No Selection).

I had a look.

While in "Custom(ortho)" with "App auto set" disabled (for clipping). When zooming in, the focus point is moving toward the camera, until eventually, the camera will spin(rotate) around its own axis. When zooming out, the focus point moves away from the camera. Tools such as "Best fit" or "Zoom Window" do not correct the focus point.

----------------------------
Certainly one for IStonia to look at when he has time.




« Last Edit: October 08, 2017, 12:01:34 am by steve »

  • No avatar
  • Posts: 976
  • Polygon
October 08, 2017, 08:16:09 am
Nice find, Steve!

  • No avatar
  • Posts: 3705
  • Developer
  • Administrator
  • Polygon

  • No avatar
  • Posts: 2101
  • Polygon
October 08, 2017, 06:57:19 pm
I am not seeing the major issue reported. There may be minor issue, but not sure, as I go a little crossed eyed trying to work/test in custom(ortho), not a view I like.

rubberDuck will be better for testing fully.

  • No avatar
  • Posts: 976
  • Polygon
October 08, 2017, 07:04:17 pm
Try this
http://www.digitalfossils.com/Download/NVil-Oct-10-17.rar
The only change that I have noticed in this build is that if I switch to orthographic mode with Steve's composite tool, then each Best Fit will take me closer and closer to the object (or focus point?). Then after several calls of Best Fit, I think the camera does what Steve says and strange things begin to happen, like this exception:

Code: [Select]
System.AggregateException: One or more errors occurred. ---> System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
   at System.Drawing.Region.IsVisible(PointF point, Graphics g)
   at DigitalFossil.AnimationDesign.Component.IsPolyUnderPoint(Region regionScr, Polygon poly, InstancePolygon iPoly, Single xIn, Single yIn, Boolean& interceptedByEdgeOrVertex, Vector3& rayIntersetPoint, Boolean& polyBoundingRectContainsPt)
   at DigitalFossil.AnimationDesign.Component.<>c__DisplayClass44.<FindUnderScrPtPolys>b__3b(Tuple`2 range, ParallelLoopState loopState)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
   at System.Threading.Tasks.Parallel.ForEach[TSource](Partitioner`1 source, Action`2 body)
   at DigitalFossil.AnimationDesign.Component.FindUnderScrPtPolys(Vector2 pt, ArrayList interceptedPolys, Boolean ignoreCulling, Boolean checkEdge, Edge& interceptedTopEdge)
   at DigitalFossil.AnimationDesign.Util.GetRayInterceptPolys(Boolean dismissWirePolygonCondition, Single x, Single y, AbstractGraphicWindow graphicWindow, ArrayList characters, CharacterHolder exclusiveCharacter, Component hintComponent, Boolean freezedComponentBlocked, Boolean ignoreCharacterFreezeFlag, Boolean ignoreCulling, Boolean checkEdge, Boolean excludeTransparentWireMeshObjects, ArrayList& interceptedTopEdges)
   at DigitalFossil.AnimationDesign.Util.GetScrRayObjectInterceptPoint(Boolean dismissWirePolygonCondition, Single x, Single y, AbstractGraphicWindow graphicWindow, ArrayList characters, CharacterHolder exclusiveCharacter, Component hintComponent, Boolean freezedComponentBlocked, Boolean ignoreCharacterFreezeFlag, Boolean excludeTransparentWireMeshObjects, Boolean ignoreEdgeLeak, Boolean canAddRetopoReferenceObjects, Vector3& intersectPt, Vector3& intersectNormal, Object& objPoly)
   at DigitalFossil.AnimationDesign.ModelDesigner.CollectCharactersUnderPoint(Int32 ptX, Int32 ptY, ArrayList objects, Boolean excludeFrozenObjects, Boolean excludeRetopoReferenceObjects)
   at DigitalFossil.AnimationDesign.ModelDesigner.StreamLineEngine.DetectObject(Single x, Single y)
   at DigitalFossil.AnimationDesign.ModelDesigner.OnMouseDown(Object sender, MouseEventArgs e)
   at DigitalFossil.AnimationDesign.AnimationDesignGraphicWindow.OnMouseDown(Object sender, MouseEventArgs e)
   at DigitalFossil.AbstractGraphicWindow.CursorClerk.OnMouseDown(Object sender, MouseEventArgs e)
   at System.Windows.Forms.MouseEventHandler.Invoke(Object sender, MouseEventArgs e)
   at System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
---> (Inner Exception #0) System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
   at System.Drawing.Region.IsVisible(PointF point, Graphics g)
   at DigitalFossil.AnimationDesign.Component.IsPolyUnderPoint(Region regionScr, Polygon poly, InstancePolygon iPoly, Single xIn, Single yIn, Boolean& interceptedByEdgeOrVertex, Vector3& rayIntersetPoint, Boolean& polyBoundingRectContainsPt)
   at DigitalFossil.AnimationDesign.Component.<>c__DisplayClass44.<FindUnderScrPtPolys>b__3b(Tuple`2 range, ParallelLoopState loopState)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.<PartitionerForEachWorker>b__1()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---


  • No avatar
  • Posts: 2101
  • Polygon
October 08, 2017, 08:08:14 pm
I checked using "alt+RMB"(zoom); set focus; zoom window. The problem with moving focus point does appear to be fixed (well, not serious issue as before).

The "best fit" is a different issue.


  • No avatar
  • Posts: 3705
  • Developer
  • Administrator
  • Polygon
October 08, 2017, 11:15:32 pm
The file renewed. Best fit bug is fixed.
http://www.digitalfossils.com/Download/NVil-Oct-10-17.rar

The change is, when "Auto set" is off in ortho view, camera and its focus point will not be changed in zooming. Compare to previous version, when change from perspective view to ortho view, the zooming will appear to be very different. There is no way this can be fixed unless changing camera or its focus point position when changing between perspe/orhto but that may cause other issues.


-----------
Sadly it gets even worse with PointOfInterest (with Selection). I have no idea what the camera rotates around in this rotation pivot style. I can "move" the cube out of viewport's frame just by rotating around it.  :-\

In this style, when you start view rotation, the program will cast a ray from the cursor point. If the ray intersects with a face or line, the intersect point will be used as the camera rotation point so the area around that point will not be rotated out of view.
« Last Edit: October 09, 2017, 01:33:52 am by IStonia »

  • No avatar
  • Posts: 3705
  • Developer
  • Administrator
  • Polygon
October 09, 2017, 02:20:45 am

  • No avatar
  • Posts: 976
  • Polygon
October 09, 2017, 03:37:41 pm
Still having problems with Best Fit. If I use Steve's composite tool to switch to ortho, then zoom out some distance and run Best Fit, the selected object is framed, but when I rotate the camera, the object goes off the screen. Same situation like from the video (at around 0:42) that I linked up several posts ago.

I think I'll just stick to Auto Set only, with plain View Navigation Tools > Perspective/Orthographic View$ for toggling view modes. If I run into clipping in ortho view, I will temporarily enable Advance Focus Point (...) to tweak the focus point.

  • No avatar
  • Posts: 2101
  • Polygon
October 09, 2017, 04:27:16 pm
In Custom(ortho) view "App auto set" disabled. The "Best fit" is moving the camera, with focus point moving with camera to maintain original focus distance.






« Last Edit: October 09, 2017, 04:29:37 pm by steve »

  • No avatar
  • Posts: 3705
  • Developer
  • Administrator
  • Polygon
October 12, 2017, 08:18:12 am
Try this
http://www.digitalfossils.com/Download/NVil-Oct-11-17.rar

The ortho zoom behaviors is restored but two new options are added.
View > Orthographic View Zoom Options > "Camera Position Fixed"/"Camera Focus Both Fixed".

Steve, you need to modify your composite tools, the two options are not linked to "Auto Set" like previous version.

  • Posts: 514
  • Polygon
October 16, 2017, 11:10:09 am
I'm really confused about these extra options. I do not know what to check or not check to minimise unwanted clipping issues in the viewport.

  • No avatar
  • Posts: 3705
  • Developer
  • Administrator
  • Polygon
October 17, 2017, 11:24:05 am
You should use "Camera Focus Both Fixed".
I don't see in any case the "Camera Position Fixed" can be useful. It can cause problem if viewport rotation uses camera focus as pivot. But I just leave it there for now just in case it can be used in some special cases.

  • Posts: 514
  • Polygon
October 17, 2017, 11:28:57 am
You should use "Camera Focus Both Fixed".

So I should have that on when working in ortho views, custom ortho & custom perspective ?

or just when using any ortho views & custom ortho ?

  • No avatar
  • Posts: 3705
  • Developer
  • Administrator
  • Polygon
October 17, 2017, 11:51:03 am
The two options only works in ortho views. In perspective view zooming, focus point always fixed and the camera must move toward or away from the focus point.

If you come across any issue, fire the "Add Camera" command. Choose Yes to the dlg and the new camera will be in the position of the viewport camera with the same near and far plane settings. Then turn on this option, View > Display > Show Camera Range Line. Now you can navigate the viewport to see where the camera is and its near/far plane positions. You may be able to tell what causes the problem form what you see.