SVG Nodes Testing

Hello alpha,

so the next alpha bild will contain a set of SVG nodes. please take some time and try out some use cases and report all bugs/feature requests here.

the help files are in the SVG subfolder of lib/nodes/plugins/. open one to get an overview of the nodes.

thanks!

Hi Tonfilm,

thanks a lot for this set of nodes, the new release looks full of new useful features.

A few things, the polyline and polygon nodes export the same kind of geometry, looking at booth .svg files i can see the same geometry command <polygon points="…"

It would be nice to have a real line or polyline file in order to draw only the stroke, not the fill.
Other way would be using quad svg node through transformations to draw the same geometry, but i think is cleaner the line or polyline method.

I was taking a look at the renderer svg help file and after to swith a few times between Files content and Renderer content directly, i have this error.

Sorry it is in Spanish.

Ari

Consulte el final de este mensaje para obtener más detalles sobre cómo invocar a la depuración 
Just-In-Time (JIT) en lugar de a este cuadro de diálogo.

************** Texto de la excepción **************
System.OutOfMemoryException: Memoria insuficiente.
   en System.Drawing.Graphics.CheckErrorStatus(Int32 status)
   en System.Drawing.Graphics.DrawImage(Image image, Int32 x, Int32 y, Int32 width, Int32 height)
   en System.Drawing.Graphics.DrawImage(Image image, Rectangle rect)
   en System.Windows.Forms.PictureBox.OnPaint(PaintEventArgs pe)
   en System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   en System.Windows.Forms.Control.WmPaint(Message& m)
   en System.Windows.Forms.Control.WndProc(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

thanks, good findings! if you have the ability, you can delete the list of referenced .dlls, the call stack is enough. then we dont have to scroll that much.

the polyline also has a fill in SVG, to draw only the outlines you would set the alpha of the fill color to 0, in that case the svg fill set to ‘none’.

i cannot reproduce the memory error… but i saw that the texture is not updated when its displaying the renderer content.

Sorry Tonfilm, i am new posting errors.

Now i have other one:

------------------------------------------------------------------------------
Exception log with detailed tech info. Generated on 16/12/2011 13:04:06.
You may send it to the application vendor, helping him to understand what had happened.
 Application title: ¥¥¥¥
 Application file: C:\Documents and Settings\Administrador\Escritorio\vvvv_45beta26.1\vvvv.exe
------------------------------------------------------------------------------
Exception class: EClrException
Exception message: No se puede encontrar la fuente 'Microsoft JhengHei'.
Exception address: 00000000
------------------------------------------------------------------------------
System.ArgumentException: No se puede encontrar la fuente 'Microsoft JhengHei'.
   en System.Drawing.FontFamily.CreateFontFamily(String name, FontCollection fontCollection)
   en System.Drawing.FontFamily..ctor(String name)
   en Svg.SvgText.get_Path()
   en Svg.SvgVisualElement.Render(SvgRenderer renderer)
   en Svg.SvgElement.RenderChildren(SvgRenderer renderer)
   en Svg.SvgGroup.Render(SvgRenderer renderer)
   en Svg.SvgElement.RenderChildren(SvgRenderer renderer)
   en Svg.SvgElement.Render(SvgRenderer renderer)
   en Svg.SvgDocument.Draw(Bitmap bitmap)
   en VVVV.Nodes.EX9_TextureSVGTextureNode.Evaluate(Int32 SpreadMax)
------------------------------------------------------------------------------
Main thread ID = 2584
Exception thread ID = 2584
------------------------------------------------------------------------------
Exception stack
Stack list, generated 16/12/2011 13:04:06
[0059B7B9](0059B7B9){vvvv.exe    } ClrUtils.ClrCheck (Line 1048, "ClrUtils.pas" + 2)
[006608B7](006608B7){vvvv.exe    } PluginNodes.TMPluginWrapperNode.EvaluateV2Plugin (Line 303, "PluginNodes.pas" + 1)
[0066068D](0066068D){vvvv.exe    } PluginNodes.TMPluginWrapperNode.Evaluate (Line 257, "PluginNodes.pas" + 24)
[00662092](00662092){vvvv.exe    } PluginNodes.TMPluginWrapperNode.CalculateNodeAndOutputSliceCounts (Line 936, "PluginNodes.pas" + 8)
[006991FC](006991FC){vvvv.exe    } Graph.TMBasicNode.Prepare (Line 1128, "Graph.pas" + 20)
[0069B24A](0069B24A){vvvv.exe    } Graph.TMPin._Prepare (Line 2347, "Graph.pas" + 4)
[0069B154](0069B154){vvvv.exe    } Graph.TMPin.PrepareUpstream (Line 2296, "Graph.pas" + 17)
[0069C6ED](0069C6ED){vvvv.exe    } Graph.TMPin.GetUserSliceCount (Line 2968, "Graph.pas" + 1)
[0069C33B](0069C33B){vvvv.exe    } Graph.TMPin.InfluenceNodeSliceCount (Line 2832, "Graph.pas" + 1)
[006991C1](006991C1){vvvv.exe    } Graph.TMBasicNode.CalculateNodeAndOutputSliceCounts (Line 1100, "Graph.pas" + 10)
[00599963](00599963){vvvv.exe    } RenderNodes.TMLayerNode.CalculateNodeAndOutputSliceCounts (Line 89, "RenderNodes.pas" + 1)
[006991FC](006991FC){vvvv.exe    } Graph.TMBasicNode.Prepare (Line 1128, "Graph.pas" + 20)
[0069B24A](0069B24A){vvvv.exe    } Graph.TMPin._Prepare (Line 2347, "Graph.pas" + 4)
[0069B11D](0069B11D){vvvv.exe    } Graph.TMPin.PrepareUpstream (Line 2291, "Graph.pas" + 12)
[0069B240](0069B240){vvvv.exe    } Graph.TMPin._Prepare (Line 2346, "Graph.pas" + 3)
[0069B3CD](0069B3CD){vvvv.exe    } Graph.TMPin._ValidateAllSlices (Line 2382, "Graph.pas" + 9)
[006598A7](006598A7){vvvv.exe    } RendererNodes.TMRendererNode.ValidateLayers (Line 547, "RendererNodes.pas" + 1)
[006FDA3E](006FDA3E){vvvv.exe    } ex9RendererNode.TMex9RendererNode.ValidateLayers (Line 959, "ex9RendererNode.pas" + 7)
[0065946C](0065946C){vvvv.exe    } RendererNodes.TMRendererNode.EvaluateCB (Line 414, "RendererNodes.pas" + 31)
[00658E34](00658E34){vvvv.exe    } RendererNodes.TMRendererNode.PrepareGraph (Line 184, "RendererNodes.pas" + 2)
[00699683](00699683){vvvv.exe    } Graph.TMBasicNode.PrepareGraphCB (Line 1306, "Graph.pas" + 2)
[006AE705](006AE705){vvvv.exe    } Events.TMEvent.Call (Line 403, "Events.pas" + 11)
[006ABAC5](006ABAC5){vvvv.exe    } MainLoop.TMMainLoop.DoTimer (Line 208, "MainLoop.pas" + 27)
[0050CB9A](0050CB9A){vvvv.exe    } IdleTimer.TMIdleTimer.AppIdle (Line 165, "IdleTimer.pas" + 46)
[00480B35](00480B35){vvvv.exe    } Forms.TApplication.Idle
[0047FFA7](0047FFA7){vvvv.exe    } Forms.TApplication.HandleMessage
[0048028F](0048028F){vvvv.exe    } Forms.TApplication.Run
[008A6FCD](008A6FCD){vvvv.exe    } vvvv.vvvv (Line 24, "" + 7)
------------------------------------------------------------------------------
Call stack for main thread
Stack list, generated 16/12/2011 13:04:06
[7C91E4F4](7C91E4F4){ntdll.dll   } KiFastSystemCallRet
------------------------------------------------------------------------------
System   : Windows XP Professional, Version: 5.1, Build: A28, "Service Pack 3"
Processor: Intel, Intel(R) Core(TM) i7 CPU         950  @ 3.07GHz, 3066 MHz MMX SSE SSE2 SSE3 SSSE3 SSE4A SSE4B 64 bits DEP
Memory: 2047; free 2046
Display  : 1920x1080 pixels, 32 bpp

ahh, thats the bugger, i thought i changed the font to arial… must be an older version you have. please donwload the build from this night.

And other one, i think the same than the first one.

System.OutOfMemoryException: Memoria insuficiente.
   en System.Drawing.Graphics.CheckErrorStatus(Int32 status)
   en System.Drawing.Graphics.DrawImage(Image image, Int32 x, Int32 y, Int32 width, Int32 height)
   en System.Drawing.Graphics.DrawImage(Image image, Rectangle rect)
   en System.Windows.Forms.PictureBox.OnPaint(PaintEventArgs pe)
   en System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   en System.Windows.Forms.Control.WmPaint(Message& m)
   en System.Windows.Forms.Control.WndProc(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Super… no text …

Hi Tonfilm,

I have a question regarding the GetPath function.
If I use it on a circle it always returns 12xy positions (actually 13, but circle is obviously closed). Is there a way to render more points on curves and circles? And on lines?
I am thinking of a behaviour like typo-spread, where you can set a spreadcount / resolution.
Ideal would also be a definition of a resolution not by an absoulte spreadcount, but by a distance between points.

I know this is probably a completely different thing, though …
Had started such an SVGSpread node with Vux more than a year ago, but that project somehow fell asleep. Nevertheless I still need that function.

Hi Tonfilm,

regarding to draw fill content with alpha=0, it can work perfect in small drawings, but i still think that a better approach to draw big files based on lines, would be using Line or Polyline.
Less data in the file, less pain for illustrator.
or am i wrong?

Renderer SVG Help now crashes when i switch between Files content and Renderer content directly, when file.svg doesn´t exist.

vvvv 45alpha26.1 - 0ee30409b2 16/12/2011 23:52
addons 45alpha26.1 - 0ee30409b2 16/12/2011 23:53

Ciao

Hi Tonfilm,
i´ve understood you now,
when alpha fill is 0, the exported file shows fill=“none”.
Perfect.

thanks

Cool Tonfilm!

for some time I have been wanting to get into some generative prints so, this could not have come at a better time.

one thing I have come across that I can not determine if it is supposed to be that way is that it seems that the Y-axis is upside down compared to the regular EX9 renderer.

shouldnt the same transform give the same outcome in both types of renderer?

see attached patch.

-Sune

SVG_TextTest.v4p (8.4 kB)

verynicethat!!!

only issue so far: can’t change font in Text (svg)

now please check the memory things and crashes again.

@eno
the path output reflects the internal drawing path, which uses spline representation. so what you get is parts of a curve with control points. the type tells you whether it is a start/end or curve point.
to get a typo spread like output one has to calc the curves. wasn’t into that yet, but maybe the path type we use can do such things.

@sunep
yes, the y-axis is in standard 2d drawing space. the problam was text display. for now you have to flip it yourself using transforms if you really need the same space.

@sebl
never had that problem, pleas try with the latest alpha again.

@eno
good news, the GetPath node now has a feature to convert the curves to line segments. there is a value to adjust the approximation error. i dont think that the points are equidistant, but its the first step and was easy to implement.

Flattening and approximation work great.
Curve rendering from Illustrator, too.
Pretty close to TypoSpread. Writing and Equidistance Node for Spreads should be doable.
Many thanks!

awesome!
so far, after installing the font, everything seems to work great.
will do more tests though.
Many thanks:)

which font did you have to install? i though all patches are set to Arial now… which patch was it?

was not using an uptodate alpha:)

there is something strange with the svg nodes.
if i open a new patch in b27, the svg nodes are not found in the nodelist (see image). but, if i open a patch that has them (eg. a help patch), then they show correctly, work, and in these patches they are also found in the nodelist :?

{img src = "sites/default/files/images/svg_0.jpg" title = “title”}

sites/default/files/images/svg_0.jpg

edit: ok it was https://discourse.vvvv.org/ after all