News:

 

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

0 Members and 1 Guest are viewing this topic.

  • No avatar
  • Posts: 976
  • 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.

  • No avatar
  • Posts: 976
  • 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: 3705
  • 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?

  • No avatar
  • Posts: 976
  • 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: 3705
  • 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.

  • No avatar
  • Posts: 976
  • 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

  • No avatar
  • Posts: 976
  • 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: 3705
  • Developer
  • Administrator
  • Polygon
August 13, 2017, 03:23:48 am
I don't know what the problem is.

  • No avatar
  • Posts: 976
  • 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.

  • No avatar
  • Posts: 976
  • 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: 3705
  • 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.

  • No avatar
  • Posts: 976
  • 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

  • No avatar
  • Posts: 976
  • 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?

  • No avatar
  • Posts: 976
  • 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: 3705
  • 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.