[Fixed] Smoothing closed edge creates NaN vertices.

Improve VPaint or VGC software by giving your feedback, reporting bugs, or suggesting new features.
Post Reply
lablanu
Posts: 11
Joined: Mon Aug 25, 2014 4:22 pm

Mon Aug 25, 2014 5:07 pm

If you draw a closed edge and smooth it out, the vertices become one NaN vertex.
It is not possible to delete the NaN vertex. The net effect isn't that significant, though.
I have attached a file showing what a NaN vertex looks like.

Also, could you add a setting for how frequently vertices are added?
The amount of vertices appear to be the main thing taking up space, having less vertices could be desirable in large projects.

Thanks for taking the time to develop this software, it's really useful.
Attachments
nanvertex.zip
(424 Bytes) Downloaded 409 times

User avatar
Boris
Site Admin
Posts: 193
Joined: Thu Aug 14, 2014 9:09 pm

Mon Aug 25, 2014 10:25 pm

Thank you very much for the report and the time you've spent to understand what's going on. I'll have a look at it.

Indeed, for now the 2D curve associated with each edge is naively represented as a dense sampling. The number of vertices is then always the length of the curve divided by ds, where ds is currently fixed to 3px. As a temporary convenience, I can make ds a parameter that can be changed in the interface. Indeed, this naive approach takes a lot of space when saved as an ASCII human-readable file, as I've decided to do for the time being (easier for debugging and manual fix of crashing files). In the future, a smarter curve representation will probably be used, and curve data will be optionally saved in a binary format, saving lots of space.

Thx again,
Boris

lablanu
Posts: 11
Joined: Mon Aug 25, 2014 4:22 pm

Mon Aug 25, 2014 11:05 pm

The sampling seems to be related to the speed at which the edge is drawn. The faster I draw, the less detail I get. You can actually see the already drawn part of the curve bend as I continue to draw the curve.
I suspect it's because of the frame rate.
You could make the sampling rely on time rather than distance, it would work really well with artists(if you're not doing that already).

Also, I'd like to help the development of VPaint in any way I can, any ideas?(Other than donations, I don't have money of my own)

User avatar
Boris
Site Admin
Posts: 193
Joined: Thu Aug 14, 2014 9:09 pm

Tue Aug 26, 2014 10:23 am

Actually your intuition is not correct, sampling in VPaint does not depend on frame rate or speed of drawing. But curve neatening/smoothing does. i.e., when you're drawing faster, I apply more smoothing, as research shows that drawing faster does capture an intent of having less high-frequency details.

Anyway, thx for your proposition of contributing to the development. :-) I'll think on how this could be done. But because there is unpublished research already implemented inside VPaint, I prefer to keep the source closed for now.

lablanu
Posts: 11
Joined: Mon Aug 25, 2014 4:22 pm

Tue Aug 26, 2014 12:34 pm

Seeing the source code would help me identify bug causes more easily, but I understand.
Let me know when you've found a way how I can help, I'd like to see this technology reach its full potential.

User avatar
Boris
Site Admin
Posts: 193
Joined: Thu Aug 14, 2014 9:09 pm

Thu Oct 30, 2014 9:08 am

Fixed for VPaint 1.0 beta 4.

Post Reply