News:

 

Topic: New Tool Test "Draw Mesh"  (Read 1157 times)

0 Members and 1 Guest are viewing this topic.

  • Posts: 720
  • Polygon
August 11, 2017, 02:49:19 PM
Quote
2-- To resume the drawing of a drawn line, Caps-Lock+RMB-Click the line at any of its two ends. Then continue its drawing or right click another line to connect.
IStonia, a resumed curve snaps to vertices of a reference mesh if vertex snapping is enabled.

  • Posts: 720
  • Polygon
August 11, 2017, 03:29:56 PM
Quote
6-- To create lines inside a rectangle enclosed by 4 lines, Caps-Lock+LMB and drag, or Shift/Ctrl+drag, to adjust the segments.
Do you think you could expand this feature, so that number of loops is "borrowed" from the existing mesh (if it is present)?
The number of rings could be left to users to increase/decrease by dragging.



  • No avatar
  • Posts: 3005
  • Developer
  • Administrator
  • Polygon
August 12, 2017, 11:04:17 AM
Quote
2-- To resume the drawing of a drawn line, Caps-Lock+RMB-Click the line at any of its two ends. Then continue its drawing or right click another line to connect.
IStonia, a resumed curve snaps to vertices of a reference mesh if vertex snapping is enabled.

How does it happen?

  • Posts: 720
  • Polygon
August 12, 2017, 11:39:28 AM
Here's what is happening:
https://drive.google.com/open?id=0B5_r9d5SdkIvQldsN3ZxUm1SSFE
After I resume drawing the curve with snapping active, the new stroke keeps snapping to vertices of the reference mesh.

  • No avatar
  • Posts: 3005
  • Developer
  • Administrator
  • Polygon
August 12, 2017, 12:52:29 PM
It actually does not snap to reference object vertex. It snaps to the spline end. I will fix it.

  • Posts: 720
  • Polygon
August 12, 2017, 02:12:28 PM
Code: [Select]
System.NullReferenceException: Object reference not set to an instance of an object.
   at DigitalFossil.AnimationDesign.ModelDesigner.OnLoopTimerClick()
   at DigitalFossil.AnimationDesign.AnimationDesignGraphicWindow.OnLoopTimerClick()
   at DigitalFossil.AnimationDesign.AnimationDesignForm.OnLoopTimerClick()
   at DigitalFossil.AnimationDesign.StartForm.loopTimer_Tick(Object sender, EventArgs e)
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Happens when starting a new scene after using Draw Mesh tool. I already mentioned it before, but forgot to record a video.

https://drive.google.com/open?id=0B5_r9d5SdkIvNldGTlZ0T0ZlaGM

  • Posts: 720
  • Polygon
August 12, 2017, 02:27:14 PM
Another problem regarding retopo geometry is that when you start tweaking components with soft selection enabled, groups of vertices will go in opposite directions.
It's simple to reproduce. Create a sphere as a reference mesh, create a relatively dense retopo geometry over it so soft selection has something to work with, enable soft selection and start tweaking.

  • No avatar
  • Posts: 3005
  • Developer
  • Administrator
  • Polygon
August 13, 2017, 03:23:48 AM
I don't know what the problem is.

  • Posts: 720
  • Polygon
August 13, 2017, 01:13:25 PM
Another problem regarding retopo geometry is that when you start tweaking components with soft selection enabled, groups of vertices will go in opposite directions.
It's simple to reproduce. Create a sphere as a reference mesh, create a relatively dense retopo geometry over it so soft selection has something to work with, enable soft selection and start tweaking.
Okay, this wasn't a bug. I just noticed I had a strange Soft Selection profile selected.

  • Posts: 720
  • Polygon
August 14, 2017, 12:55:55 PM
Is surface from the video too curved or too small for Draw Mesh to generate the mesh correctly? Initially I thought that I set welding radius too high again, but it turned out it was okay. Maybe some other setting?

https://drive.google.com/open?id=0B5_r9d5SdkIvMkVwb3FXSkR6S0U
« Last Edit: August 14, 2017, 12:57:30 PM by rubberDuck »

  • No avatar
  • Posts: 3005
  • Developer
  • Administrator
  • Polygon
August 14, 2017, 01:32:34 PM
Try this
http://www.digitalfossils.com/Download/NVil-Aug-14-17.rar

To create lines from existing open edges, enable edge snapping, LMB drag from the edge. To create from multiple edges, LMB click the first edge then move over to the second edge and LMB drag, if the second edge is the same as the first edge, the whole open edge loop will be used. Once lines drawn out, WMB or Ctrl+LMB-Drag to adjust segments. To bridge, drag the cursor to the opposite side edge. To change line moving direction, tap Space key.


Is surface from the video too curved or too small for Draw Mesh to generate the mesh correctly? Initially I thought that I set welding radius too high again, but it turned out it was okay. Maybe some other setting?

https://drive.google.com/open?id=0B5_r9d5SdkIvMkVwb3FXSkR6S0U

Previously projection direction was computed by program according to drawn lines. This method does not look reliable. Now I have changed it to use viewport camera direction. So before generating the mesh, make sure the lines lay out is looking good in viewport.

  • Posts: 720
  • Polygon
August 14, 2017, 04:18:59 PM
 :) Almost perfect, but I ran into two problems.

The first one, is that splines which are drawn from corners of the existing mesh are always longer than the others.

The second, is System.NullReferenceException during mesh generation:
Code: [Select]
System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at DigitalFossil.BaseComponent.BuildMeshStandard_2(VertexAttachingSmoothGroup& vasg, Int32 vertex, Boolean meshTextured, Single u, Single v, Int32 vertexColor, Int32 vertexAttachingGroupIndex, Int32 uvCount, VertexMeshVerticesIndexInfo& vertexMeshVerticesIndexInfo, PositionNormalTextured[] vertsPositionNormalTextured, PositionNormal[] vertsPositionNormal, PositionNormalColored[] vertsPositionNormalColored, PositionNormalColoredTextured[] vertsPositionNormalColoredTextured)
   at DigitalFossil.BaseComponent.BuildMeshStandard_2(VertexAttachingGroup& vag, Int32 vertex, Boolean meshTextured, Int32 vertexColor, Int32 vertexAttachingGroupIndex, Int32 uvCount, VertexMeshVerticesIndexInfo& vertexMeshVerticesIndexInfo, PositionNormalTextured[] vertsPositionNormalTextured, PositionNormal[] vertsPositionNormal, PositionNormalColored[] vertsPositionNormalColored, PositionNormalColoredTextured[] vertsPositionNormalColoredTextured)
   at DigitalFossil.BaseComponent.BuildMeshStandard_2(Int32 vertex, Boolean meshTextured, Int32 vertexColor, VertexMeshVerticesIndexInfo& vertexMeshVerticesIndexInfo, PositionNormalTextured[] vertsPositionNormalTextured, PositionNormal[] vertsPositionNormal, PositionNormalColored[] vertsPositionNormalColored, PositionNormalColoredTextured[] vertsPositionNormalColoredTextured)
   at DigitalFossil.BaseComponent.<>c__DisplayClass12.<BuildMesh>b__e(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 DigitalFossil.BaseComponent.BuildMesh(AbstractGraphicWindow graphicWindow, Int32[]& adjOut)
   at DigitalFossil.BaseComponent.UpdateMesh(AbstractGraphicWindow graphicWindow)
   at DigitalFossil.AnimationDesign.Component.UpdateMesh()
   at DigitalFossil.AnimationDesign.ModelDesigner.Strln_DrawRetopo.CreateMesh(ArrayList polyHolders, ArrayList finalPts, Single scale)
   at DigitalFossil.AnimationDesign.ModelDesigner.Strln_DrawRetopo.CreateGeometry(CharacterHolder hintObj)
   at DigitalFossil.AnimationDesign.ModelDesigner.Strln_DrawRetopo.Exit()
   at DigitalFossil.AnimationDesign.ModelDesigner.StreamLineEngine.ActivateToolCore(StreamLineTool strlTool, Boolean enviromentCheckRequired, Boolean activatingByMouseButton)
   at DigitalFossil.AnimationDesign.ModelDesigner.StreamLineEngine.set_activatedStrlTool(StreamLineTool value)
   at DigitalFossil.AnimationDesign.ModelDesigner.StreamLineEngine.OnAppFormKeyUp(Object sender, KeyEventArgs e)
   at DigitalFossil.AnimationDesign.ModelDesigner.OnAppFormKeyUp(Object sender, KeyEventArgs e)
   at DigitalFossil.AnimationDesign.AnimationDesignGraphicWindow.OnAppFormKeyUp(Object sender, KeyEventArgs e)
   at DigitalFossil.AnimationDesign.AnimationDesignForm.OnFormKeyUp(Object sender, KeyEventArgs e)
   at DigitalFossil.KeyboardControler.Form_KeyUp(Object sender, KeyEventArgs e)
   at System.Windows.Forms.KeyEventHandler.Invoke(Object sender, KeyEventArgs e)
   at System.Windows.Forms.Control.OnKeyUp(KeyEventArgs e)
   at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
   at System.Windows.Forms.Form.ProcessKeyPreview(Message& m)
   at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
   at System.Windows.Forms.Control.WmKeyChar(Message& m)
   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.NullReferenceException: Object reference not set to an instance of an object.
   at DigitalFossil.BaseComponent.BuildMeshStandard_2(VertexAttachingSmoothGroup& vasg, Int32 vertex, Boolean meshTextured, Single u, Single v, Int32 vertexColor, Int32 vertexAttachingGroupIndex, Int32 uvCount, VertexMeshVerticesIndexInfo& vertexMeshVerticesIndexInfo, PositionNormalTextured[] vertsPositionNormalTextured, PositionNormal[] vertsPositionNormal, PositionNormalColored[] vertsPositionNormalColored, PositionNormalColoredTextured[] vertsPositionNormalColoredTextured)
   at DigitalFossil.BaseComponent.BuildMeshStandard_2(VertexAttachingGroup& vag, Int32 vertex, Boolean meshTextured, Int32 vertexColor, Int32 vertexAttachingGroupIndex, Int32 uvCount, VertexMeshVerticesIndexInfo& vertexMeshVerticesIndexInfo, PositionNormalTextured[] vertsPositionNormalTextured, PositionNormal[] vertsPositionNormal, PositionNormalColored[] vertsPositionNormalColored, PositionNormalColoredTextured[] vertsPositionNormalColoredTextured)
   at DigitalFossil.BaseComponent.BuildMeshStandard_2(Int32 vertex, Boolean meshTextured, Int32 vertexColor, VertexMeshVerticesIndexInfo& vertexMeshVerticesIndexInfo, PositionNormalTextured[] vertsPositionNormalTextured, PositionNormal[] vertsPositionNormal, PositionNormalColored[] vertsPositionNormalColored, PositionNormalColoredTextured[] vertsPositionNormalColoredTextured)
   at DigitalFossil.BaseComponent.<>c__DisplayClass12.<BuildMesh>b__e(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 )<---

Video: https://drive.google.com/open?id=0B5_r9d5SdkIvUWgwZkUxRmtZSnc

  • Posts: 720
  • Polygon
August 14, 2017, 04:40:13 PM
(...) before generating the mesh, make sure the lines lay out is looking good in viewport.
Okay. In this case it would help a lot if after generating the mesh, we could bring back the splines with Undo operation, so we could tweak them or realign the view properly without having to redraw the lines. What do you think?

  • Posts: 720
  • Polygon
August 14, 2017, 07:44:10 PM
To break a line, press RMB at the line then tap Space key.
Can I suggest a reverse operation? If two lines share an endpoint, RMB and Space on that spline vertex would join those two lines together.
During my tests, there were times when this feature would come in handy.

  • No avatar
  • Posts: 3005
  • Developer
  • Administrator
  • Polygon
August 15, 2017, 10:58:31 AM
Try this
http://www.digitalfossils.com/Download/NVil-Aug-15-17.rar

* To join two lines sharing the same end point, press RMB at the line then tap Space key.
* To break a line, press RMB at the line then tap Alt+Space key.
* To import lines from lines-of-last-run/scene-splines, Caps-Lock+RMB and drag over 400 pixels horizotally/vertically.